@kiva/kv-components 6.25.0 → 6.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +79 -77
- package/dist/vue/KvSecondaryNav.css +1 -0
- package/dist/vue/KvSecondaryNav.js +145 -0
- package/dist/vue/KvSideSheet.js +141 -133
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as r } from "./vue/KvAccordionItem.js";
|
|
2
2
|
import { default as a } from "./vue/KvActivityRow.js";
|
|
3
3
|
import { default as l } from "./vue/KvBorrowerImage.js";
|
|
4
4
|
import { default as d } from "./vue/KvButton.js";
|
|
@@ -7,10 +7,10 @@ import { default as x } from "./vue/KvCartModal.js";
|
|
|
7
7
|
import { default as K } from "./vue/KvCartPill.js";
|
|
8
8
|
import { default as A } from "./vue/KvCheckbox.js";
|
|
9
9
|
import { default as C } from "./vue/KvChip.js";
|
|
10
|
-
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as L, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as
|
|
10
|
+
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as L, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as N, default as T } from "./vue/KvClassicLoanCard.js";
|
|
11
11
|
import { default as c } from "./vue/KvCommentsAdd.js";
|
|
12
12
|
import { default as O } from "./vue/KvCommentsContainer.js";
|
|
13
|
-
import { default as
|
|
13
|
+
import { default as S } from "./vue/KvCommentsHeartButton.js";
|
|
14
14
|
import { default as G } from "./vue/KvCommentsList.js";
|
|
15
15
|
import { default as P } from "./vue/KvCommentsListItem.js";
|
|
16
16
|
import { default as F } from "./vue/KvCommentsReplyButton.js";
|
|
@@ -23,7 +23,7 @@ import { default as z } from "./vue/KvGrid.js";
|
|
|
23
23
|
import { default as q } from "./vue/KvImpactDashboardHeader.js";
|
|
24
24
|
import { default as X } from "./vue/KvInlineActivityCard.js";
|
|
25
25
|
import { default as Z } from "./vue/KvInlineActivityFeed.js";
|
|
26
|
-
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as ee, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as oe, default as
|
|
26
|
+
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as ee, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as oe, default as re } from "./vue/KvIntroductionLoanCard.js";
|
|
27
27
|
import { default as ae } from "./vue/KvLendAmountButton.js";
|
|
28
28
|
import { KV_LEND_CTA_FRAGMENT as le, KV_LEND_CTA_USER_FRAGMENT as se, default as de } from "./vue/KvLendCta.js";
|
|
29
29
|
import { default as pe } from "./vue/KvLightbox.js";
|
|
@@ -31,10 +31,10 @@ import { default as xe } from "./vue/KvLineGraph.js";
|
|
|
31
31
|
import { KV_LOAN_ACTIVITIES_FRAGMENT as Ke, default as ve } from "./vue/KvLoanActivities.js";
|
|
32
32
|
import { KV_LOAN_BOOKMARK_FRAGMENT as ie, default as Ce } from "./vue/KvLoanBookmark.js";
|
|
33
33
|
import { default as Le } from "./vue/KvLoanCallouts.js";
|
|
34
|
-
import { default as
|
|
34
|
+
import { default as Te } from "./vue/KvLoanProgressGroup.js";
|
|
35
35
|
import { KV_LOAN_TAG_FRAGMENT as ce, default as Re } from "./vue/KvLoanTag.js";
|
|
36
36
|
import { default as Me } from "./vue/KvLoanTeamPick.js";
|
|
37
|
-
import { KV_LOAN_USE_FRAGMENT as
|
|
37
|
+
import { KV_LOAN_USE_FRAGMENT as Ie, default as Ge } from "./vue/KvLoanUse.js";
|
|
38
38
|
import { default as Pe } from "./vue/KvLoadingPlaceholder.js";
|
|
39
39
|
import { default as Fe } from "./vue/KvLoadingSpinner.js";
|
|
40
40
|
import { default as Be } from "./vue/KvMap.js";
|
|
@@ -47,7 +47,7 @@ import { default as qe } from "./vue/KvProgressBar.js";
|
|
|
47
47
|
import { default as Xe } from "./vue/KvRadio.js";
|
|
48
48
|
import { default as Ze } from "./vue/KvSelect.js";
|
|
49
49
|
import { default as eo } from "./vue/KvSideSheet.js";
|
|
50
|
-
import { default as
|
|
50
|
+
import { default as ro } from "./vue/KvSwitch.js";
|
|
51
51
|
import { default as ao } from "./vue/KvTab.js";
|
|
52
52
|
import { default as lo } from "./vue/KvTabPanel.js";
|
|
53
53
|
import { default as mo } from "./vue/KvTabs.js";
|
|
@@ -56,35 +56,36 @@ import { default as no } from "./vue/KvTextLink.js";
|
|
|
56
56
|
import { default as vo } from "./vue/KvThemeProvider.js";
|
|
57
57
|
import { default as io } from "./vue/KvToast.js";
|
|
58
58
|
import { default as _o } from "./vue/KvTooltip.js";
|
|
59
|
-
import { default as
|
|
59
|
+
import { default as No } from "./vue/KvTreeMapChart.js";
|
|
60
60
|
import { default as Eo } from "./vue/KvUserAvatar.js";
|
|
61
61
|
import { default as Ro } from "./vue/KvVerticalCarousel.js";
|
|
62
62
|
import { default as Mo } from "./vue/KvVotingCard.js";
|
|
63
|
-
import { default as
|
|
63
|
+
import { default as Io } from "./vue/KvVotingCardV2.js";
|
|
64
64
|
import { KV_WIDE_LOAN_CARD_FRAGMENT as go, KV_WIDE_LOAN_CARD_USER_FRAGMENT as Po, default as ho } from "./vue/KvWideLoanCard.js";
|
|
65
65
|
import { default as Vo } from "./vue/KvAtbModal.js";
|
|
66
|
-
import { default as Do
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
66
|
+
import { default as Do } from "./vue/KvSecondaryNav.js";
|
|
67
|
+
import { default as ko, Mash as yo } from "./utils/Alea.js";
|
|
68
|
+
import { useAttrs as wo } from "./utils/attrs.js";
|
|
69
|
+
import { carouselUtil as Ho } from "./utils/carousels.js";
|
|
70
|
+
import { collapse as zo, expand as Qo } from "./utils/expander.js";
|
|
71
|
+
import { isLegacyPlaceholderAvatar as Jo, randomizedUserAvatarClass as Xo } from "./utils/imageUtils.js";
|
|
72
|
+
import { LOAN_CALLOUTS_FRAGMENT as Zo, LOAN_GEOCODE_FRAGMENT as $o, LOAN_PROGRESS_FRAGMENT as er, loanCardComputedProperties as or, loanCardMethods as rr } from "./utils/loanCard.js";
|
|
73
|
+
import { BALANCE_CAMPAIGN as ar, BASE_CAMPAIGN as fr, ERL_COOKIE_NAME as lr, NO_BALANCE_CAMPAIGN as sr, TOP_UP_CAMPAIGN as dr, getDropdownPriceArray as mr, getLendCtaSelectedOption as pr, isBetween25And50 as ur, isLessThan25 as xr } from "./utils/loanUtils.js";
|
|
74
|
+
import { animationCoordinator as Kr, generateMapMarkers as vr, getCoordinatesBetween as Ar, getCountryColor as ir, getLoansIntervals as Cr } from "./utils/mapUtils.js";
|
|
75
|
+
import { lockPrintSingleEl as Lr, unlockPrintSingleEl as Nr } from "./utils/printing.js";
|
|
76
|
+
import { lockScroll as Er, lockScrollSmallOnly as cr, unlockScroll as Rr, unlockScrollSmallOnly as Or } from "./utils/scrollLock.js";
|
|
77
|
+
import { buildTailwindClassName as Sr, headerNumberCase as Ir, kebabCase as Gr, removeObjectProperty as gr } from "./utils/themeUtils.js";
|
|
78
|
+
import { throttle as hr } from "./utils/throttle.js";
|
|
79
|
+
import { isTargetElement as Vr, offBodyTouchstart as Br, onBodyTouchstart as Dr } from "./utils/touchEvents.js";
|
|
80
|
+
import { getTreemap as kr } from "./utils/treemap.js";
|
|
81
|
+
import { KvBlueskyIcon as Ur } from "./assets/icons/bluesky.js";
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
ko as Alea,
|
|
84
|
+
ar as BALANCE_CAMPAIGN,
|
|
85
|
+
fr as BASE_CAMPAIGN,
|
|
86
|
+
lr as ERL_COOKIE_NAME,
|
|
86
87
|
L as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
87
|
-
|
|
88
|
+
N as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
|
88
89
|
ee as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
|
|
89
90
|
oe as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
|
|
90
91
|
le as KV_LEND_CTA_FRAGMENT,
|
|
@@ -92,13 +93,13 @@ export {
|
|
|
92
93
|
Ke as KV_LOAN_ACTIVITIES_FRAGMENT,
|
|
93
94
|
ie as KV_LOAN_BOOKMARK_FRAGMENT,
|
|
94
95
|
ce as KV_LOAN_TAG_FRAGMENT,
|
|
95
|
-
|
|
96
|
+
Ie as KV_LOAN_USE_FRAGMENT,
|
|
96
97
|
go as KV_WIDE_LOAN_CARD_FRAGMENT,
|
|
97
98
|
Po as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
|
|
98
|
-
|
|
99
|
+
r as KvAccordionItem,
|
|
99
100
|
a as KvActivityRow,
|
|
100
101
|
Vo as KvAtbModal,
|
|
101
|
-
|
|
102
|
+
Ur as KvBlueskyIcon,
|
|
102
103
|
l as KvBorrowerImage,
|
|
103
104
|
d as KvButton,
|
|
104
105
|
p as KvCarousel,
|
|
@@ -106,10 +107,10 @@ export {
|
|
|
106
107
|
K as KvCartPill,
|
|
107
108
|
A as KvCheckbox,
|
|
108
109
|
C as KvChip,
|
|
109
|
-
|
|
110
|
+
T as KvClassicLoanCard,
|
|
110
111
|
c as KvCommentsAdd,
|
|
111
112
|
O as KvCommentsContainer,
|
|
112
|
-
|
|
113
|
+
S as KvCommentsHeartButton,
|
|
113
114
|
G as KvCommentsList,
|
|
114
115
|
P as KvCommentsListItem,
|
|
115
116
|
F as KvCommentsReplyButton,
|
|
@@ -122,7 +123,7 @@ export {
|
|
|
122
123
|
q as KvImpactDashboardHeader,
|
|
123
124
|
X as KvInlineActivityCard,
|
|
124
125
|
Z as KvInlineActivityFeed,
|
|
125
|
-
|
|
126
|
+
re as KvIntroductionLoanCard,
|
|
126
127
|
ae as KvLendAmountButton,
|
|
127
128
|
de as KvLendCta,
|
|
128
129
|
pe as KvLightbox,
|
|
@@ -132,7 +133,7 @@ export {
|
|
|
132
133
|
ve as KvLoanActivities,
|
|
133
134
|
Ce as KvLoanBookmark,
|
|
134
135
|
Le as KvLoanCallouts,
|
|
135
|
-
|
|
136
|
+
Te as KvLoanProgressGroup,
|
|
136
137
|
Re as KvLoanTag,
|
|
137
138
|
Me as KvLoanTeamPick,
|
|
138
139
|
Ge as KvLoanUse,
|
|
@@ -144,9 +145,10 @@ export {
|
|
|
144
145
|
ze as KvPopper,
|
|
145
146
|
qe as KvProgressBar,
|
|
146
147
|
Xe as KvRadio,
|
|
148
|
+
Do as KvSecondaryNav,
|
|
147
149
|
Ze as KvSelect,
|
|
148
150
|
eo as KvSideSheet,
|
|
149
|
-
|
|
151
|
+
ro as KvSwitch,
|
|
150
152
|
ao as KvTab,
|
|
151
153
|
lo as KvTabPanel,
|
|
152
154
|
mo as KvTabs,
|
|
@@ -155,48 +157,48 @@ export {
|
|
|
155
157
|
vo as KvThemeProvider,
|
|
156
158
|
io as KvToast,
|
|
157
159
|
_o as KvTooltip,
|
|
158
|
-
|
|
160
|
+
No as KvTreeMapChart,
|
|
159
161
|
Eo as KvUserAvatar,
|
|
160
162
|
Ro as KvVerticalCarousel,
|
|
161
163
|
Mo as KvVotingCard,
|
|
162
|
-
|
|
164
|
+
Io as KvVotingCardV2,
|
|
163
165
|
ho as KvWideLoanCard,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
166
|
+
Zo as LOAN_CALLOUTS_FRAGMENT,
|
|
167
|
+
$o as LOAN_GEOCODE_FRAGMENT,
|
|
168
|
+
er as LOAN_PROGRESS_FRAGMENT,
|
|
169
|
+
yo as Mash,
|
|
170
|
+
sr as NO_BALANCE_CAMPAIGN,
|
|
171
|
+
dr as TOP_UP_CAMPAIGN,
|
|
172
|
+
Kr as animationCoordinator,
|
|
173
|
+
Sr as buildTailwindClassName,
|
|
174
|
+
Ho as carouselUtil,
|
|
175
|
+
zo as collapse,
|
|
176
|
+
Qo as expand,
|
|
177
|
+
vr as generateMapMarkers,
|
|
178
|
+
Ar as getCoordinatesBetween,
|
|
179
|
+
ir as getCountryColor,
|
|
180
|
+
mr as getDropdownPriceArray,
|
|
181
|
+
pr as getLendCtaSelectedOption,
|
|
182
|
+
Cr as getLoansIntervals,
|
|
183
|
+
kr as getTreemap,
|
|
184
|
+
Ir as headerNumberCase,
|
|
185
|
+
ur as isBetween25And50,
|
|
186
|
+
Jo as isLegacyPlaceholderAvatar,
|
|
187
|
+
xr as isLessThan25,
|
|
188
|
+
Vr as isTargetElement,
|
|
189
|
+
Gr as kebabCase,
|
|
190
|
+
or as loanCardComputedProperties,
|
|
191
|
+
rr as loanCardMethods,
|
|
192
|
+
Lr as lockPrintSingleEl,
|
|
193
|
+
Er as lockScroll,
|
|
194
|
+
cr as lockScrollSmallOnly,
|
|
195
|
+
Br as offBodyTouchstart,
|
|
196
|
+
Dr as onBodyTouchstart,
|
|
197
|
+
Xo as randomizedUserAvatarClass,
|
|
198
|
+
gr as removeObjectProperty,
|
|
199
|
+
hr as throttle,
|
|
200
|
+
Nr as unlockPrintSingleEl,
|
|
201
|
+
Rr as unlockScroll,
|
|
202
|
+
Or as unlockScrollSmallOnly,
|
|
203
|
+
wo as useAttrs
|
|
202
204
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kv-secondary-nav-holder[data-v-ad8fd90d]{height:62px}.kv-secondary-nav[data-v-ad8fd90d]{min-height:62px}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { toRefs as x, ref as y, computed as p, resolveComponent as m, openBlock as d, createBlock as _, withCtx as w, createElementVNode as i, normalizeClass as o, createVNode as k, createElementBlock as u, toDisplayString as b, createCommentVNode as C, Fragment as N, renderList as S, resolveDynamicComponent as j, createTextVNode as A } from "vue";
|
|
2
|
+
import { defaultTheme as O, greenDarkTheme as L } from "@kiva/kv-tokens";
|
|
3
|
+
import { mdiChevronUp as D, mdiChevronDown as E } from "@mdi/js";
|
|
4
|
+
import K from "./KvThemeProvider.js";
|
|
5
|
+
import P from "./KvMaterialIcon.js";
|
|
6
|
+
import T from "./KvPageContainer.js";
|
|
7
|
+
import "./KvSecondaryNav.css";
|
|
8
|
+
import V from "../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
const B = {
|
|
10
|
+
name: "KvSecondaryNav",
|
|
11
|
+
components: {
|
|
12
|
+
KvThemeProvider: K,
|
|
13
|
+
KvMaterialIcon: P,
|
|
14
|
+
KvPageContainer: T
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
heading: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
links: {
|
|
22
|
+
type: Array,
|
|
23
|
+
default: () => [],
|
|
24
|
+
validator(a) {
|
|
25
|
+
return a.every(
|
|
26
|
+
(r) => Object.prototype.hasOwnProperty.call(r, "text") && Object.prototype.hasOwnProperty.call(r, "href")
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
linkAlignment: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "",
|
|
33
|
+
validator(a) {
|
|
34
|
+
return ["left", "right", "center"].includes(a);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
theme: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "default",
|
|
40
|
+
validator(a) {
|
|
41
|
+
return ["default", "dark"].includes(a);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
emits: [
|
|
46
|
+
"subnavLinkClicked"
|
|
47
|
+
],
|
|
48
|
+
setup(a, { emit: r }) {
|
|
49
|
+
const {
|
|
50
|
+
heading: n,
|
|
51
|
+
linkAlignment: e,
|
|
52
|
+
theme: f
|
|
53
|
+
} = x(a), g = y(null), l = y(!1), c = p(() => e.value === "right" ? n.value && n.value.length > 0 ? "tw-justify-between" : "tw-justify-between md:tw-justify-end" : e.value === "left" ? "tw-justify-between md:tw-justify-start" : e.value === "center" ? "tw-justify-between md:tw-justify-center" : ""), s = p(() => ({
|
|
54
|
+
default: O,
|
|
55
|
+
dark: L
|
|
56
|
+
})[f.value]);
|
|
57
|
+
return {
|
|
58
|
+
navAlignmentClass: c,
|
|
59
|
+
toggleSubNavigation: () => {
|
|
60
|
+
l.value = !l.value;
|
|
61
|
+
},
|
|
62
|
+
subNavigationOpen: l,
|
|
63
|
+
mdiChevronUp: D,
|
|
64
|
+
mdiChevronDown: E,
|
|
65
|
+
subNavigation: g,
|
|
66
|
+
themeStyle: s,
|
|
67
|
+
handleLinkClick: (v) => {
|
|
68
|
+
r("subnavLinkClicked", v);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}, I = { class: "kv-secondary-nav__heading tw-text-h3" }, M = { class: "kv-secondary-nav__links tw-flex tw-flex-col md:tw-flex-row tw-items-center tw-gap-3" };
|
|
73
|
+
function z(a, r, n, e, f, g) {
|
|
74
|
+
const l = m("kv-material-icon"), c = m("kv-page-container"), s = m("kv-theme-provider");
|
|
75
|
+
return d(), _(s, {
|
|
76
|
+
theme: e.themeStyle,
|
|
77
|
+
class: "kv-tailwind"
|
|
78
|
+
}, {
|
|
79
|
+
default: w(() => [
|
|
80
|
+
i("div", {
|
|
81
|
+
class: o(["tw-z-1 tw-w-full kv-secondary-nav-holder relative tw-text-primary", n.theme === "default" ? "tw-bg-secondary" : "tw-bg-primary"])
|
|
82
|
+
}, [
|
|
83
|
+
i("div", {
|
|
84
|
+
class: o(["tw-w-full tw-overflow-x-auto kv-secondary-nav tw-absolute tw-top-0 tw-left-0 tw-right-0", n.theme === "default" ? "tw-bg-secondary" : "tw-bg-primary"])
|
|
85
|
+
}, [
|
|
86
|
+
k(c, null, {
|
|
87
|
+
default: w(() => [
|
|
88
|
+
i("div", {
|
|
89
|
+
ref: "navInner",
|
|
90
|
+
class: o(["kv-secondary-nav__inner tw-flex tw-gap-2 md:tw-gap-4 tw-items-center tw-flex-wrap tw-py-2", e.navAlignmentClass])
|
|
91
|
+
}, [
|
|
92
|
+
n.heading && n.heading.length > 0 ? (d(), u("div", {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: o(["kv-secondary-nav__heading-container", { "tw-block md:tw-hidden": n.linkAlignment === "left" || n.linkAlignment === "center" }])
|
|
95
|
+
}, [
|
|
96
|
+
i("div", I, b(n.heading), 1)
|
|
97
|
+
], 2)) : C("", !0),
|
|
98
|
+
i("button", {
|
|
99
|
+
class: "kv-secondary-nav__toggle tw-flex md:tw-hidden tw-text-primary tw-bg-transparent tw-border-none tw-cursor-pointer",
|
|
100
|
+
onClick: r[0] || (r[0] = (...t) => e.toggleSubNavigation && e.toggleSubNavigation(...t))
|
|
101
|
+
}, [
|
|
102
|
+
k(l, {
|
|
103
|
+
icon: e.subNavigationOpen ? e.mdiChevronUp : e.mdiChevronDown
|
|
104
|
+
}, null, 8, ["icon"])
|
|
105
|
+
]),
|
|
106
|
+
i("div", {
|
|
107
|
+
ref: "subNavigation",
|
|
108
|
+
class: o(["kv-secondary-nav__links-container tw-pt-1 md:tw-pt-0 md:tw-block tw-w-full md:tw-w-auto", { "tw-hidden": !e.subNavigationOpen }])
|
|
109
|
+
}, [
|
|
110
|
+
i("ul", M, [
|
|
111
|
+
(d(!0), u(N, null, S(n.links, (t, h) => (d(), u("li", {
|
|
112
|
+
key: h,
|
|
113
|
+
class: "kv-secondary-nav__link-item tw-w-full md:tw-w-auto"
|
|
114
|
+
}, [
|
|
115
|
+
(d(), _(j(t.isExternal ? "a" : "router-link"), {
|
|
116
|
+
to: t.isExternal ? void 0 : t.href,
|
|
117
|
+
href: t.isExternal ? t.href : void 0,
|
|
118
|
+
class: o(["kv-secondary-nav__link tw-py-2 md:tw-py-n tw-text-primary tw-font-medium hover:tw-underline hover:tw-text-primary", {
|
|
119
|
+
"tw-underline": t.isActive,
|
|
120
|
+
"tw-no-underline": !t.isActive
|
|
121
|
+
}]),
|
|
122
|
+
onClick: (v) => e.handleLinkClick(t)
|
|
123
|
+
}, {
|
|
124
|
+
default: w(() => [
|
|
125
|
+
A(b(t.text), 1)
|
|
126
|
+
]),
|
|
127
|
+
_: 2
|
|
128
|
+
}, 1032, ["to", "href", "class", "onClick"]))
|
|
129
|
+
]))), 128))
|
|
130
|
+
])
|
|
131
|
+
], 2)
|
|
132
|
+
], 2)
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})
|
|
136
|
+
], 2)
|
|
137
|
+
], 2)
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 8, ["theme"]);
|
|
141
|
+
}
|
|
142
|
+
const W = /* @__PURE__ */ V(B, [["render", z], ["__scopeId", "data-v-ad8fd90d"]]);
|
|
143
|
+
export {
|
|
144
|
+
W as default
|
|
145
|
+
};
|
package/dist/vue/KvSideSheet.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { toRefs as
|
|
2
|
-
import { mdiArrowLeft as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { toRefs as J, ref as f, reactive as P, computed as O, onMounted as Q, onUnmounted as C, watch as g, resolveComponent as X, openBlock as p, createElementBlock as k, normalizeClass as b, withModifiers as Y, createElementVNode as u, normalizeStyle as j, createVNode as H, createCommentVNode as x, toDisplayString as Z, renderSlot as I, nextTick as $ } from "vue";
|
|
2
|
+
import { mdiArrowLeft as ee, mdiClose as te, mdiExportVariant as oe } from "@mdi/js";
|
|
3
|
+
import ne from "./KvMaterialIcon.js";
|
|
4
|
+
import ie from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const le = {
|
|
6
6
|
name: "KvSideSheet",
|
|
7
7
|
components: {
|
|
8
|
-
KvMaterialIcon:
|
|
8
|
+
KvMaterialIcon: ne
|
|
9
9
|
},
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -65,248 +65,256 @@ const ie = {
|
|
|
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((i) => ["default", "sm", "md", "lg", "xl", "2xl"].includes(i) && /^(\d+px|[\d.]+%|auto|inherit|initial)$/.test(n[i])) : !1
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Whether to hide the background of the headline section on mobile (e.g., in Borrower Profile Sidesheet)
|
|
72
|
+
* */
|
|
73
|
+
hideHeadlineBgOnMobile: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !1
|
|
69
76
|
}
|
|
70
77
|
},
|
|
71
78
|
emits: ["side-sheet-closed", "go-to-link"],
|
|
72
|
-
setup(
|
|
79
|
+
setup(n, { emit: i, slots: l }) {
|
|
73
80
|
const {
|
|
74
81
|
visible: t,
|
|
75
|
-
kvTrackFunction:
|
|
76
|
-
trackEventCategory:
|
|
77
|
-
widthDimensions:
|
|
78
|
-
|
|
82
|
+
kvTrackFunction: z,
|
|
83
|
+
trackEventCategory: M,
|
|
84
|
+
widthDimensions: s,
|
|
85
|
+
hideHeadlineBgOnMobile: r
|
|
86
|
+
} = J(n), d = f(!1), a = f({}), E = f(null), m = f(null), y = f(null), _ = f(null), V = f(null), h = P({
|
|
79
87
|
headline: 0,
|
|
80
88
|
controls: 0
|
|
81
|
-
}),
|
|
82
|
-
const e =
|
|
89
|
+
}), N = O(() => {
|
|
90
|
+
const e = _.value - (r.value ? 0 : h.headline) - h.controls;
|
|
83
91
|
return Math.max(e, 0);
|
|
84
|
-
}),
|
|
85
|
-
if (typeof
|
|
86
|
-
return
|
|
92
|
+
}), W = O(() => {
|
|
93
|
+
if (typeof s.value == "string")
|
|
94
|
+
return s.value;
|
|
87
95
|
const e = {
|
|
88
96
|
sm: 640,
|
|
89
97
|
md: 768,
|
|
90
98
|
lg: 1024,
|
|
91
99
|
xl: 1280,
|
|
92
100
|
"2xl": 1536
|
|
93
|
-
},
|
|
94
|
-
return
|
|
95
|
-
}),
|
|
96
|
-
let
|
|
97
|
-
return (...
|
|
98
|
-
clearTimeout(
|
|
101
|
+
}, o = V.value || window.innerWidth, w = Object.keys(s.value).filter((c) => c !== "default").sort((c, L) => e[L] - e[c]).find((c) => o >= e[c]);
|
|
102
|
+
return w ? s.value[w] : s.value.default || "100%";
|
|
103
|
+
}), U = (e, o) => {
|
|
104
|
+
let w;
|
|
105
|
+
return (...c) => {
|
|
106
|
+
clearTimeout(w), w = setTimeout(() => e(...c), o);
|
|
99
107
|
};
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
}, S = () => {
|
|
109
|
+
_.value = window.innerHeight, V.value = window.innerWidth, setTimeout(() => {
|
|
110
|
+
$(() => {
|
|
103
111
|
var e;
|
|
104
|
-
if (
|
|
105
|
-
const
|
|
106
|
-
|
|
112
|
+
if (y.value) {
|
|
113
|
+
const o = y.value.getBoundingClientRect();
|
|
114
|
+
h.headline = o.height;
|
|
107
115
|
} else
|
|
108
|
-
|
|
109
|
-
if ((e =
|
|
110
|
-
const
|
|
111
|
-
|
|
116
|
+
h.headline = 0;
|
|
117
|
+
if ((e = l.controls) != null && e.call(l) && m.value) {
|
|
118
|
+
const o = m.value.getBoundingClientRect();
|
|
119
|
+
h.controls = o.height;
|
|
112
120
|
} else
|
|
113
|
-
|
|
121
|
+
h.controls = 0;
|
|
114
122
|
});
|
|
115
123
|
}, 300);
|
|
116
|
-
},
|
|
124
|
+
}, B = U(S, 100), T = () => {
|
|
117
125
|
const e = "tw-overflow-hidden";
|
|
118
|
-
|
|
126
|
+
d.value ? document.body.classList.add(e) : document.body.classList.remove(e);
|
|
119
127
|
}, K = () => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}, 300), document.removeEventListener("keyup",
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
},
|
|
128
|
+
d.value = !1, T(), z.value(M.value, "click", "side-sheet-closed"), setTimeout(() => {
|
|
129
|
+
i("side-sheet-closed");
|
|
130
|
+
}, 300), document.removeEventListener("keyup", R);
|
|
131
|
+
}, A = () => {
|
|
132
|
+
i("go-to-link");
|
|
133
|
+
}, R = (e) => {
|
|
126
134
|
(e == null ? void 0 : e.key) === "Escape" && K();
|
|
127
135
|
};
|
|
128
|
-
|
|
136
|
+
Q(() => {
|
|
129
137
|
if (setTimeout(() => {
|
|
130
|
-
|
|
131
|
-
}, 100),
|
|
132
|
-
const e = new ResizeObserver(
|
|
133
|
-
e.observe(
|
|
138
|
+
S();
|
|
139
|
+
}, 100), m.value) {
|
|
140
|
+
const e = new ResizeObserver(B);
|
|
141
|
+
e.observe(m.value), C(() => e.disconnect());
|
|
134
142
|
}
|
|
135
|
-
if (
|
|
136
|
-
const e = new ResizeObserver(
|
|
137
|
-
e.observe(
|
|
143
|
+
if (y.value) {
|
|
144
|
+
const e = new ResizeObserver(B);
|
|
145
|
+
e.observe(y.value), C(() => e.disconnect());
|
|
138
146
|
}
|
|
139
|
-
window.addEventListener("resize",
|
|
140
|
-
}),
|
|
147
|
+
window.addEventListener("resize", B), C(() => window.removeEventListener("resize", B));
|
|
148
|
+
}), g(() => {
|
|
141
149
|
var e;
|
|
142
|
-
return (e =
|
|
150
|
+
return (e = l.controls) == null ? void 0 : e.call(l);
|
|
143
151
|
}, () => {
|
|
144
152
|
setTimeout(() => {
|
|
145
|
-
|
|
153
|
+
S();
|
|
146
154
|
}, 100);
|
|
147
|
-
}, { deep: !0
|
|
148
|
-
const
|
|
149
|
-
width:
|
|
155
|
+
}, { deep: !0 });
|
|
156
|
+
const G = O(() => ({
|
|
157
|
+
width: W.value
|
|
150
158
|
}));
|
|
151
|
-
|
|
152
|
-
e ? (document.addEventListener("keyup",
|
|
153
|
-
|
|
154
|
-
}, 10)) : (
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
...
|
|
159
|
+
g(t, (e) => {
|
|
160
|
+
e ? (document.addEventListener("keyup", R), a.value = {}, setTimeout(() => {
|
|
161
|
+
d.value = !0, T(), S();
|
|
162
|
+
}, 10)) : (d.value = !1, T(), document.removeEventListener("keyup", R), a.value = {});
|
|
163
|
+
}), g(W, (e) => {
|
|
164
|
+
d.value && t.value && a.value && Object.keys(a.value).length > 0 && (a.value = {
|
|
165
|
+
...a.value,
|
|
158
166
|
width: e,
|
|
159
167
|
transition: "none"
|
|
160
168
|
// No animation for resize
|
|
161
169
|
}, setTimeout(() => {
|
|
162
|
-
|
|
163
|
-
...
|
|
170
|
+
a.value && Object.keys(a.value).length > 0 && (a.value = {
|
|
171
|
+
...a.value,
|
|
164
172
|
transition: "all 0.3s ease-in-out"
|
|
165
173
|
});
|
|
166
174
|
}, 50));
|
|
167
175
|
});
|
|
168
|
-
const
|
|
169
|
-
if (typeof
|
|
176
|
+
const D = () => {
|
|
177
|
+
if (typeof s.value == "object" && E.value) {
|
|
170
178
|
const e = "side-sheet-styles";
|
|
171
|
-
let
|
|
172
|
-
|
|
173
|
-
const
|
|
179
|
+
let o = document.getElementById(e);
|
|
180
|
+
o || (o = document.createElement("style"), o.id = e, document.head.appendChild(o));
|
|
181
|
+
const w = {
|
|
174
182
|
sm: "640px",
|
|
175
183
|
md: "768px",
|
|
176
184
|
lg: "1024px",
|
|
177
185
|
xl: "1280px",
|
|
178
186
|
"2xl": "1536px"
|
|
179
|
-
},
|
|
180
|
-
const
|
|
181
|
-
return
|
|
182
|
-
}).map((
|
|
183
|
-
@media (min-width: ${
|
|
184
|
-
#side-sheet-${
|
|
185
|
-
width: ${
|
|
187
|
+
}, L = Object.keys(s.value).filter((v) => v !== "default").sort((v, q) => {
|
|
188
|
+
const F = ["sm", "md", "lg", "xl", "2xl"];
|
|
189
|
+
return F.indexOf(v) - F.indexOf(q);
|
|
190
|
+
}).map((v) => `
|
|
191
|
+
@media (min-width: ${w[v]}) {
|
|
192
|
+
#side-sheet-${n.trackEventCategory || "default"} {
|
|
193
|
+
width: ${s.value[v]} !important;
|
|
186
194
|
}
|
|
187
195
|
}
|
|
188
196
|
`).join("");
|
|
189
|
-
|
|
190
|
-
|
|
197
|
+
o.textContent = L, E.value.id = `side-sheet-${n.trackEventCategory || "default"}`, C(() => {
|
|
198
|
+
o && o.remove();
|
|
191
199
|
});
|
|
192
200
|
}
|
|
193
201
|
};
|
|
194
|
-
return
|
|
195
|
-
|
|
196
|
-
}, { immediate: !0 }),
|
|
197
|
-
e &&
|
|
202
|
+
return g(s, () => {
|
|
203
|
+
d.value && D();
|
|
204
|
+
}, { immediate: !0 }), g(d, (e) => {
|
|
205
|
+
e && D();
|
|
198
206
|
}), {
|
|
199
207
|
closeSideSheet: K,
|
|
200
|
-
contentHeight:
|
|
201
|
-
controlsRef:
|
|
202
|
-
headlineRef:
|
|
203
|
-
sideSheetRef:
|
|
204
|
-
sideSheetStyles:
|
|
205
|
-
goToLink:
|
|
206
|
-
mdiArrowLeft:
|
|
207
|
-
mdiClose:
|
|
208
|
-
mdiExportVariant:
|
|
209
|
-
modalStyles:
|
|
210
|
-
open:
|
|
208
|
+
contentHeight: N,
|
|
209
|
+
controlsRef: m,
|
|
210
|
+
headlineRef: y,
|
|
211
|
+
sideSheetRef: E,
|
|
212
|
+
sideSheetStyles: G,
|
|
213
|
+
goToLink: A,
|
|
214
|
+
mdiArrowLeft: ee,
|
|
215
|
+
mdiClose: te,
|
|
216
|
+
mdiExportVariant: oe,
|
|
217
|
+
modalStyles: a,
|
|
218
|
+
open: d
|
|
211
219
|
};
|
|
212
220
|
}
|
|
213
|
-
},
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
return
|
|
221
|
+
}, se = { class: "tw-flex tw-gap-1.5" }, ae = { key: 1 }, re = { class: "tw-flex tw-gap-1.5" };
|
|
222
|
+
function de(n, i, l, t, z, M) {
|
|
223
|
+
const s = X("kv-material-icon");
|
|
224
|
+
return l.visible ? (p(), k("div", {
|
|
217
225
|
key: 0,
|
|
218
|
-
class:
|
|
226
|
+
class: b(["tw-block lg:tw-mt-0 tw-fixed tw-inset-0 tw-bg-black tw-transition-all md:tw-duration-150 tw-z-modal", {
|
|
219
227
|
"tw-bg-opacity-0 tw-delay-300": !t.open,
|
|
220
228
|
"tw-bg-opacity-low": t.open
|
|
221
229
|
}]),
|
|
222
|
-
onClick:
|
|
230
|
+
onClick: i[3] || (i[3] = Y((...r) => t.closeSideSheet && t.closeSideSheet(...r), ["self"]))
|
|
223
231
|
}, [
|
|
224
|
-
|
|
232
|
+
u("div", {
|
|
225
233
|
ref: "sideSheetRef",
|
|
226
|
-
class:
|
|
234
|
+
class: b(["tw-fixed tw-right-0 tw-transition-all tw-duration-300 tw-bg-white tw-overflow-y-auto", {
|
|
227
235
|
"tw-translate-x-full": !t.open,
|
|
228
236
|
"tw-translate-x-0": t.open,
|
|
229
|
-
"tw-h-full":
|
|
237
|
+
"tw-h-full": n.$slots.controls
|
|
230
238
|
}]),
|
|
231
239
|
style: j(t.sideSheetStyles)
|
|
232
240
|
}, [
|
|
233
|
-
|
|
241
|
+
u("div", {
|
|
234
242
|
class: "tw-flex tw-flex-col tw-h-full",
|
|
235
243
|
style: j(t.modalStyles)
|
|
236
244
|
}, [
|
|
237
|
-
|
|
245
|
+
u("div", {
|
|
238
246
|
ref: "headlineRef",
|
|
239
|
-
class:
|
|
247
|
+
class: b(["tw-flex tw-justify-between tw-transition-opacity tw-duration-200 tw-px-3 tw-py-2 tw-border-tertiary tw-gap-1.5", {
|
|
240
248
|
"tw-opacity-0": !t.open,
|
|
241
249
|
"tw-opacity-full": t.open,
|
|
242
|
-
"tw-border-b":
|
|
250
|
+
"tw-border-b": l.showHeadlineBorder
|
|
243
251
|
}])
|
|
244
252
|
}, [
|
|
245
|
-
|
|
246
|
-
|
|
253
|
+
u("div", se, [
|
|
254
|
+
l.showBackButton ? (p(), k("button", {
|
|
247
255
|
key: 0,
|
|
248
256
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
249
|
-
onClick:
|
|
257
|
+
onClick: i[0] || (i[0] = (...r) => t.closeSideSheet && t.closeSideSheet(...r))
|
|
250
258
|
}, [
|
|
251
|
-
|
|
259
|
+
H(s, {
|
|
252
260
|
class: "tw-w-3 tw-h-3",
|
|
253
261
|
icon: t.mdiArrowLeft
|
|
254
262
|
}, null, 8, ["icon"])
|
|
255
|
-
])) :
|
|
256
|
-
|
|
263
|
+
])) : x("", !0),
|
|
264
|
+
l.headline ? (p(), k("h3", ae, Z(l.headline), 1)) : x("", !0)
|
|
257
265
|
]),
|
|
258
|
-
|
|
259
|
-
|
|
266
|
+
u("div", re, [
|
|
267
|
+
l.showGoToLink ? (p(), k("button", {
|
|
260
268
|
key: 0,
|
|
261
269
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
262
|
-
onClick:
|
|
270
|
+
onClick: i[1] || (i[1] = (...r) => t.goToLink && t.goToLink(...r))
|
|
263
271
|
}, [
|
|
264
|
-
|
|
272
|
+
H(s, {
|
|
265
273
|
class: "tw-w-3 tw-h-3",
|
|
266
274
|
icon: t.mdiExportVariant
|
|
267
275
|
}, null, 8, ["icon"])
|
|
268
|
-
])) :
|
|
269
|
-
|
|
276
|
+
])) : x("", !0),
|
|
277
|
+
u("button", {
|
|
270
278
|
class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
|
|
271
|
-
onClick:
|
|
279
|
+
onClick: i[2] || (i[2] = (...r) => t.closeSideSheet && t.closeSideSheet(...r))
|
|
272
280
|
}, [
|
|
273
|
-
|
|
281
|
+
H(s, {
|
|
274
282
|
class: "tw-w-3 tw-h-3",
|
|
275
283
|
icon: t.mdiClose
|
|
276
284
|
}, null, 8, ["icon"])
|
|
277
285
|
])
|
|
278
286
|
])
|
|
279
287
|
], 2),
|
|
280
|
-
|
|
288
|
+
u("div", {
|
|
281
289
|
id: "sidesheet-content",
|
|
282
290
|
class: "tw-overflow-y-auto tw-overscroll-y-contain",
|
|
283
291
|
style: j({ height: t.contentHeight + "px" })
|
|
284
292
|
}, [
|
|
285
|
-
|
|
286
|
-
class:
|
|
293
|
+
u("div", {
|
|
294
|
+
class: b(["tw-px-2 tw-transition-opacity tw-duration-200", {
|
|
287
295
|
"tw-opacity-0": !t.open,
|
|
288
296
|
"tw-opacity-full": t.open
|
|
289
297
|
}])
|
|
290
298
|
}, [
|
|
291
|
-
|
|
299
|
+
I(n.$slots, "default")
|
|
292
300
|
], 2)
|
|
293
301
|
], 4),
|
|
294
|
-
|
|
302
|
+
n.$slots.controls ? (p(), k("div", {
|
|
295
303
|
key: 0,
|
|
296
304
|
ref: "controlsRef",
|
|
297
|
-
class:
|
|
305
|
+
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", {
|
|
298
306
|
"tw-opacity-0": !t.open,
|
|
299
307
|
"tw-opacity-full": t.open
|
|
300
308
|
}]),
|
|
301
309
|
style: { "z-index": "999" }
|
|
302
310
|
}, [
|
|
303
|
-
|
|
304
|
-
], 2)) :
|
|
311
|
+
I(n.$slots, "controls")
|
|
312
|
+
], 2)) : x("", !0)
|
|
305
313
|
], 4)
|
|
306
314
|
], 6)
|
|
307
|
-
], 2)) :
|
|
315
|
+
], 2)) : x("", !0);
|
|
308
316
|
}
|
|
309
|
-
const
|
|
317
|
+
const he = /* @__PURE__ */ ie(le, [["render", de]]);
|
|
310
318
|
export {
|
|
311
|
-
|
|
319
|
+
he as default
|
|
312
320
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.27.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"embla-carousel-fade",
|
|
112
112
|
"popper.js"
|
|
113
113
|
],
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "72d395ff26891027a90ad3a60728496af4007fc4"
|
|
115
115
|
}
|