@kiva/kv-components 6.63.0 → 6.64.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue/KvCompactLoanCard.css +1 -1
- package/dist/vue/KvCompactLoanCard.js +115 -93
- package/dist/vue/KvSideSheet.js +22 -22
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
.loan-card-use[data-v-
|
|
1
|
+
.loan-card-use[data-v-92c9b884]:hover,.loan-card-use[data-v-92c9b884]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-92c9b884]{text-decoration-line:underline}.loan-card-progress[data-v-92c9b884]:hover,.loan-card-progress[data-v-92c9b884]:focus{text-decoration-line:none}.loan-card-use-text[data-v-92c9b884] p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;text-overflow:ellipsis}.loan-card-cta[data-v-92c9b884] form,.loan-card-cta[data-v-92c9b884] fieldset,.loan-card-cta[data-v-92c9b884] .tw-w-full,.loan-card-cta[data-v-92c9b884] button{height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-92c9b884] .tw-inline-flex{height:40px!important;max-height:40px!important;min-height:40px!important}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import B from "graphql-tag";
|
|
2
2
|
import E from "numeral";
|
|
3
3
|
import { mdiMapMarker as O, mdiHome as D } from "@mdi/js";
|
|
4
4
|
import { LOAN_CALLOUTS_FRAGMENT as S, LOAN_GEOCODE_FRAGMENT as G, LOAN_PROGRESS_FRAGMENT as V, loanCardComputedProperties as U, loanCardMethods as I } from "../utils/loanCard.js";
|
|
@@ -12,10 +12,10 @@ import $, { KV_LOAN_TAG_FRAGMENT as ee } from "./KvLoanTag.js";
|
|
|
12
12
|
import te from "./KvMaterialIcon.js";
|
|
13
13
|
import oe from "./KvLoadingPlaceholder.js";
|
|
14
14
|
import ae from "./KvLoanTeamPick.js";
|
|
15
|
-
import { resolveComponent as
|
|
15
|
+
import { resolveComponent as d, openBlock as n, createElementBlock as m, createElementVNode as r, createBlock as s, resolveDynamicComponent as u, withCtx as f, createVNode as c, createCommentVNode as L, Fragment as b, renderList as ne, normalizeClass as x } from "vue";
|
|
16
16
|
import "./KvCompactLoanCard.css";
|
|
17
17
|
import le from "../_virtual/_plugin-vue_export-helper.js";
|
|
18
|
-
const Oe =
|
|
18
|
+
const Oe = B`
|
|
19
19
|
fragment KvCompactLoanCard on LoanBasic {
|
|
20
20
|
id
|
|
21
21
|
image {
|
|
@@ -43,7 +43,7 @@ const Oe = p`
|
|
|
43
43
|
${S}
|
|
44
44
|
${G}
|
|
45
45
|
${V}
|
|
46
|
-
`, De =
|
|
46
|
+
`, De = B`
|
|
47
47
|
fragment KvCompactLoanCardUser on LoanBasic {
|
|
48
48
|
id
|
|
49
49
|
...KvLendCtaUser
|
|
@@ -175,51 +175,51 @@ const Oe = p`
|
|
|
175
175
|
const {
|
|
176
176
|
allDataLoaded: t,
|
|
177
177
|
borrowerName: e,
|
|
178
|
-
city:
|
|
179
|
-
countryName:
|
|
180
|
-
distributionModel:
|
|
181
|
-
formattedLocation:
|
|
182
|
-
fundraisingPercent:
|
|
183
|
-
hasProgressData:
|
|
184
|
-
imageHash:
|
|
185
|
-
isLoading:
|
|
186
|
-
loanAmount:
|
|
178
|
+
city: C,
|
|
179
|
+
countryName: A,
|
|
180
|
+
distributionModel: w,
|
|
181
|
+
formattedLocation: g,
|
|
182
|
+
fundraisingPercent: i,
|
|
183
|
+
hasProgressData: h,
|
|
184
|
+
imageHash: v,
|
|
185
|
+
isLoading: k,
|
|
186
|
+
loanAmount: _,
|
|
187
187
|
loanBorrowerCount: a,
|
|
188
|
-
loanCallouts:
|
|
189
|
-
loanStatus:
|
|
188
|
+
loanCallouts: y,
|
|
189
|
+
loanStatus: M,
|
|
190
190
|
loanUse: N,
|
|
191
191
|
readMorePath: T,
|
|
192
|
-
state:
|
|
193
|
-
tag:
|
|
194
|
-
unreservedAmount:
|
|
195
|
-
sharesAvailable:
|
|
192
|
+
state: P,
|
|
193
|
+
tag: p,
|
|
194
|
+
unreservedAmount: K,
|
|
195
|
+
sharesAvailable: R
|
|
196
196
|
} = U(l), {
|
|
197
|
-
clickReadMore:
|
|
197
|
+
clickReadMore: F
|
|
198
198
|
} = I(l, o);
|
|
199
199
|
return {
|
|
200
200
|
allDataLoaded: t,
|
|
201
201
|
borrowerName: e,
|
|
202
|
-
city:
|
|
203
|
-
countryName:
|
|
204
|
-
distributionModel:
|
|
205
|
-
formattedLocation:
|
|
206
|
-
fundraisingPercent:
|
|
207
|
-
hasProgressData:
|
|
208
|
-
imageHash:
|
|
209
|
-
isLoading:
|
|
210
|
-
loanAmount:
|
|
202
|
+
city: C,
|
|
203
|
+
countryName: A,
|
|
204
|
+
distributionModel: w,
|
|
205
|
+
formattedLocation: g,
|
|
206
|
+
fundraisingPercent: i,
|
|
207
|
+
hasProgressData: h,
|
|
208
|
+
imageHash: v,
|
|
209
|
+
isLoading: k,
|
|
210
|
+
loanAmount: _,
|
|
211
211
|
loanBorrowerCount: a,
|
|
212
|
-
loanCallouts:
|
|
213
|
-
loanStatus:
|
|
212
|
+
loanCallouts: y,
|
|
213
|
+
loanStatus: M,
|
|
214
214
|
loanUse: N,
|
|
215
215
|
mdiMapMarker: O,
|
|
216
216
|
mdiHome: D,
|
|
217
217
|
readMorePath: T,
|
|
218
|
-
state:
|
|
219
|
-
tag:
|
|
220
|
-
unreservedAmount:
|
|
221
|
-
sharesAvailable:
|
|
222
|
-
clickReadMore:
|
|
218
|
+
state: P,
|
|
219
|
+
tag: p,
|
|
220
|
+
unreservedAmount: K,
|
|
221
|
+
sharesAvailable: R,
|
|
222
|
+
clickReadMore: F
|
|
223
223
|
};
|
|
224
224
|
},
|
|
225
225
|
computed: {
|
|
@@ -233,7 +233,7 @@ const Oe = p`
|
|
|
233
233
|
return E(l).format("$0,0");
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
}, se = { class: "tw-flex tw-flex-col tw-items-start tw-gap-3 tw-w-full" }, ie = { class: "tw-flex tw-items-start tw-gap-3 tw-w-full" }, de = { class: "tw-flex tw-flex-col tw-items-start tw-justify-between tw-p-1 tw-bg-white tw-rounded-md tw-shadow-lg tw-w-80" }, me = { class: "tw-flex tw-flex-col tw-items-start tw-w-full" },
|
|
236
|
+
}, se = { class: "tw-flex tw-flex-col tw-items-start tw-gap-3 tw-w-full" }, ie = { class: "tw-flex tw-items-start tw-gap-3 tw-w-full" }, de = { class: "tw-flex tw-flex-col tw-items-start tw-justify-between tw-p-1 tw-bg-white tw-rounded-md tw-shadow-lg tw-w-80" }, me = { class: "tw-flex tw-flex-col tw-items-start tw-w-full" }, ce = { class: "tw-flex tw-items-start tw-gap-2 tw-w-full loan-card-active-hover" }, ue = { class: "tw-flex-shrink-0 tw-overflow-hidden" }, fe = {
|
|
237
237
|
class: "tw-flex tw-flex-col tw-items-start tw-gap-1 tw-flex-1",
|
|
238
238
|
style: { height: "7.25rem" }
|
|
239
239
|
}, we = {
|
|
@@ -244,87 +244,109 @@ const Oe = p`
|
|
|
244
244
|
key: 1,
|
|
245
245
|
class: "loan-card-use-text tw-w-full tw-overflow-hidden"
|
|
246
246
|
}, he = { class: "tw-flex-1" }, ve = { class: "tw-flex-1 tw-min-w-0" };
|
|
247
|
-
function
|
|
248
|
-
const
|
|
249
|
-
return n(),
|
|
247
|
+
function ke(l, o, t, e, C, A) {
|
|
248
|
+
const w = d("kv-borrower-image"), g = d("kv-loan-tag"), i = d("kv-loading-placeholder"), h = d("kv-loan-use"), v = d("kv-loan-callouts"), k = d("kv-loan-progress-group"), _ = d("kv-lend-cta");
|
|
249
|
+
return n(), m("div", se, [
|
|
250
250
|
r("div", ie, [
|
|
251
251
|
r("div", de, [
|
|
252
252
|
r("div", me, [
|
|
253
|
-
r("div",
|
|
254
|
-
r("div",
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
253
|
+
r("div", ce, [
|
|
254
|
+
r("div", ue, [
|
|
255
|
+
(n(), s(u(e.tag), {
|
|
256
|
+
to: e.readMorePath,
|
|
257
|
+
href: e.readMorePath,
|
|
258
|
+
class: "tw-flex",
|
|
259
|
+
"aria-label": "Borrower image",
|
|
260
|
+
onClick: o[0] || (o[0] = (a) => e.clickReadMore("Photo", a))
|
|
261
|
+
}, {
|
|
262
|
+
default: f(() => [
|
|
263
|
+
c(w, {
|
|
264
|
+
class: "tw-bg-gray-300 tw-rounded-md tw-object-cover",
|
|
265
|
+
style: { width: "100px", height: "100px" },
|
|
266
|
+
alt: `Photo of ${e.borrowerName}`,
|
|
267
|
+
"aspect-ratio": 1,
|
|
268
|
+
"default-image": { width: 200, faceZoom: 50 },
|
|
269
|
+
hash: e.imageHash,
|
|
270
|
+
images: [{ width: 200, faceZoom: 50 }],
|
|
271
|
+
"photo-path": t.photoPath
|
|
272
|
+
}, null, 8, ["alt", "hash", "photo-path"])
|
|
273
|
+
]),
|
|
274
|
+
_: 1
|
|
275
|
+
}, 8, ["to", "href"]))
|
|
265
276
|
]),
|
|
266
277
|
r("div", fe, [
|
|
267
|
-
(n(), u(
|
|
278
|
+
(n(), s(u(e.tag), {
|
|
268
279
|
to: e.readMorePath,
|
|
269
280
|
href: e.readMorePath,
|
|
270
281
|
class: "tw-flex tw-no-underline hover:tw-no-underline focus:tw-no-underline -tw-mt-1",
|
|
271
282
|
"aria-label": "Loan tag",
|
|
272
|
-
onClick: o[
|
|
283
|
+
onClick: o[1] || (o[1] = (a) => e.clickReadMore("Tag", a))
|
|
273
284
|
}, {
|
|
274
|
-
default:
|
|
275
|
-
t.showTags && !e.isLoading ? (n(),
|
|
285
|
+
default: f(() => [
|
|
286
|
+
t.showTags && !e.isLoading ? (n(), s(g, {
|
|
276
287
|
key: 0,
|
|
277
288
|
loan: t.loan
|
|
278
|
-
}, null, 8, ["loan"])) :
|
|
289
|
+
}, null, 8, ["loan"])) : L("", !0)
|
|
279
290
|
]),
|
|
280
291
|
_: 1
|
|
281
292
|
}, 8, ["to", "href"])),
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
293
|
+
(n(), s(u(e.tag), {
|
|
294
|
+
to: e.readMorePath,
|
|
295
|
+
href: e.readMorePath,
|
|
296
|
+
class: "loan-card-use tw-no-underline tw-text-primary",
|
|
297
|
+
"aria-label": "Loan use",
|
|
298
|
+
onClick: o[2] || (o[2] = (a) => e.clickReadMore("Use", a))
|
|
299
|
+
}, {
|
|
300
|
+
default: f(() => [
|
|
301
|
+
e.isLoading ? (n(), m("div", we, [
|
|
302
|
+
(n(!0), m(b, null, ne([...Array(4)], (a, y) => (n(), m("div", {
|
|
303
|
+
key: y,
|
|
304
|
+
class: "tw-h-2 tw-mb-1"
|
|
305
|
+
}, [
|
|
306
|
+
c(i)
|
|
307
|
+
]))), 128))
|
|
308
|
+
])) : (n(), m("div", ge, [
|
|
309
|
+
c(h, {
|
|
310
|
+
use: e.loanUse,
|
|
311
|
+
"loan-amount": e.loanAmount,
|
|
312
|
+
status: e.loanStatus,
|
|
313
|
+
"borrower-count": e.loanBorrowerCount,
|
|
314
|
+
name: e.borrowerName,
|
|
315
|
+
"distribution-model": e.distributionModel,
|
|
316
|
+
class: "tw-text-small tw-leading-tight"
|
|
317
|
+
}, null, 8, ["use", "loan-amount", "status", "borrower-count", "name", "distribution-model"])
|
|
318
|
+
]))
|
|
319
|
+
]),
|
|
320
|
+
_: 1
|
|
321
|
+
}, 8, ["to", "href"]))
|
|
300
322
|
])
|
|
301
323
|
]),
|
|
302
|
-
e.isLoading || typeof e.loanCallouts > "u" ? (n(),
|
|
324
|
+
e.isLoading || typeof e.loanCallouts > "u" ? (n(), s(i, {
|
|
303
325
|
key: 0,
|
|
304
326
|
class: "tw-mt-1.5 tw-mb-1 tw-rounded-full",
|
|
305
327
|
style: { width: "60%", height: "1.5rem" }
|
|
306
|
-
})) : (n(),
|
|
328
|
+
})) : (n(), s(v, {
|
|
307
329
|
key: 1,
|
|
308
330
|
callouts: e.loanCallouts,
|
|
309
331
|
class: "tw-mt-1.5",
|
|
310
|
-
onClick: o[
|
|
332
|
+
onClick: o[3] || (o[3] = (a) => l.$emit("jump-filter-page", a))
|
|
311
333
|
}, null, 8, ["callouts"]))
|
|
312
334
|
]),
|
|
313
335
|
r("div", {
|
|
314
336
|
class: x(["tw-flex tw-items-end tw-w-full tw-mt-1", { "tw-gap-2": e.sharesAvailable }])
|
|
315
337
|
}, [
|
|
316
|
-
e.hasProgressData ? (n(),
|
|
338
|
+
e.hasProgressData ? (n(), m(b, { key: 1 }, [
|
|
317
339
|
r("div", ve, [
|
|
318
|
-
e.sharesAvailable ? (n(), u(
|
|
340
|
+
e.sharesAvailable ? (n(), s(u(e.tag), {
|
|
319
341
|
key: 0,
|
|
320
342
|
to: e.readMorePath,
|
|
321
343
|
href: e.readMorePath,
|
|
322
344
|
class: "loan-card-progress tw-no-underline tw-block",
|
|
323
345
|
"aria-label": "Loan progress",
|
|
324
|
-
onClick: o[
|
|
346
|
+
onClick: o[4] || (o[4] = (a) => e.clickReadMore("Progress", a))
|
|
325
347
|
}, {
|
|
326
|
-
default:
|
|
327
|
-
|
|
348
|
+
default: f(() => [
|
|
349
|
+
c(k, {
|
|
328
350
|
id: "loanProgress",
|
|
329
351
|
"money-left": e.unreservedAmount,
|
|
330
352
|
"progress-percent": e.fundraisingPercent,
|
|
@@ -332,13 +354,13 @@ function _e(l, o, t, e, L, b) {
|
|
|
332
354
|
}, null, 8, ["money-left", "progress-percent"])
|
|
333
355
|
]),
|
|
334
356
|
_: 1
|
|
335
|
-
}, 8, ["to", "href"])) :
|
|
357
|
+
}, 8, ["to", "href"])) : L("", !0)
|
|
336
358
|
]),
|
|
337
359
|
r("div", {
|
|
338
360
|
class: x(["tw-flex-shrink-0 loan-card-cta", { "tw-w-full": !e.sharesAvailable }]),
|
|
339
361
|
style: { height: "40px" }
|
|
340
362
|
}, [
|
|
341
|
-
|
|
363
|
+
c(_, {
|
|
342
364
|
loan: t.loan,
|
|
343
365
|
"unreserved-amount": e.unreservedAmount,
|
|
344
366
|
"basket-items": t.basketItems,
|
|
@@ -358,23 +380,23 @@ function _e(l, o, t, e, L, b) {
|
|
|
358
380
|
"primary-button-text": t.primaryButtonText,
|
|
359
381
|
"secondary-button-text": t.secondaryButtonText,
|
|
360
382
|
"secondary-button-handler": t.secondaryButtonHandler,
|
|
361
|
-
onAddToBasket: o[
|
|
362
|
-
onShowLoanDetails: o[
|
|
363
|
-
onRemoveFromBasket: o[
|
|
383
|
+
onAddToBasket: o[5] || (o[5] = (a) => l.$emit("add-to-basket", a)),
|
|
384
|
+
onShowLoanDetails: o[6] || (o[6] = (a) => e.clickReadMore("ViewLoan", a)),
|
|
385
|
+
onRemoveFromBasket: o[7] || (o[7] = (a) => l.$emit("remove-from-basket", a))
|
|
364
386
|
}, null, 8, ["loan", "unreserved-amount", "basket-items", "is-loading", "is-adding", "enable-five-dollars-notes", "five-dollars-selected", "kv-track-function", "show-view-loan", "custom-loan-details", "external-links", "route", "user-balance", "get-cookie", "set-cookie", "is-visitor", "primary-button-text", "secondary-button-text", "secondary-button-handler"])
|
|
365
387
|
], 2)
|
|
366
|
-
], 64)) : (n(),
|
|
388
|
+
], 64)) : (n(), m(b, { key: 0 }, [
|
|
367
389
|
r("div", he, [
|
|
368
|
-
|
|
390
|
+
c(i, {
|
|
369
391
|
class: "tw-mb-0.5",
|
|
370
392
|
style: { width: "11rem", height: "1rem" }
|
|
371
393
|
}),
|
|
372
|
-
|
|
394
|
+
c(i, {
|
|
373
395
|
class: "tw-rounded",
|
|
374
396
|
style: { width: "11rem", height: "0.5rem" }
|
|
375
397
|
})
|
|
376
398
|
]),
|
|
377
|
-
e.allDataLoaded ?
|
|
399
|
+
e.allDataLoaded ? L("", !0) : (n(), s(i, {
|
|
378
400
|
key: 0,
|
|
379
401
|
class: "tw-rounded tw-flex-shrink-0",
|
|
380
402
|
style: { width: "8rem", height: "2.5rem" }
|
|
@@ -385,7 +407,7 @@ function _e(l, o, t, e, L, b) {
|
|
|
385
407
|
])
|
|
386
408
|
]);
|
|
387
409
|
}
|
|
388
|
-
const Se = /* @__PURE__ */ le(re, [["render",
|
|
410
|
+
const Se = /* @__PURE__ */ le(re, [["render", ke], ["__scopeId", "data-v-92c9b884"]]);
|
|
389
411
|
export {
|
|
390
412
|
Oe as KV_COMPACT_LOAN_CARD_FRAGMENT,
|
|
391
413
|
De as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
|
package/dist/vue/KvSideSheet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toRefs as P, ref as c, reactive as Q, computed as j, onMounted as X, onBeforeUnmount as Y, onUnmounted as Z, watch as g, resolveComponent as $, openBlock as p, createElementBlock as k, normalizeClass as b, withModifiers as ee, createElementVNode as w, normalizeStyle as H, createVNode as z, createCommentVNode as x, toDisplayString as te, renderSlot as F, nextTick as
|
|
2
|
-
import { mdiArrowLeft as
|
|
1
|
+
import { toRefs as P, ref as c, reactive as Q, computed as j, onMounted as X, onBeforeUnmount as Y, onUnmounted as Z, watch as g, resolveComponent as $, openBlock as p, createElementBlock as k, normalizeClass as b, withModifiers as ee, createElementVNode as w, normalizeStyle as H, createVNode as z, createCommentVNode as x, toDisplayString as te, renderSlot as F, nextTick as ne } from "vue";
|
|
2
|
+
import { mdiArrowLeft as oe, mdiClose as ie, mdiOpenInNew as le } from "@mdi/js";
|
|
3
3
|
import se from "./KvMaterialIcon.js";
|
|
4
4
|
import ae from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const de = {
|
|
@@ -65,7 +65,7 @@ const de = {
|
|
|
65
65
|
widthDimensions: {
|
|
66
66
|
type: [String, Object],
|
|
67
67
|
default: () => ({ default: "100%", md: "50%" }),
|
|
68
|
-
validator: (
|
|
68
|
+
validator: (n) => typeof n == "string" ? /^(\d+px|[\d.]+%|auto|inherit|initial)$/.test(n) : typeof n == "object" ? Object.keys(n).every((o) => ["default", "sm", "md", "lg", "xl", "2xl"].includes(o) && /^(\d+px|[\d.]+%|auto|inherit|initial)$/.test(n[o])) : !1
|
|
69
69
|
},
|
|
70
70
|
/**
|
|
71
71
|
* Whether to hide the background of the headline section on mobile (e.g., in Borrower Profile Sidesheet)
|
|
@@ -76,14 +76,14 @@ const de = {
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
emits: ["side-sheet-closed", "go-to-link"],
|
|
79
|
-
setup(
|
|
79
|
+
setup(n, { emit: o, slots: i }) {
|
|
80
80
|
const {
|
|
81
81
|
visible: t,
|
|
82
82
|
kvTrackFunction: I,
|
|
83
83
|
trackEventCategory: M,
|
|
84
84
|
widthDimensions: l,
|
|
85
85
|
hideHeadlineBgOnMobile: d
|
|
86
|
-
} = P(
|
|
86
|
+
} = P(n), r = c(!1), a = c({}), O = c(null), m = c(null), y = c(null), _ = c(null), N = c(null), S = c(null), B = c(null), v = Q({
|
|
87
87
|
headline: 0,
|
|
88
88
|
controls: 0
|
|
89
89
|
}), V = j(() => {
|
|
@@ -98,7 +98,7 @@ const de = {
|
|
|
98
98
|
lg: 1024,
|
|
99
99
|
xl: 1280,
|
|
100
100
|
"2xl": 1536
|
|
101
|
-
}, s = N.value || window.innerWidth, f = Object.keys(l.value).filter((u) => u !== "default").sort((u, R) => e[R] - e[u]).find((u) => s >= e[u]);
|
|
101
|
+
}, s = N.value || (typeof window < "u" ? window.innerWidth : 0), f = Object.keys(l.value).filter((u) => u !== "default").sort((u, R) => e[R] - e[u]).find((u) => s >= e[u]);
|
|
102
102
|
return f ? l.value[f] : l.value.default || "100%";
|
|
103
103
|
}), A = (e, s) => {
|
|
104
104
|
let f;
|
|
@@ -106,8 +106,8 @@ const de = {
|
|
|
106
106
|
clearTimeout(f), f = setTimeout(() => e(...u), s);
|
|
107
107
|
};
|
|
108
108
|
}, C = () => {
|
|
109
|
-
_.value = window.innerHeight, N.value = window.innerWidth, setTimeout(() => {
|
|
110
|
-
|
|
109
|
+
_.value = typeof window < "u" ? window.innerHeight : 0, N.value = typeof window < "u" ? window.innerWidth : 0, setTimeout(() => {
|
|
110
|
+
ne(() => {
|
|
111
111
|
var e;
|
|
112
112
|
if (y.value) {
|
|
113
113
|
const s = y.value.getBoundingClientRect();
|
|
@@ -126,10 +126,10 @@ const de = {
|
|
|
126
126
|
r.value ? document.body.classList.add(e) : document.body.classList.remove(e);
|
|
127
127
|
}, K = () => {
|
|
128
128
|
r.value = !1, T(), I.value(M.value, "click", "side-sheet-closed"), setTimeout(() => {
|
|
129
|
-
|
|
129
|
+
o("side-sheet-closed");
|
|
130
130
|
}, 300), document.removeEventListener("keyup", L);
|
|
131
131
|
}, G = () => {
|
|
132
|
-
|
|
132
|
+
o("go-to-link");
|
|
133
133
|
}, L = (e) => {
|
|
134
134
|
(e == null ? void 0 : e.key) === "Escape" && K();
|
|
135
135
|
};
|
|
@@ -187,12 +187,12 @@ const de = {
|
|
|
187
187
|
return D.indexOf(h) - D.indexOf(J);
|
|
188
188
|
}).map((h) => `
|
|
189
189
|
@media (min-width: ${f[h]}) {
|
|
190
|
-
#side-sheet-${
|
|
190
|
+
#side-sheet-${n.trackEventCategory || "default"} {
|
|
191
191
|
width: ${l.value[h]} !important;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
`).join("");
|
|
195
|
-
s.textContent = R, O.value.id = `side-sheet-${
|
|
195
|
+
s.textContent = R, O.value.id = `side-sheet-${n.trackEventCategory || "default"}`;
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
return g(l, () => {
|
|
@@ -207,7 +207,7 @@ const de = {
|
|
|
207
207
|
sideSheetRef: O,
|
|
208
208
|
sideSheetStyles: q,
|
|
209
209
|
goToLink: G,
|
|
210
|
-
mdiArrowLeft:
|
|
210
|
+
mdiArrowLeft: oe,
|
|
211
211
|
mdiClose: ie,
|
|
212
212
|
mdiOpenInNew: le,
|
|
213
213
|
modalStyles: a,
|
|
@@ -215,7 +215,7 @@ const de = {
|
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
}, re = { class: "tw-flex tw-gap-1.5" }, ce = { key: 1 }, ue = { class: "tw-flex tw-gap-1.5" };
|
|
218
|
-
function we(
|
|
218
|
+
function we(n, o, i, t, I, M) {
|
|
219
219
|
const l = $("kv-material-icon");
|
|
220
220
|
return i.visible ? (p(), k("div", {
|
|
221
221
|
key: 0,
|
|
@@ -223,14 +223,14 @@ function we(o, n, i, t, I, M) {
|
|
|
223
223
|
"tw-bg-opacity-0 tw-delay-300": !t.open,
|
|
224
224
|
"tw-bg-opacity-low": t.open
|
|
225
225
|
}]),
|
|
226
|
-
onClick:
|
|
226
|
+
onClick: o[3] || (o[3] = ee((...d) => t.closeSideSheet && t.closeSideSheet(...d), ["self"]))
|
|
227
227
|
}, [
|
|
228
228
|
w("div", {
|
|
229
229
|
ref: "sideSheetRef",
|
|
230
230
|
class: b(["tw-fixed tw-right-0 tw-transition-all tw-duration-300 tw-bg-white", {
|
|
231
231
|
"tw-translate-x-full": !t.open,
|
|
232
232
|
"tw-translate-x-0": t.open,
|
|
233
|
-
"tw-h-full":
|
|
233
|
+
"tw-h-full": n.$slots.controls
|
|
234
234
|
}]),
|
|
235
235
|
style: H(t.sideSheetStyles)
|
|
236
236
|
}, [
|
|
@@ -250,7 +250,7 @@ function we(o, n, i, t, I, M) {
|
|
|
250
250
|
i.showBackButton ? (p(), k("button", {
|
|
251
251
|
key: 0,
|
|
252
252
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
253
|
-
onClick:
|
|
253
|
+
onClick: o[0] || (o[0] = (...d) => t.closeSideSheet && t.closeSideSheet(...d))
|
|
254
254
|
}, [
|
|
255
255
|
z(l, {
|
|
256
256
|
class: "tw-w-3 tw-h-3",
|
|
@@ -263,7 +263,7 @@ function we(o, n, i, t, I, M) {
|
|
|
263
263
|
i.showGoToLink ? (p(), k("button", {
|
|
264
264
|
key: 0,
|
|
265
265
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
266
|
-
onClick:
|
|
266
|
+
onClick: o[1] || (o[1] = (...d) => t.goToLink && t.goToLink(...d))
|
|
267
267
|
}, [
|
|
268
268
|
z(l, {
|
|
269
269
|
class: "tw-w-3 tw-h-3",
|
|
@@ -272,7 +272,7 @@ function we(o, n, i, t, I, M) {
|
|
|
272
272
|
])) : x("", !0),
|
|
273
273
|
w("button", {
|
|
274
274
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
275
|
-
onClick:
|
|
275
|
+
onClick: o[2] || (o[2] = (...d) => t.closeSideSheet && t.closeSideSheet(...d))
|
|
276
276
|
}, [
|
|
277
277
|
z(l, {
|
|
278
278
|
class: "tw-w-3 tw-h-3",
|
|
@@ -292,10 +292,10 @@ function we(o, n, i, t, I, M) {
|
|
|
292
292
|
"tw-opacity-full": t.open
|
|
293
293
|
}])
|
|
294
294
|
}, [
|
|
295
|
-
F(
|
|
295
|
+
F(n.$slots, "default")
|
|
296
296
|
], 2)
|
|
297
297
|
], 4),
|
|
298
|
-
|
|
298
|
+
n.$slots.controls ? (p(), k("div", {
|
|
299
299
|
key: 0,
|
|
300
300
|
ref: "controlsRef",
|
|
301
301
|
class: b(["tw-absolute tw-bottom-0 tw-w-full tw-border-t tw-border-tertiary tw-bg-white tw-transition-opacity tw-duration-200", {
|
|
@@ -304,7 +304,7 @@ function we(o, n, i, t, I, M) {
|
|
|
304
304
|
}]),
|
|
305
305
|
style: { "z-index": "999" }
|
|
306
306
|
}, [
|
|
307
|
-
F(
|
|
307
|
+
F(n.$slots, "controls")
|
|
308
308
|
], 2)) : x("", !0)
|
|
309
309
|
], 4)
|
|
310
310
|
], 6)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.64.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "623e3e5c52ad8622dc088341b975052412c84980"
|
|
118
118
|
}
|