@kiva/kv-components 6.45.1 → 6.46.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 +164 -162
- package/dist/vue/KvCardFrame.js +27 -27
- package/dist/vue/KvImpactVerticalSelector.js +109 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -23,89 +23,90 @@ import { default as z } from "./vue/KvExpandableQuestion.js";
|
|
|
23
23
|
import { default as q } from "./vue/KvFlag.js";
|
|
24
24
|
import { default as X } from "./vue/KvGrid.js";
|
|
25
25
|
import { default as Z } from "./vue/KvImpactDashboardHeader.js";
|
|
26
|
-
import { default as ee } from "./vue/
|
|
27
|
-
import { default as te } from "./vue/
|
|
28
|
-
import {
|
|
29
|
-
import { default as de } from "./vue/
|
|
30
|
-
import {
|
|
31
|
-
import { default as Ke } from "./vue/
|
|
32
|
-
import { default as Ae } from "./vue/
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { default as Ee } from "./vue/
|
|
36
|
-
import { default as Me } from "./vue/
|
|
37
|
-
import {
|
|
38
|
-
import { default as ge } from "./vue/
|
|
39
|
-
import {
|
|
40
|
-
import { default as Be } from "./vue/
|
|
41
|
-
import { default as ke } from "./vue/
|
|
42
|
-
import { default as be } from "./vue/
|
|
43
|
-
import { default as we } from "./vue/
|
|
44
|
-
import { default as He } from "./vue/
|
|
45
|
-
import { default as ze } from "./vue/
|
|
46
|
-
import { default as qe } from "./vue/
|
|
47
|
-
import { default as Xe } from "./vue/
|
|
48
|
-
import { default as Ze } from "./vue/
|
|
49
|
-
import { default as eo } from "./vue/
|
|
50
|
-
import { default as to } from "./vue/
|
|
51
|
-
import { default as ao } from "./vue/
|
|
52
|
-
import { default as lo } from "./vue/
|
|
53
|
-
import { default as mo } from "./vue/
|
|
54
|
-
import { default as uo } from "./vue/
|
|
55
|
-
import { default as no } from "./vue/
|
|
56
|
-
import { default as vo } from "./vue/
|
|
57
|
-
import { default as io } from "./vue/
|
|
58
|
-
import { default as _o } from "./vue/
|
|
59
|
-
import { default as No } from "./vue/
|
|
60
|
-
import { default as co } from "./vue/
|
|
61
|
-
import { default as Ro } from "./vue/
|
|
62
|
-
import { default as Oo } from "./vue/
|
|
63
|
-
import { default as Io } from "./vue/
|
|
64
|
-
import { default as go } from "./vue/
|
|
65
|
-
import { default as ho } from "./vue/
|
|
66
|
-
import { default as Vo } from "./vue/
|
|
67
|
-
import { default as Do } from "./vue/
|
|
68
|
-
import { default as yo } from "./vue/
|
|
69
|
-
import {
|
|
70
|
-
import { default as jo } from "./vue/
|
|
71
|
-
import { default as Qo } from "./vue/
|
|
72
|
-
import { default as Jo } from "./vue/
|
|
73
|
-
import { default as Yo
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
26
|
+
import { default as ee } from "./vue/KvImpactVerticalSelector.js";
|
|
27
|
+
import { default as te } from "./vue/KvInlineActivityCard.js";
|
|
28
|
+
import { default as ae } from "./vue/KvInlineActivityFeed.js";
|
|
29
|
+
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as le, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as se, default as de } from "./vue/KvIntroductionLoanCard.js";
|
|
30
|
+
import { default as pe } from "./vue/KvLendAmountButton.js";
|
|
31
|
+
import { KV_LEND_CTA_FRAGMENT as xe, KV_LEND_CTA_USER_FRAGMENT as ne, default as Ke } from "./vue/KvLendCta.js";
|
|
32
|
+
import { default as Ae } from "./vue/KvLightbox.js";
|
|
33
|
+
import { default as Ce } from "./vue/KvLineGraph.js";
|
|
34
|
+
import { KV_LOAN_ACTIVITIES_FRAGMENT as Le, default as Ne } from "./vue/KvLoanActivities.js";
|
|
35
|
+
import { KV_LOAN_BOOKMARK_FRAGMENT as ce, default as Ee } from "./vue/KvLoanBookmark.js";
|
|
36
|
+
import { default as Me } from "./vue/KvLoanCallouts.js";
|
|
37
|
+
import { default as Se } from "./vue/KvLoanProgressGroup.js";
|
|
38
|
+
import { KV_LOAN_TAG_FRAGMENT as Pe, default as ge } from "./vue/KvLoanTag.js";
|
|
39
|
+
import { default as he } from "./vue/KvLoanTeamPick.js";
|
|
40
|
+
import { KV_LOAN_USE_FRAGMENT as Ve, default as Be } from "./vue/KvLoanUse.js";
|
|
41
|
+
import { default as ke } from "./vue/KvLoadingPlaceholder.js";
|
|
42
|
+
import { default as be } from "./vue/KvLoadingSpinner.js";
|
|
43
|
+
import { default as we } from "./vue/KvMap.js";
|
|
44
|
+
import { default as He } from "./vue/KvMaterialIcon.js";
|
|
45
|
+
import { default as ze } from "./vue/KvPageContainer.js";
|
|
46
|
+
import { default as qe } from "./vue/KvPagination.js";
|
|
47
|
+
import { default as Xe } from "./vue/KvPieChart.js";
|
|
48
|
+
import { default as Ze } from "./vue/KvPill.js";
|
|
49
|
+
import { default as eo } from "./vue/KvPopper.js";
|
|
50
|
+
import { default as to } from "./vue/KvProgressBar.js";
|
|
51
|
+
import { default as ao } from "./vue/KvPulsingDot.js";
|
|
52
|
+
import { default as lo } from "./vue/KvRadio.js";
|
|
53
|
+
import { default as mo } from "./vue/KvSelect.js";
|
|
54
|
+
import { default as uo } from "./vue/KvSideSheet.js";
|
|
55
|
+
import { default as no } from "./vue/KvSwitch.js";
|
|
56
|
+
import { default as vo } from "./vue/KvTab.js";
|
|
57
|
+
import { default as io } from "./vue/KvTabPanel.js";
|
|
58
|
+
import { default as _o } from "./vue/KvTabs.js";
|
|
59
|
+
import { default as No } from "./vue/KvTextInput.js";
|
|
60
|
+
import { default as co } from "./vue/KvTextLink.js";
|
|
61
|
+
import { default as Ro } from "./vue/KvThemeProvider.js";
|
|
62
|
+
import { default as Oo } from "./vue/KvToast.js";
|
|
63
|
+
import { default as Io } from "./vue/KvTooltip.js";
|
|
64
|
+
import { default as go } from "./vue/KvTreeMapChart.js";
|
|
65
|
+
import { default as ho } from "./vue/KvUserAvatar.js";
|
|
66
|
+
import { default as Vo } from "./vue/KvUtilityMenu.js";
|
|
67
|
+
import { default as Do } from "./vue/KvVerticalCarousel.js";
|
|
68
|
+
import { default as yo } from "./vue/KvVotingCard.js";
|
|
69
|
+
import { default as Uo } from "./vue/KvVotingCardV2.js";
|
|
70
|
+
import { KV_WIDE_LOAN_CARD_FRAGMENT as Wo, KV_WIDE_LOAN_CARD_USER_FRAGMENT as Ho, default as jo } from "./vue/KvWideLoanCard.js";
|
|
71
|
+
import { default as Qo } from "./vue/KvAtbModal.js";
|
|
72
|
+
import { default as Jo } from "./vue/KvSecondaryNav.js";
|
|
73
|
+
import { default as Yo } from "./vue/KvWwwHeader.js";
|
|
74
|
+
import { default as $o, Mash as et } from "./utils/Alea.js";
|
|
75
|
+
import { useAttrs as tt } from "./utils/attrs.js";
|
|
76
|
+
import { carouselUtil as at } from "./utils/carousels.js";
|
|
77
|
+
import { collapse as lt, expand as st } from "./utils/expander.js";
|
|
78
|
+
import { isLegacyPlaceholderAvatar as mt, randomizedUserAvatarClass as pt } from "./utils/imageUtils.js";
|
|
79
|
+
import { LOAN_CALLOUTS_FRAGMENT as xt, LOAN_GEOCODE_FRAGMENT as nt, LOAN_PROGRESS_FRAGMENT as Kt, loanCardComputedProperties as vt, loanCardMethods as At } from "./utils/loanCard.js";
|
|
80
|
+
import { BALANCE_CAMPAIGN as Ct, BASE_CAMPAIGN as _t, ERL_COOKIE_NAME as Lt, NO_BALANCE_CAMPAIGN as Nt, TOP_UP_CAMPAIGN as Tt, getDropdownPriceArray as ct, getLendCtaSelectedOption as Et, isBetween25And50 as Rt, isLessThan25 as Mt } from "./utils/loanUtils.js";
|
|
81
|
+
import { animationCoordinator as St, generateMapMarkers as It, getCoordinatesBetween as Pt, getCountryColor as gt, getLoansIntervals as Gt } from "./utils/mapUtils.js";
|
|
82
|
+
import { lockPrintSingleEl as Ft, unlockPrintSingleEl as Vt } from "./utils/printing.js";
|
|
83
|
+
import { lockScroll as Dt, lockScrollSmallOnly as kt, unlockScroll as yt, unlockScrollSmallOnly as bt } from "./utils/scrollLock.js";
|
|
84
|
+
import { buildTailwindClassName as wt, headerNumberCase as Wt, kebabCase as Ht, removeObjectProperty as jt } from "./utils/themeUtils.js";
|
|
85
|
+
import { throttle as Qt } from "./utils/throttle.js";
|
|
86
|
+
import { isTargetElement as Jt, offBodyTouchstart as Xt, onBodyTouchstart as Yt } from "./utils/touchEvents.js";
|
|
87
|
+
import { getTreemap as $t } from "./utils/treemap.js";
|
|
88
|
+
import { KvBlueskyIcon as or } from "./assets/icons/bluesky.js";
|
|
88
89
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
$o as Alea,
|
|
91
|
+
Ct as BALANCE_CAMPAIGN,
|
|
92
|
+
_t as BASE_CAMPAIGN,
|
|
93
|
+
Lt as ERL_COOKIE_NAME,
|
|
93
94
|
E as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
94
95
|
R as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
le as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
|
|
97
|
+
se as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
|
|
98
|
+
xe as KV_LEND_CTA_FRAGMENT,
|
|
99
|
+
ne as KV_LEND_CTA_USER_FRAGMENT,
|
|
100
|
+
Le as KV_LOAN_ACTIVITIES_FRAGMENT,
|
|
101
|
+
ce as KV_LOAN_BOOKMARK_FRAGMENT,
|
|
102
|
+
Pe as KV_LOAN_TAG_FRAGMENT,
|
|
103
|
+
Ve as KV_LOAN_USE_FRAGMENT,
|
|
104
|
+
Wo as KV_WIDE_LOAN_CARD_FRAGMENT,
|
|
105
|
+
Ho as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
|
|
105
106
|
t as KvAccordionItem,
|
|
106
107
|
a as KvActivityRow,
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
Qo as KvAtbModal,
|
|
109
|
+
or as KvBlueskyIcon,
|
|
109
110
|
l as KvBorrowerImage,
|
|
110
111
|
d as KvButton,
|
|
111
112
|
p as KvCardFrame,
|
|
@@ -129,88 +130,89 @@ export {
|
|
|
129
130
|
q as KvFlag,
|
|
130
131
|
X as KvGrid,
|
|
131
132
|
Z as KvImpactDashboardHeader,
|
|
132
|
-
ee as
|
|
133
|
-
te as
|
|
134
|
-
|
|
135
|
-
de as
|
|
136
|
-
|
|
137
|
-
Ke as
|
|
138
|
-
Ae as
|
|
139
|
-
|
|
140
|
-
ke as
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
Ee as
|
|
144
|
-
Me as
|
|
145
|
-
|
|
146
|
-
ge as
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
we as
|
|
150
|
-
He as
|
|
151
|
-
ze as
|
|
152
|
-
qe as
|
|
153
|
-
Xe as
|
|
154
|
-
Ze as
|
|
155
|
-
eo as
|
|
156
|
-
to as
|
|
157
|
-
ao as
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
mo as
|
|
161
|
-
uo as
|
|
162
|
-
no as
|
|
163
|
-
vo as
|
|
164
|
-
io as
|
|
165
|
-
_o as
|
|
166
|
-
No as
|
|
167
|
-
co as
|
|
168
|
-
Ro as
|
|
169
|
-
Oo as
|
|
170
|
-
Io as
|
|
171
|
-
go as
|
|
172
|
-
ho as
|
|
173
|
-
Vo as
|
|
174
|
-
Do as
|
|
175
|
-
yo as
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
at as
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
jt as
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
133
|
+
ee as KvImpactVerticalSelector,
|
|
134
|
+
te as KvInlineActivityCard,
|
|
135
|
+
ae as KvInlineActivityFeed,
|
|
136
|
+
de as KvIntroductionLoanCard,
|
|
137
|
+
pe as KvLendAmountButton,
|
|
138
|
+
Ke as KvLendCta,
|
|
139
|
+
Ae as KvLightbox,
|
|
140
|
+
Ce as KvLineGraph,
|
|
141
|
+
ke as KvLoadingPlaceholder,
|
|
142
|
+
be as KvLoadingSpinner,
|
|
143
|
+
Ne as KvLoanActivities,
|
|
144
|
+
Ee as KvLoanBookmark,
|
|
145
|
+
Me as KvLoanCallouts,
|
|
146
|
+
Se as KvLoanProgressGroup,
|
|
147
|
+
ge as KvLoanTag,
|
|
148
|
+
he as KvLoanTeamPick,
|
|
149
|
+
Be as KvLoanUse,
|
|
150
|
+
we as KvMap,
|
|
151
|
+
He as KvMaterialIcon,
|
|
152
|
+
ze as KvPageContainer,
|
|
153
|
+
qe as KvPagination,
|
|
154
|
+
Xe as KvPieChart,
|
|
155
|
+
Ze as KvPill,
|
|
156
|
+
eo as KvPopper,
|
|
157
|
+
to as KvProgressBar,
|
|
158
|
+
ao as KvPulsingDot,
|
|
159
|
+
lo as KvRadio,
|
|
160
|
+
Jo as KvSecondaryNav,
|
|
161
|
+
mo as KvSelect,
|
|
162
|
+
uo as KvSideSheet,
|
|
163
|
+
no as KvSwitch,
|
|
164
|
+
vo as KvTab,
|
|
165
|
+
io as KvTabPanel,
|
|
166
|
+
_o as KvTabs,
|
|
167
|
+
No as KvTextInput,
|
|
168
|
+
co as KvTextLink,
|
|
169
|
+
Ro as KvThemeProvider,
|
|
170
|
+
Oo as KvToast,
|
|
171
|
+
Io as KvTooltip,
|
|
172
|
+
go as KvTreeMapChart,
|
|
173
|
+
ho as KvUserAvatar,
|
|
174
|
+
Vo as KvUtilityMenu,
|
|
175
|
+
Do as KvVerticalCarousel,
|
|
176
|
+
yo as KvVotingCard,
|
|
177
|
+
Uo as KvVotingCardV2,
|
|
178
|
+
jo as KvWideLoanCard,
|
|
179
|
+
Yo as KvWwwHeader,
|
|
180
|
+
xt as LOAN_CALLOUTS_FRAGMENT,
|
|
181
|
+
nt as LOAN_GEOCODE_FRAGMENT,
|
|
182
|
+
Kt as LOAN_PROGRESS_FRAGMENT,
|
|
183
|
+
et as Mash,
|
|
184
|
+
Nt as NO_BALANCE_CAMPAIGN,
|
|
185
|
+
Tt as TOP_UP_CAMPAIGN,
|
|
186
|
+
St as animationCoordinator,
|
|
187
|
+
wt as buildTailwindClassName,
|
|
188
|
+
at as carouselUtil,
|
|
189
|
+
lt as collapse,
|
|
190
|
+
st as expand,
|
|
191
|
+
It as generateMapMarkers,
|
|
192
|
+
Pt as getCoordinatesBetween,
|
|
193
|
+
gt as getCountryColor,
|
|
194
|
+
ct as getDropdownPriceArray,
|
|
195
|
+
Et as getLendCtaSelectedOption,
|
|
196
|
+
Gt as getLoansIntervals,
|
|
197
|
+
$t as getTreemap,
|
|
198
|
+
Wt as headerNumberCase,
|
|
199
|
+
Rt as isBetween25And50,
|
|
200
|
+
mt as isLegacyPlaceholderAvatar,
|
|
201
|
+
Mt as isLessThan25,
|
|
202
|
+
Jt as isTargetElement,
|
|
203
|
+
Ht as kebabCase,
|
|
204
|
+
vt as loanCardComputedProperties,
|
|
205
|
+
At as loanCardMethods,
|
|
206
|
+
Ft as lockPrintSingleEl,
|
|
207
|
+
Dt as lockScroll,
|
|
208
|
+
kt as lockScrollSmallOnly,
|
|
209
|
+
Xt as offBodyTouchstart,
|
|
210
|
+
Yt as onBodyTouchstart,
|
|
211
|
+
pt as randomizedUserAvatarClass,
|
|
212
|
+
jt as removeObjectProperty,
|
|
213
|
+
Qt as throttle,
|
|
214
|
+
Vt as unlockPrintSingleEl,
|
|
215
|
+
yt as unlockScroll,
|
|
216
|
+
bt as unlockScrollSmallOnly,
|
|
217
|
+
tt as useAttrs
|
|
216
218
|
};
|
package/dist/vue/KvCardFrame.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { defaultTheme as
|
|
1
|
+
import { computed as n, resolveComponent as d, openBlock as i, createBlock as m, normalizeClass as r, withCtx as h, createElementVNode as u, renderSlot as c } from "vue";
|
|
2
|
+
import { defaultTheme as a, stoneDarkTheme as f, stoneLightTheme as g, marigoldLightTheme as v, greenLightTheme as p, greenDarkTheme as w } from "@kiva/kv-tokens";
|
|
3
3
|
import C from "./KvThemeProvider.js";
|
|
4
4
|
import k from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const _ = {
|
|
@@ -30,7 +30,7 @@ const _ = {
|
|
|
30
30
|
theme: {
|
|
31
31
|
type: String,
|
|
32
32
|
default: "default",
|
|
33
|
-
validator(
|
|
33
|
+
validator(t) {
|
|
34
34
|
return [
|
|
35
35
|
"default",
|
|
36
36
|
"greenLight",
|
|
@@ -38,53 +38,53 @@ const _ = {
|
|
|
38
38
|
"marigoldLight",
|
|
39
39
|
"stoneLight",
|
|
40
40
|
"stoneDark"
|
|
41
|
-
].includes(
|
|
41
|
+
].includes(t);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
setup(
|
|
46
|
-
return { themeStyle:
|
|
47
|
-
switch (
|
|
45
|
+
setup(t) {
|
|
46
|
+
return { themeStyle: n(() => {
|
|
47
|
+
switch (t.theme) {
|
|
48
48
|
case "default":
|
|
49
|
-
return
|
|
49
|
+
return a;
|
|
50
50
|
case "greenDark":
|
|
51
51
|
return w;
|
|
52
52
|
case "greenLight":
|
|
53
|
-
return v;
|
|
54
|
-
case "marigoldLight":
|
|
55
53
|
return p;
|
|
54
|
+
case "marigoldLight":
|
|
55
|
+
return v;
|
|
56
56
|
case "stoneLight":
|
|
57
57
|
return g;
|
|
58
58
|
case "stoneDark":
|
|
59
59
|
return f;
|
|
60
60
|
default:
|
|
61
|
-
return
|
|
61
|
+
return a;
|
|
62
62
|
}
|
|
63
63
|
}) };
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
function y(
|
|
67
|
-
const
|
|
68
|
-
return
|
|
69
|
-
theme:
|
|
70
|
-
class: "kv-card-frame-theme-provider"
|
|
66
|
+
function y(t, o, e, s, L, S) {
|
|
67
|
+
const l = d("kv-theme-provider");
|
|
68
|
+
return i(), m(l, {
|
|
69
|
+
theme: s.themeStyle,
|
|
70
|
+
class: r(["kv-card-frame-theme-provider", e.radiusClass])
|
|
71
71
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
74
|
-
class:
|
|
75
|
-
"kv-card-frame",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{ "tw-overflow-hidden": !
|
|
72
|
+
default: h(() => [
|
|
73
|
+
u("div", {
|
|
74
|
+
class: r([
|
|
75
|
+
"kv-card-frame tw-h-full",
|
|
76
|
+
e.bgColorClass,
|
|
77
|
+
e.radiusClass,
|
|
78
|
+
e.shadowClass,
|
|
79
|
+
e.borderClass,
|
|
80
|
+
{ "tw-overflow-hidden": !e.allowOverflow }
|
|
81
81
|
])
|
|
82
82
|
}, [
|
|
83
|
-
c(
|
|
83
|
+
c(t.$slots, "default")
|
|
84
84
|
], 2)
|
|
85
85
|
]),
|
|
86
86
|
_: 3
|
|
87
|
-
}, 8, ["theme"]);
|
|
87
|
+
}, 8, ["theme", "class"]);
|
|
88
88
|
}
|
|
89
89
|
const B = /* @__PURE__ */ k(_, [["render", y]]);
|
|
90
90
|
export {
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ref as E, onMounted as N, computed as y, resolveComponent as x, openBlock as r, createElementBlock as d, createElementVNode as o, Fragment as B, renderList as K, createBlock as I, withCtx as V, createCommentVNode as L, toDisplayString as S } from "vue";
|
|
2
|
+
import W from "./KvCardFrame.js";
|
|
3
|
+
import A from "./KvContentfulImg.js";
|
|
4
|
+
import D from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const F = {
|
|
6
|
+
components: {
|
|
7
|
+
KvCardFrame: W,
|
|
8
|
+
KvContentfulImg: A
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
// Expects an array of categories from our API
|
|
12
|
+
categoryList: {
|
|
13
|
+
type: Array,
|
|
14
|
+
default: () => []
|
|
15
|
+
},
|
|
16
|
+
// Expects a list of category ids to hide from the selector
|
|
17
|
+
hiddenCategories: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: () => []
|
|
20
|
+
},
|
|
21
|
+
imageWidth: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 64
|
|
24
|
+
},
|
|
25
|
+
// Category id to pre-select when component mounts
|
|
26
|
+
preSelectedCategory: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: null
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
emits: ["category-selected"],
|
|
32
|
+
setup(l, { emit: u }) {
|
|
33
|
+
const s = E(null), n = (e) => {
|
|
34
|
+
s.value = e, u("category-selected", e);
|
|
35
|
+
};
|
|
36
|
+
N(() => {
|
|
37
|
+
l.preSelectedCategory && n(l.preSelectedCategory);
|
|
38
|
+
});
|
|
39
|
+
const f = (e) => {
|
|
40
|
+
var i, t, c, _, h, g, C, p, k;
|
|
41
|
+
if (e.contentfulEntry) {
|
|
42
|
+
const a = (_ = (c = (t = (i = e == null ? void 0 : e.contentfulEntry) == null ? void 0 : i.entry) == null ? void 0 : t.fields) == null ? void 0 : c.content) == null ? void 0 : _.find(
|
|
43
|
+
(m) => {
|
|
44
|
+
var v, b;
|
|
45
|
+
return (b = (v = m == null ? void 0 : m.fields) == null ? void 0 : v.key) == null ? void 0 : b.includes("category-icon");
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
return ((k = (p = (C = (g = (h = a == null ? void 0 : a.fields) == null ? void 0 : h.contentLight) == null ? void 0 : g[0]) == null ? void 0 : C.fields) == null ? void 0 : p.file) == null ? void 0 : k.url) ?? null;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}, w = y(() => !l.categoryList || l.categoryList.length === 0 ? [] : l.categoryList.filter((e) => !l.hiddenCategories.includes(e.id)).map((e) => ({
|
|
52
|
+
id: e.id,
|
|
53
|
+
name: e.name,
|
|
54
|
+
description: e.description,
|
|
55
|
+
customImage: e.customImage || null,
|
|
56
|
+
contentfulImage: f(e) || null
|
|
57
|
+
})));
|
|
58
|
+
return {
|
|
59
|
+
selectedCategory: s,
|
|
60
|
+
formattedCategories: w,
|
|
61
|
+
selectCategory: n
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}, M = { class: "tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3" }, j = { class: "tw-p-2 tw-flex tw-flex-row md:tw-flex-col tw-items-center tw-cursor-pointer" }, q = ["alt", "src", "width"], z = { class: "md:tw-text-center" }, G = { class: "tw-mb-0.5 tw-font-medium" }, H = { class: "tw-text-small" }, J = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "tw-text-gray-500 tw-italic"
|
|
67
|
+
};
|
|
68
|
+
function O(l, u, s, n, f, w) {
|
|
69
|
+
const e = x("kv-contentful-img"), i = x("kv-card-frame");
|
|
70
|
+
return r(), d("div", null, [
|
|
71
|
+
o("div", M, [
|
|
72
|
+
(r(!0), d(B, null, K(n.formattedCategories, (t) => (r(), I(i, {
|
|
73
|
+
key: t.id,
|
|
74
|
+
"bg-color-class": n.selectedCategory === t.id ? "tw-bg-secondary" : "tw-bg-white",
|
|
75
|
+
"border-class": n.selectedCategory === t.id ? "tw-border-2 tw-border-action" : "tw-border-2 tw-border-transparent",
|
|
76
|
+
class: "tw-transition-all tw-duration-200 hover:tw-shadow-lg",
|
|
77
|
+
onClick: (c) => n.selectCategory(t.id)
|
|
78
|
+
}, {
|
|
79
|
+
default: V(() => [
|
|
80
|
+
o("div", j, [
|
|
81
|
+
t != null && t.contentfulImage ? (r(), I(e, {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "tw-shrink-0 tw-mr-2 md:tw-mr-0 md:tw-mb-2",
|
|
84
|
+
alt: `${t.name} image`,
|
|
85
|
+
"contentful-src": t.contentfulImage,
|
|
86
|
+
width: s.imageWidth
|
|
87
|
+
}, null, 8, ["alt", "contentful-src", "width"])) : t != null && t.customImage ? (r(), d("img", {
|
|
88
|
+
key: 1,
|
|
89
|
+
class: "tw-shrink-0 tw-mr-2 md:tw-mr-0 md:tw-mb-2",
|
|
90
|
+
alt: `${t.name} image`,
|
|
91
|
+
src: t.customImage,
|
|
92
|
+
width: s.imageWidth
|
|
93
|
+
}, null, 8, q)) : L("", !0),
|
|
94
|
+
o("div", z, [
|
|
95
|
+
o("p", G, S(t.name), 1),
|
|
96
|
+
o("p", H, S(t.description), 1)
|
|
97
|
+
])
|
|
98
|
+
])
|
|
99
|
+
]),
|
|
100
|
+
_: 2
|
|
101
|
+
}, 1032, ["bg-color-class", "border-class", "onClick"]))), 128))
|
|
102
|
+
]),
|
|
103
|
+
n.formattedCategories.length === 0 ? (r(), d("p", J, " No categories available ")) : L("", !0)
|
|
104
|
+
]);
|
|
105
|
+
}
|
|
106
|
+
const U = /* @__PURE__ */ D(F, [["render", O]]);
|
|
107
|
+
export {
|
|
108
|
+
U as default
|
|
109
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.46.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@babel/preset-env": "^7.24.8",
|
|
22
22
|
"@babel/preset-react": "^7.24.7",
|
|
23
23
|
"@babel/preset-typescript": "^7.24.7",
|
|
24
|
-
"@kiva/kv-tokens": "^3.
|
|
24
|
+
"@kiva/kv-tokens": "^3.4.0",
|
|
25
25
|
"@kiva/vite-plugin-vue-lib-css": "^2.0.0",
|
|
26
26
|
"@laynezh/vite-plugin-lib-assets": "^0.6.1",
|
|
27
27
|
"@mdi/js": "^7.4.47",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"embla-carousel-fade",
|
|
115
115
|
"popper.js"
|
|
116
116
|
],
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "10e63d7a940721ead5070aff7d1b4f6fb45aa58d"
|
|
118
118
|
}
|