@kiva/kv-components 7.6.2 → 8.0.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 (332) hide show
  1. package/.eslintignore +5 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +236 -216
  4. package/dist/utils/Alea.d.ts +9 -0
  5. package/dist/utils/Alea.js +23 -23
  6. package/dist/utils/arrayUtils.d.ts +3 -0
  7. package/dist/utils/arrayUtils.js +1 -1
  8. package/dist/utils/attrs.d.ts +6 -0
  9. package/dist/utils/carousels.d.ts +21 -0
  10. package/dist/utils/comparators.d.ts +3 -0
  11. package/dist/utils/comparators.js +20 -6
  12. package/dist/utils/debounce.d.ts +1 -0
  13. package/dist/utils/debounce.js +4 -4
  14. package/dist/utils/event.d.ts +1 -0
  15. package/dist/utils/event.js +7 -0
  16. package/dist/utils/expander.d.ts +14 -0
  17. package/dist/utils/imageUtils.d.ts +11 -0
  18. package/dist/utils/imageUtils.js +12 -12
  19. package/dist/utils/index.d.ts +21 -0
  20. package/dist/utils/loanCard.d.ts +35 -0
  21. package/dist/utils/loanCard.js +2 -2
  22. package/dist/utils/loanSearch/queryParamUtils.d.ts +1 -0
  23. package/dist/utils/loanUtils.d.ts +11 -0
  24. package/dist/utils/loanUtils.js +56 -53
  25. package/dist/utils/mapUtils.d.ts +5 -0
  26. package/dist/utils/markMatches.d.ts +1 -0
  27. package/dist/utils/paramCase.d.ts +1 -0
  28. package/dist/utils/printing.d.ts +2 -0
  29. package/dist/utils/scrollLock.d.ts +4 -0
  30. package/dist/utils/themeUtils.d.ts +12 -0
  31. package/dist/utils/throttle.d.ts +1 -0
  32. package/dist/utils/throttle.js +4 -4
  33. package/dist/utils/touchEvents.d.ts +3 -0
  34. package/dist/utils/touchEvents.js +9 -9
  35. package/dist/utils/treemap.d.ts +16 -0
  36. package/dist/utils/treemap.js +1 -1
  37. package/dist/vue/KvAccordionItem.js +28 -82
  38. package/dist/vue/KvAccordionItem.vue.d.ts +107 -0
  39. package/dist/vue/KvAccordionItem2.js +60 -0
  40. package/dist/vue/KvActivityRow.js +11 -22
  41. package/dist/vue/KvActivityRow.vue.d.ts +66 -0
  42. package/dist/vue/KvActivityRow2.js +16 -0
  43. package/dist/vue/KvAtbModal.css +1 -1
  44. package/dist/vue/KvAtbModal.js +68 -248
  45. package/dist/vue/KvAtbModal.vue.d.ts +359 -0
  46. package/dist/vue/KvAtbModal2.js +186 -0
  47. package/dist/vue/KvBorrowerImage.js +17 -118
  48. package/dist/vue/KvBorrowerImage.vue.d.ts +62 -0
  49. package/dist/vue/KvBorrowerImage2.js +106 -0
  50. package/dist/vue/KvButton.js +20 -164
  51. package/dist/vue/KvButton.vue.d.ts +94 -0
  52. package/dist/vue/KvButton2.js +149 -0
  53. package/dist/vue/KvCardFrame.js +12 -74
  54. package/dist/vue/KvCardFrame.vue.d.ts +86 -0
  55. package/dist/vue/KvCardFrame2.js +67 -0
  56. package/dist/vue/KvCarousel.css +1 -1
  57. package/dist/vue/KvCarousel.js +55 -192
  58. package/dist/vue/KvCarousel.vue.d.ts +135 -0
  59. package/dist/vue/KvCarousel2.js +142 -0
  60. package/dist/vue/KvCartModal.css +1 -1
  61. package/dist/vue/KvCartModal.js +31 -131
  62. package/dist/vue/KvCartModal.vue.d.ts +163 -0
  63. package/dist/vue/KvCartModal2.js +106 -0
  64. package/dist/vue/KvCartPill.js +12 -51
  65. package/dist/vue/KvCartPill.vue.d.ts +52 -0
  66. package/dist/vue/KvCartPill2.js +45 -0
  67. package/dist/vue/KvCheckbox.css +1 -1
  68. package/dist/vue/KvCheckbox.js +30 -126
  69. package/dist/vue/KvCheckbox.vue.d.ts +90 -0
  70. package/dist/vue/KvCheckbox2.js +102 -0
  71. package/dist/vue/KvCheckoutReceipt.css +1 -1
  72. package/dist/vue/KvCheckoutReceipt.js +120 -199
  73. package/dist/vue/KvCheckoutReceipt.vue.d.ts +164 -0
  74. package/dist/vue/KvCheckoutReceipt2.js +85 -0
  75. package/dist/vue/KvChip.js +12 -29
  76. package/dist/vue/KvChip.vue.d.ts +22 -0
  77. package/dist/vue/KvChip2.js +22 -0
  78. package/dist/vue/KvClassicLoanCard.css +1 -1
  79. package/dist/vue/KvClassicLoanCard.js +83 -351
  80. package/dist/vue/KvClassicLoanCard.vue.d.ts +2120 -0
  81. package/dist/vue/KvClassicLoanCard2.js +281 -0
  82. package/dist/vue/KvCommentsAdd.css +1 -1
  83. package/dist/vue/KvCommentsAdd.js +34 -81
  84. package/dist/vue/KvCommentsAdd.vue.d.ts +296 -0
  85. package/dist/vue/KvCommentsAdd2.js +57 -0
  86. package/dist/vue/KvCommentsContainer.js +15 -66
  87. package/dist/vue/KvCommentsContainer.vue.d.ts +954 -0
  88. package/dist/vue/KvCommentsContainer2.js +58 -0
  89. package/dist/vue/KvCommentsHeartButton.css +1 -1
  90. package/dist/vue/KvCommentsHeartButton.js +12 -51
  91. package/dist/vue/KvCommentsHeartButton.vue.d.ts +42 -0
  92. package/dist/vue/KvCommentsHeartButton2.js +44 -0
  93. package/dist/vue/KvCommentsList.js +9 -51
  94. package/dist/vue/KvCommentsList.vue.d.ts +619 -0
  95. package/dist/vue/KvCommentsList2.js +46 -0
  96. package/dist/vue/KvCommentsListItem.js +62 -186
  97. package/dist/vue/KvCommentsListItem.vue.d.ts +571 -0
  98. package/dist/vue/KvCommentsListItem2.js +135 -0
  99. package/dist/vue/KvCommentsReplyButton.css +1 -1
  100. package/dist/vue/KvCommentsReplyButton.js +8 -17
  101. package/dist/vue/KvCommentsReplyButton.vue.d.ts +98 -0
  102. package/dist/vue/KvCommentsReplyButton2.js +13 -0
  103. package/dist/vue/KvCompactLoanCard.css +1 -1
  104. package/dist/vue/KvCompactLoanCard.js +71 -327
  105. package/dist/vue/KvCompactLoanCard.vue.d.ts +1272 -0
  106. package/dist/vue/KvCompactLoanCard2.js +269 -0
  107. package/dist/vue/KvContentfulImg.js +47 -149
  108. package/dist/vue/KvContentfulImg.vue.d.ts +107 -0
  109. package/dist/vue/KvContentfulImg2.js +119 -0
  110. package/dist/vue/KvCountdownTimer.js +8 -28
  111. package/dist/vue/KvCountdownTimer.vue.d.ts +15 -0
  112. package/dist/vue/KvCountdownTimer2.js +26 -0
  113. package/dist/vue/KvDatePicker.js +21 -101
  114. package/dist/vue/KvDatePicker.vue.d.ts +58 -0
  115. package/dist/vue/KvDatePicker2.js +86 -0
  116. package/dist/vue/KvExpandable.js +9 -56
  117. package/dist/vue/KvExpandable.vue.d.ts +53 -0
  118. package/dist/vue/KvExpandable2.js +52 -0
  119. package/dist/vue/KvExpandableQuestion.js +23 -82
  120. package/dist/vue/KvExpandableQuestion.vue.d.ts +124 -0
  121. package/dist/vue/KvExpandableQuestion2.js +65 -0
  122. package/dist/vue/KvFlag.css +1 -1
  123. package/dist/vue/KvFlag.js +16 -617
  124. package/dist/vue/KvFlag.vue.d.ts +66 -0
  125. package/dist/vue/KvFlag2.js +606 -0
  126. package/dist/vue/KvGrid.js +7 -18
  127. package/dist/vue/KvGrid.vue.d.ts +14 -0
  128. package/dist/vue/KvGrid2.js +15 -0
  129. package/dist/vue/KvIconBag.js +12 -18
  130. package/dist/vue/KvIconBag.vue.d.ts +14 -0
  131. package/dist/vue/KvIconBag2.js +11 -0
  132. package/dist/vue/KvImpactDashboardHeader.vue.d.ts +17 -0
  133. package/dist/vue/KvImpactVerticalSelector.js +31 -110
  134. package/dist/vue/KvImpactVerticalSelector.vue.d.ts +278 -0
  135. package/dist/vue/KvImpactVerticalSelector2.js +85 -0
  136. package/dist/vue/KvInlineActivityCard.js +15 -44
  137. package/dist/vue/KvInlineActivityCard.vue.d.ts +71 -0
  138. package/dist/vue/KvInlineActivityCard2.js +35 -0
  139. package/dist/vue/KvInlineActivityFeed.css +1 -1
  140. package/dist/vue/KvInlineActivityFeed.js +11 -23
  141. package/dist/vue/KvInlineActivityFeed.vue.d.ts +85 -0
  142. package/dist/vue/KvInlineActivityFeed2.js +17 -0
  143. package/dist/vue/KvIntroductionLoanCard.css +1 -1
  144. package/dist/vue/KvIntroductionLoanCard.js +111 -309
  145. package/dist/vue/KvIntroductionLoanCard.vue.d.ts +617 -0
  146. package/dist/vue/KvIntroductionLoanCard2.js +209 -0
  147. package/dist/vue/KvLendAmountButton.js +9 -53
  148. package/dist/vue/KvLendAmountButton.vue.d.ts +140 -0
  149. package/dist/vue/KvLendAmountButton2.js +48 -0
  150. package/dist/vue/KvLendCta.css +1 -1
  151. package/dist/vue/KvLendCta.js +150 -530
  152. package/dist/vue/KvLendCta.vue.d.ts +583 -0
  153. package/dist/vue/KvLendCta2.js +387 -0
  154. package/dist/vue/KvLightbox.js +37 -148
  155. package/dist/vue/KvLightbox.vue.d.ts +77 -0
  156. package/dist/vue/KvLightbox2.js +117 -0
  157. package/dist/vue/KvLineGraph.js +25 -58
  158. package/dist/vue/KvLineGraph.vue.d.ts +35 -0
  159. package/dist/vue/KvLineGraph2.js +39 -0
  160. package/dist/vue/KvLoadingPlaceholder.vue.d.ts +2 -0
  161. package/dist/vue/KvLoadingSpinner.js +9 -34
  162. package/dist/vue/KvLoadingSpinner.vue.d.ts +27 -0
  163. package/dist/vue/KvLoadingSpinner2.js +29 -0
  164. package/dist/vue/KvLoanActivities.css +1 -1
  165. package/dist/vue/KvLoanActivities.js +37 -179
  166. package/dist/vue/KvLoanActivities.vue.d.ts +853 -0
  167. package/dist/vue/KvLoanActivities2.js +151 -0
  168. package/dist/vue/KvLoanBookmark.js +14 -40
  169. package/dist/vue/KvLoanBookmark.vue.d.ts +32 -0
  170. package/dist/vue/KvLoanBookmark2.js +32 -0
  171. package/dist/vue/KvLoanCallouts.css +1 -1
  172. package/dist/vue/KvLoanCallouts.js +10 -17
  173. package/dist/vue/KvLoanCallouts.vue.d.ts +18 -0
  174. package/dist/vue/KvLoanCallouts2.js +12 -0
  175. package/dist/vue/KvLoanInfoCard.js +20 -19
  176. package/dist/vue/KvLoanProgressGroup.css +1 -1
  177. package/dist/vue/KvLoanProgressGroup.js +18 -57
  178. package/dist/vue/KvLoanProgressGroup.vue.d.ts +108 -0
  179. package/dist/vue/KvLoanProgressGroup2.js +44 -0
  180. package/dist/vue/KvLoanTag.js +15 -103
  181. package/dist/vue/KvLoanTag.vue.d.ts +46 -0
  182. package/dist/vue/KvLoanTag2.js +94 -0
  183. package/dist/vue/KvLoanTeamPick.vue.d.ts +2 -0
  184. package/dist/vue/KvLoanUse.js +12 -100
  185. package/dist/vue/KvLoanUse.vue.d.ts +120 -0
  186. package/dist/vue/KvLoanUse2.js +95 -0
  187. package/dist/vue/KvLogo.vue.d.ts +2 -0
  188. package/dist/vue/KvMap.js +13 -381
  189. package/dist/vue/KvMap.vue.d.ts +213 -0
  190. package/dist/vue/KvMap2.js +376 -0
  191. package/dist/vue/KvMaterialIcon.js +10 -20
  192. package/dist/vue/KvMaterialIcon.vue.d.ts +14 -0
  193. package/dist/vue/KvMaterialIcon2.js +15 -0
  194. package/dist/vue/KvPageContainer.js +9 -8
  195. package/dist/vue/KvPageContainer.vue.d.ts +2 -0
  196. package/dist/vue/KvPageContainer2.js +4 -0
  197. package/dist/vue/KvPagination.js +38 -138
  198. package/dist/vue/KvPagination.vue.d.ts +107 -0
  199. package/dist/vue/KvPagination2.js +105 -0
  200. package/dist/vue/KvPieChart.css +1 -1
  201. package/dist/vue/KvPieChart.js +49 -128
  202. package/dist/vue/KvPieChart.vue.d.ts +47 -0
  203. package/dist/vue/KvPieChart2.js +85 -0
  204. package/dist/vue/KvPill.js +9 -19
  205. package/dist/vue/KvPill.vue.d.ts +23 -0
  206. package/dist/vue/KvPill2.js +15 -0
  207. package/dist/vue/KvPopper.js +14 -122
  208. package/dist/vue/KvPopper.vue.d.ts +80 -0
  209. package/dist/vue/KvPopper2.js +113 -0
  210. package/dist/vue/KvProgressBar.js +17 -112
  211. package/dist/vue/KvProgressBar.vue.d.ts +70 -0
  212. package/dist/vue/KvProgressBar2.js +101 -0
  213. package/dist/vue/KvPulsingDot.css +1 -1
  214. package/dist/vue/KvPulsingDot.js +11 -25
  215. package/dist/vue/KvPulsingDot.vue.d.ts +23 -0
  216. package/dist/vue/KvPulsingDot2.js +19 -0
  217. package/dist/vue/KvRadio.js +23 -106
  218. package/dist/vue/KvRadio.vue.d.ts +62 -0
  219. package/dist/vue/KvRadio2.js +89 -0
  220. package/dist/vue/KvSecondaryNav.css +1 -1
  221. package/dist/vue/KvSecondaryNav.js +46 -122
  222. package/dist/vue/KvSecondaryNav.vue.d.ts +117 -0
  223. package/dist/vue/KvSecondaryNav2.js +82 -0
  224. package/dist/vue/KvSelect.css +1 -1
  225. package/dist/vue/KvSelect.js +18 -78
  226. package/dist/vue/KvSelect.vue.d.ts +58 -0
  227. package/dist/vue/KvSelect2.js +66 -0
  228. package/dist/vue/KvSideSheet.js +44 -262
  229. package/dist/vue/KvSideSheet.vue.d.ts +136 -0
  230. package/dist/vue/KvSideSheet2.js +224 -0
  231. package/dist/vue/KvSwitch.js +23 -76
  232. package/dist/vue/KvSwitch.vue.d.ts +34 -0
  233. package/dist/vue/KvSwitch2.js +59 -0
  234. package/dist/vue/KvTab.js +15 -57
  235. package/dist/vue/KvTab.vue.d.ts +34 -0
  236. package/dist/vue/KvTab2.js +48 -0
  237. package/dist/vue/KvTabPanel.js +14 -36
  238. package/dist/vue/KvTabPanel.vue.d.ts +14 -0
  239. package/dist/vue/KvTabPanel2.js +28 -0
  240. package/dist/vue/KvTabs.js +21 -75
  241. package/dist/vue/KvTabs.vue.d.ts +22 -0
  242. package/dist/vue/KvTabs2.js +60 -0
  243. package/dist/vue/KvTextInput.js +28 -148
  244. package/dist/vue/KvTextInput.vue.d.ts +105 -0
  245. package/dist/vue/KvTextInput2.js +126 -0
  246. package/dist/vue/KvTextLink.js +13 -76
  247. package/dist/vue/KvTextLink.vue.d.ts +64 -0
  248. package/dist/vue/KvTextLink2.js +68 -0
  249. package/dist/vue/KvThemeProvider.js +8 -59
  250. package/dist/vue/KvThemeProvider.vue.d.ts +23 -0
  251. package/dist/vue/KvThemeProvider2.js +55 -0
  252. package/dist/vue/KvToast.js +32 -69
  253. package/dist/vue/KvToast.vue.d.ts +31 -0
  254. package/dist/vue/KvToast2.js +43 -0
  255. package/dist/vue/KvTooltip.css +1 -1
  256. package/dist/vue/KvTooltip.js +27 -123
  257. package/dist/vue/KvTooltip.vue.d.ts +2 -0
  258. package/dist/vue/KvTooltip2.js +103 -0
  259. package/dist/vue/KvTreeMapChart.css +1 -1
  260. package/dist/vue/KvTreeMapChart.js +28 -156
  261. package/dist/vue/KvTreeMapChart.vue.d.ts +60 -0
  262. package/dist/vue/KvTreeMapChart2.js +133 -0
  263. package/dist/vue/KvUserAvatar.js +28 -110
  264. package/dist/vue/KvUserAvatar.vue.d.ts +55 -0
  265. package/dist/vue/KvUserAvatar2.js +88 -0
  266. package/dist/vue/KvUtilityMenu.js +19 -95
  267. package/dist/vue/KvUtilityMenu.vue.d.ts +104 -0
  268. package/dist/vue/KvUtilityMenu2.js +81 -0
  269. package/dist/vue/KvVerticalCarousel.js +40 -137
  270. package/dist/vue/KvVerticalCarousel.vue.d.ts +90 -0
  271. package/dist/vue/KvVerticalCarousel2.js +103 -0
  272. package/dist/vue/KvVotingCard.css +1 -1
  273. package/dist/vue/KvVotingCard.js +31 -88
  274. package/dist/vue/KvVotingCard.vue.d.ts +249 -0
  275. package/dist/vue/KvVotingCard2.js +63 -0
  276. package/dist/vue/KvVotingCardV2.js +35 -90
  277. package/dist/vue/KvVotingCardV2.vue.d.ts +308 -0
  278. package/dist/vue/KvVotingCardV22.js +61 -0
  279. package/dist/vue/KvWideLoanCard.css +1 -1
  280. package/dist/vue/KvWideLoanCard.js +66 -274
  281. package/dist/vue/KvWideLoanCard.vue.d.ts +1191 -0
  282. package/dist/vue/KvWideLoanCard2.js +220 -0
  283. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.js +34 -38
  284. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.vue.d.ts +20 -0
  285. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu2.js +9 -0
  286. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +20 -83
  287. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.vue.d.ts +91 -0
  288. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink2.js +69 -0
  289. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.css +1 -1
  290. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +77 -248
  291. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.vue.d.ts +1071 -0
  292. package/dist/vue/KvWwwHeader/KvHeaderLinkBar2.js +178 -0
  293. package/dist/vue/KvWwwHeader/KvHeaderLogo.js +8 -12
  294. package/dist/vue/KvWwwHeader/KvHeaderLogo.vue.d.ts +4 -0
  295. package/dist/vue/KvWwwHeader/KvHeaderLogo2.js +9 -0
  296. package/dist/vue/KvWwwHeader/KvHeaderMenuLink.vue.d.ts +17 -0
  297. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.css +1 -1
  298. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +37 -91
  299. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.vue.d.ts +162 -0
  300. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu2.js +59 -0
  301. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.js +36 -58
  302. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.vue.d.ts +59 -0
  303. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu2.js +27 -0
  304. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.js +20 -24
  305. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.vue.d.ts +20 -0
  306. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu2.js +9 -0
  307. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.css +1 -1
  308. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +105 -181
  309. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.vue.d.ts +319 -0
  310. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu2.js +82 -0
  311. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.css +1 -1
  312. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +93 -173
  313. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.vue.d.ts +166 -0
  314. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu2.js +86 -0
  315. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +17 -157
  316. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.vue.d.ts +506 -0
  317. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu2.js +145 -0
  318. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.css +1 -1
  319. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.js +11 -18
  320. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.vue.d.ts +20 -0
  321. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList2.js +12 -0
  322. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.js +10 -16
  323. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.vue.d.ts +20 -0
  324. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList2.js +11 -0
  325. package/dist/vue/KvWwwHeader.css +1 -1
  326. package/dist/vue/KvWwwHeader.js +35 -148
  327. package/dist/vue/KvWwwHeader.vue.d.ts +4430 -0
  328. package/dist/vue/KvWwwHeader2.js +119 -0
  329. package/dist/vue/index.d.ts +86 -0
  330. package/package.json +35 -33
  331. package/tsconfig.json +32 -0
  332. package/vite.config.ts +84 -0
@@ -1,341 +1,170 @@
1
- import { defineAsyncComponent as h, ref as i, inject as ne, computed as T, watch as V, onMounted as te, onUnmounted as oe, resolveComponent as g, resolveDirective as ae, openBlock as d, createElementBlock as v, withDirectives as f, normalizeClass as A, withModifiers as K, createVNode as w, createBlock as R, withCtx as E, createTextVNode as b, createElementVNode as L, createCommentVNode as z, normalizeStyle as N, vShow as W, toDisplayString as le } from "vue";
2
- import { mdiAccountCircle as ie, mdiChevronDown as re, mdiMagnify as de, mdiMenu as se } from "@mdi/js";
3
- import ue from "numeral";
4
- import me from "@kiva/kv-tokens";
5
- import ce from "../KvMaterialIcon.js";
6
- import ve from "../KvIconBag.js";
7
- import fe from "./KvHeaderDropdownLink.js";
8
- import we from "../KvUserAvatar.js";
9
- import ke from "../KvLoadingPlaceholder.js";
10
- import { throttle as Me } from "../../utils/throttle.js";
11
- import { isLegacyPlaceholderAvatar as j } from "../../utils/imageUtils.js";
1
+ import D from "./KvHeaderLinkBar2.js";
2
+ import { resolveComponent as s, resolveDirective as H, openBlock as a, createElementBlock as i, withDirectives as l, normalizeClass as v, withModifiers as c, createVNode as r, createBlock as g, withCtx as k, createTextVNode as m, createElementVNode as w, createCommentVNode as y, normalizeStyle as f, vShow as h, toDisplayString as L } from "vue";
12
3
  import "./KvHeaderLinkBar.css";
13
- import ge from "../../_virtual/_plugin-vue_export-helper.js";
14
- const be = h(() => import("./KvHeaderMobileMenu.js")), F = h(() => import("./KvHeaderMyKivaMenu.js")), he = h(() => import("./LendMenu/KvLendMenu.js")), ye = h(() => import("./KvHeaderTakeActionMenu.js")), pe = h(() => import("./KvHeaderAboutMenu.js")), q = 150, k = "avatar-menu", U = "menuButton", G = { top: "-3.75rem", width: "100%" }, Te = "lendButton", Ae = "takeActionButton", Le = "aboutUsLink", Ue = {
15
- components: {
16
- KvMaterialIcon: ce,
17
- KvIconBag: ve,
18
- KvHeaderDropdownLink: fe,
19
- KvUserAvatar: we,
20
- KvLoadingPlaceholder: ke
21
- },
22
- props: {
23
- loggedIn: {
24
- type: Boolean,
25
- default: !1
26
- },
27
- basketCount: {
28
- type: Number,
29
- default: 0
30
- },
31
- openMenuItem: {
32
- type: [Object, Function],
33
- default: null
34
- },
35
- loginUrl: {
36
- type: String,
37
- default: "/ui-login"
38
- },
39
- myDashboardUrl: {
40
- type: String,
41
- default: "/mykiva"
42
- },
43
- lenderName: {
44
- type: String,
45
- default: ""
46
- },
47
- lenderImageUrl: {
48
- type: String,
49
- default: ""
50
- },
51
- isMobile: {
52
- type: Boolean,
53
- default: !1
54
- },
55
- balance: {
56
- type: Number,
57
- default: 0
58
- },
59
- isBasketDataLoading: {
60
- type: Boolean,
61
- default: !1
62
- },
63
- isUserDataLoading: {
64
- type: Boolean,
65
- default: !1
66
- }
67
- },
68
- emits: [
69
- "item-hover"
70
- ],
71
- setup(s, { emit: n }) {
72
- const o = i(null), e = i(null), x = i(null), _ = i(null), y = i(null), M = i(null), B = i(null), I = i(null), H = i(null), a = i(null), l = ne("$kvTrackEvent"), O = {
73
- [Te]: { action: "hover-Lend-menu", label: "Lend" },
74
- [Ae]: { action: "hover-Take-action-menu", label: "Take action" },
75
- [Le]: { action: "hover-About-menu", label: "About" },
76
- [U]: { action: "hover-Hamburger-menu", label: "Hamburger" },
77
- [k]: { action: "hover-Avatar-menu", label: "Avatar" }
78
- }, u = (t, m, c = null) => {
79
- n("item-hover", t, m, c);
80
- }, J = (t, m, c = null) => {
81
- if (!navigator.maxTouchPoints) {
82
- if (t && a.value !== t) {
83
- const r = O[t];
84
- r && l(
85
- "TopNav",
86
- r.action,
87
- r.label
88
- );
89
- }
90
- a.value = t, u(
91
- t,
92
- m,
93
- t === U && s.isMobile ? G : c
94
- );
95
- }
96
- }, Q = (t) => {
97
- !navigator.maxTouchPoints && a.value === t && (a.value = null, u());
98
- }, S = () => {
99
- var P;
100
- const t = (P = o.value) == null ? void 0 : P.getBoundingClientRect();
101
- if (!t) return null;
102
- const c = t.left + t.width / 2 - q / 2, r = `${window.innerWidth - c - q}px`;
103
- return {
104
- right: (window == null ? void 0 : window.innerWidth) < me.breakpoints.md ? 0 : r
105
- };
106
- }, p = () => {
107
- a.value = k, u(o.value, F, S());
108
- }, X = (t, m, c) => {
109
- if (t && a.value !== t) {
110
- const r = O[t];
111
- r && l(
112
- "TopNav",
113
- r.action,
114
- r.label
115
- );
116
- }
117
- a.value === U && (a.value = null), !a.value || a.value !== t ? (a.value = t, t === k ? p() : t === U && s.isMobile ? u(t, m, G) : u(t, m, c)) : (a.value = null, u());
118
- }, C = Me(() => {
119
- a.value === k && p();
120
- }, 100), Y = T(() => s.isMobile ? void 0 : "/lend-by-category"), D = T(() => {
121
- var t;
122
- return ((t = s.lenderImageUrl) == null ? void 0 : t.split("/").pop()) ?? "";
123
- }), Z = T(() => Math.floor(s.balance)), $ = T(() => j(D.value) || !D.value), ee = (t) => {
124
- t.target === t.currentTarget && u();
125
- };
126
- return V(
127
- () => s.isMobile,
128
- () => {
129
- a.value === k && p();
130
- }
131
- ), V(
132
- () => s.openMenuItem,
133
- (t) => {
134
- t || (a.value = null);
135
- }
136
- ), te(() => {
137
- import("./KvHeaderMobileMenu.js"), import("./KvHeaderMyKivaMenu.js"), import("./LendMenu/KvLendMenu.js"), import("./KvHeaderTakeActionMenu.js"), import("./KvHeaderAboutMenu.js"), window.addEventListener("resize", C);
138
- }), oe(() => {
139
- window.removeEventListener("resize", C);
140
- }), {
141
- AVATAR_MENU_ID: k,
142
- openMenuId: a,
143
- numeral: ue,
144
- mdiAccountCircle: ie,
145
- mdiChevronDown: re,
146
- mdiMagnify: de,
147
- mdiMenu: se,
148
- onHover: u,
149
- avatar: o,
150
- lendButton: e,
151
- aboutUsLink: x,
152
- partnerWithUsLink: _,
153
- borrowLink: y,
154
- supportKivaLink: M,
155
- basketLink: B,
156
- signInLink: I,
157
- menuButton: H,
158
- lendUrl: Y,
159
- avatarFilename: D,
160
- handleOnHover: J,
161
- handleTouchStart: X,
162
- handleMouseOut: Q,
163
- handleAvatarMenuPosition: p,
164
- KvHeaderMobileMenu: be,
165
- KvHeaderMyKivaMenu: F,
166
- KvLendMenu: he,
167
- KvHeaderTakeActionMenu: ye,
168
- KvHeaderAboutMenu: pe,
169
- isLegacyPlaceholderAvatar: j,
170
- getAvatarMenuPosition: S,
171
- handleEmptySpaceClick: ee,
172
- roundedBalance: Z,
173
- isDefaultProfilePic: $
174
- };
175
- }
176
- }, Be = ["href"], Ie = {
4
+ import B from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const U = ["href"], A = {
177
6
  ref: "avatar",
178
7
  class: "tw-cursor-pointer tw-flex tw-items-center tw-gap-1 tw-bg-eco-green-1 tw-rounded-md tw-py-0.5 md:tw-py-1 tw-px-1 md:tw-px-2"
179
- }, He = {
8
+ }, I = {
180
9
  key: 0,
181
10
  class: "tw-w-4 tw-h-3",
182
11
  style: {
183
12
  display: "var(--user-balance-loading-display, inline-block)"
184
13
  }
185
- }, De = {
14
+ }, K = {
186
15
  key: 1,
187
16
  class: "tw-text-eco-green-4"
188
- }, Ke = ["href"];
189
- function Ee(s, n, o, e, x, _) {
190
- const y = g("kv-material-icon"), M = g("KvHeaderDropdownLink"), B = g("kv-icon-bag"), I = g("KvUserAvatar"), H = g("KvLoadingPlaceholder"), a = ae("kv-track-event");
191
- return d(), v("div", {
17
+ }, O = ["href"];
18
+ function N(C, n, t, e, S, _) {
19
+ const M = s("kv-material-icon"), u = s("KvHeaderDropdownLink"), b = s("kv-icon-bag"), T = s("KvUserAvatar"), x = s("KvLoadingPlaceholder"), d = H("kv-track-event");
20
+ return a(), i("div", {
192
21
  class: "tw-h-full tw-flex tw-items-center tw-gap-0.5 md:tw-gap-2 lg:tw-gap-2.5",
193
- onTouchstart: n[10] || (n[10] = (...l) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...l))
22
+ onTouchstart: n[10] || (n[10] = (...o) => e.handleEmptySpaceClick && e.handleEmptySpaceClick(...o))
194
23
  }, [
195
- f((d(), v("button", {
24
+ l((a(), i("button", {
196
25
  ref: "menuButton",
197
- class: A(["header-link tw-inline-flex md:tw-hidden", {
198
- "tw-text-tertiary": o.openMenuItem && o.openMenuItem !== e.KvHeaderMobileMenu
26
+ class: v(["header-link tw-inline-flex md:tw-hidden", {
27
+ "tw-text-tertiary": t.openMenuItem && t.openMenuItem !== e.KvHeaderMobileMenu
199
28
  }]),
200
- onMouseover: n[0] || (n[0] = (l) => e.handleOnHover("menuButton", e.KvHeaderMobileMenu)),
201
- onMouseout: n[1] || (n[1] = (l) => e.handleMouseOut("menuButton")),
202
- onTouchstart: n[2] || (n[2] = K((l) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu), ["stop"]))
29
+ onMouseover: n[0] || (n[0] = (o) => e.handleOnHover("menuButton", e.KvHeaderMobileMenu)),
30
+ onMouseout: n[1] || (n[1] = (o) => e.handleMouseOut("menuButton")),
31
+ onTouchstart: n[2] || (n[2] = c((o) => e.handleTouchStart("menuButton", e.KvHeaderMobileMenu), ["stop"]))
203
32
  }, [
204
- w(y, { icon: e.mdiMenu }, null, 8, ["icon"])
33
+ r(M, { icon: e.mdiMenu }, null, 8, ["icon"])
205
34
  ], 34)), [
206
- [a, o.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
35
+ [d, t.openMenuItem === e.KvHeaderMobileMenu ? ["TopNav", "click-Hamburger-menu"] : null]
207
36
  ]),
208
- f((d(), R(M, {
37
+ l((a(), g(u, {
209
38
  class: "tw-py-1",
210
39
  "ref-name": "lendButton",
211
40
  href: e.lendUrl,
212
41
  "menu-component": e.KvLendMenu,
213
- "open-menu-item": o.openMenuItem,
42
+ "open-menu-item": t.openMenuItem,
214
43
  "dropdown-icon": e.mdiChevronDown,
215
44
  "base-class": "tw-inline-flex md:tw-border md:tw-rounded-md tw-px-1.5 tw-py-0.5",
216
45
  onOnHover: e.handleOnHover,
217
- onMouseleave: n[3] || (n[3] = (l) => e.handleMouseOut("lendButton")),
218
- onTouchstart: n[4] || (n[4] = K((l) => e.handleTouchStart("lendButton", e.KvLendMenu), ["stop"]))
46
+ onMouseleave: n[3] || (n[3] = (o) => e.handleMouseOut("lendButton")),
47
+ onTouchstart: n[4] || (n[4] = c((o) => e.handleTouchStart("lendButton", e.KvLendMenu), ["stop"]))
219
48
  }, {
220
- default: E(() => n[11] || (n[11] = [
221
- b(" Lend ")
49
+ default: k(() => n[11] || (n[11] = [
50
+ m(" Lend ")
222
51
  ])),
223
52
  _: 1
224
53
  }, 8, ["href", "menu-component", "open-menu-item", "dropdown-icon", "onOnHover"])), [
225
- [a, ["TopNav", "click-Lend"]]
54
+ [d, ["TopNav", "click-Lend"]]
226
55
  ]),
227
- f((d(), R(M, {
56
+ l((a(), g(u, {
228
57
  "ref-name": "takeActionButton",
229
58
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
230
59
  "menu-component": e.KvHeaderTakeActionMenu,
231
- "open-menu-item": o.openMenuItem,
60
+ "open-menu-item": t.openMenuItem,
232
61
  "dropdown-icon": e.mdiChevronDown,
233
62
  "send-link-position": "",
234
63
  onOnHover: e.handleOnHover,
235
- onMouseleave: n[5] || (n[5] = (l) => e.handleMouseOut("takeActionButton")),
64
+ onMouseleave: n[5] || (n[5] = (o) => e.handleMouseOut("takeActionButton")),
236
65
  onUserTap: e.handleTouchStart
237
66
  }, {
238
- default: E(() => n[12] || (n[12] = [
239
- b(" Take action ")
67
+ default: k(() => n[12] || (n[12] = [
68
+ m(" Take action ")
240
69
  ])),
241
70
  _: 1
242
71
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"])), [
243
- [a, ["TopNav", "click-take-action"]]
72
+ [d, ["TopNav", "click-take-action"]]
244
73
  ]),
245
- w(M, {
74
+ r(u, {
246
75
  "ref-name": "aboutUsLink",
247
76
  "data-testid": "header-about",
248
77
  "base-class": "tw-hidden md:tw-inline-flex tw-py-1",
249
78
  "menu-component": e.KvHeaderAboutMenu,
250
- "open-menu-item": o.openMenuItem,
79
+ "open-menu-item": t.openMenuItem,
251
80
  "dropdown-icon": e.mdiChevronDown,
252
81
  "send-link-position": "",
253
82
  onOnHover: e.handleOnHover,
254
- onMouseleave: n[6] || (n[6] = (l) => e.handleMouseOut("aboutUsLink")),
83
+ onMouseleave: n[6] || (n[6] = (o) => e.handleMouseOut("aboutUsLink")),
255
84
  onUserTap: e.handleTouchStart
256
85
  }, {
257
- default: E(() => n[13] || (n[13] = [
258
- b(" About ")
86
+ default: k(() => n[13] || (n[13] = [
87
+ m(" About ")
259
88
  ])),
260
89
  _: 1
261
90
  }, 8, ["menu-component", "open-menu-item", "dropdown-icon", "onOnHover", "onUserTap"]),
262
- n[17] || (n[17] = L("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
263
- o.loggedIn ? f((d(), v("a", {
91
+ n[17] || (n[17] = w("div", { class: "tw-flex-1 tw-h-full" }, null, -1)),
92
+ t.loggedIn ? l((a(), i("a", {
264
93
  key: 0,
265
94
  ref: "dashboardLink",
266
- href: o.myDashboardUrl,
267
- class: A(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!o.openMenuItem }])
95
+ href: t.myDashboardUrl,
96
+ class: v(["header-link tw-hidden md:tw-block", { "tw-text-tertiary": !!t.openMenuItem }])
268
97
  }, n[14] || (n[14] = [
269
- b(" My dashboard ")
270
- ]), 10, Be)), [
271
- [a, ["TopNav", "click-Dashboard"]]
272
- ]) : z("", !0),
273
- f((d(), v("a", {
98
+ m(" My dashboard ")
99
+ ]), 10, U)), [
100
+ [d, ["TopNav", "click-Dashboard"]]
101
+ ]) : y("", !0),
102
+ l((a(), i("a", {
274
103
  ref: "basketLink",
275
104
  href: "/basket",
276
- class: A(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!o.openMenuItem }]),
277
- style: N([o.isBasketDataLoading ? {
105
+ class: v(["header-link tw-relative md:!tw-mr-0 tw-flex tw-items-center tw-gap-0.5", { "tw-text-tertiary": !!t.openMenuItem }]),
106
+ style: f([t.isBasketDataLoading ? {
278
107
  display: "var(--basket-display, flex)"
279
108
  } : void 0, { "margin-right": "2px" }]),
280
109
  "data-testid": "header-basket"
281
110
  }, [
282
- w(B, {
111
+ r(b, {
283
112
  class: "tw-w-3 tw-h-3 md:tw-w-3.5 md:tw-h-3.5 tw-pointer-events-none tw-text-action",
284
- count: o.isBasketDataLoading ? 0 : o.basketCount
113
+ count: t.isBasketDataLoading ? 0 : t.basketCount
285
114
  }, null, 8, ["count"]),
286
- n[15] || (n[15] = L("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
115
+ n[15] || (n[15] = w("span", { class: "tw-hidden md:tw-block" }, "Basket", -1))
287
116
  ], 6)), [
288
- [W, o.isBasketDataLoading ? !0 : o.basketCount > 0],
289
- [a, ["TopNav", "click-Basket"]]
117
+ [h, t.isBasketDataLoading ? !0 : t.basketCount > 0],
118
+ [d, ["TopNav", "click-Basket"]]
290
119
  ]),
291
- L("div", {
120
+ w("div", {
292
121
  class: "md:tw-py-1",
293
- onMouseenter: n[7] || (n[7] = (l) => e.handleOnHover(e.AVATAR_MENU_ID, e.KvHeaderMyKivaMenu, e.getAvatarMenuPosition())),
294
- onMouseleave: n[8] || (n[8] = (l) => e.handleMouseOut(e.AVATAR_MENU_ID)),
295
- onTouchstart: n[9] || (n[9] = K((l) => e.handleTouchStart(e.AVATAR_MENU_ID), ["stop"]))
122
+ onMouseenter: n[7] || (n[7] = (o) => e.handleOnHover(e.AVATAR_MENU_ID, e.KvHeaderMyKivaMenu, e.getAvatarMenuPosition())),
123
+ onMouseleave: n[8] || (n[8] = (o) => e.handleMouseOut(e.AVATAR_MENU_ID)),
124
+ onTouchstart: n[9] || (n[9] = c((o) => e.handleTouchStart(e.AVATAR_MENU_ID), ["stop"]))
296
125
  }, [
297
- f(L("div", Ie, [
298
- w(y, {
126
+ l(w("div", A, [
127
+ r(M, {
299
128
  icon: e.mdiAccountCircle,
300
129
  class: "tw-w-3",
301
- style: N(o.isUserDataLoading ? {
130
+ style: f(t.isUserDataLoading ? {
302
131
  display: "var(--user-avatar-legacy-display, inline-block)"
303
132
  } : {
304
133
  display: e.isDefaultProfilePic ? "inline-block" : "none"
305
134
  })
306
135
  }, null, 8, ["icon", "style"]),
307
- w(I, {
136
+ r(T, {
308
137
  class: "tw-w-3 tw-h-3",
309
- "lender-name": o.lenderName,
310
- "lender-image-url": o.lenderImageUrl,
311
- style: N(o.isUserDataLoading ? {
138
+ "lender-name": t.lenderName,
139
+ "lender-image-url": t.lenderImageUrl,
140
+ style: f(t.isUserDataLoading ? {
312
141
  display: "var(--user-avatar-display, inline-block)"
313
142
  } : {
314
143
  display: e.isDefaultProfilePic ? "none" : "inline-block"
315
144
  }),
316
- "show-css-placeholder": o.isUserDataLoading,
145
+ "show-css-placeholder": t.isUserDataLoading,
317
146
  "is-small": ""
318
147
  }, null, 8, ["lender-name", "lender-image-url", "style", "show-css-placeholder"]),
319
- o.isUserDataLoading ? (d(), v("div", He, [
320
- w(H)
321
- ])) : (d(), v("span", De, le(e.numeral(e.roundedBalance).format("$0")), 1))
148
+ t.isUserDataLoading ? (a(), i("div", I, [
149
+ r(x)
150
+ ])) : (a(), i("span", K, L(e.numeral(e.roundedBalance).format("$0")), 1))
322
151
  ], 512), [
323
- [W, o.loggedIn]
152
+ [h, t.loggedIn]
324
153
  ])
325
154
  ], 32),
326
- o.loggedIn ? z("", !0) : f((d(), v("a", {
155
+ t.loggedIn ? y("", !0) : l((a(), i("a", {
327
156
  key: 1,
328
157
  ref: "signInLink",
329
- href: o.loginUrl,
330
- class: A(["header-link", { "tw-text-tertiary": !!o.openMenuItem }])
158
+ href: t.loginUrl,
159
+ class: v(["header-link", { "tw-text-tertiary": !!t.openMenuItem }])
331
160
  }, n[16] || (n[16] = [
332
- b(" Sign in ")
333
- ]), 10, Ke)), [
334
- [a, ["TopNav", "click-Sign-in"]]
161
+ m(" Sign in ")
162
+ ]), 10, O)), [
163
+ [d, ["TopNav", "click-Sign-in"]]
335
164
  ])
336
165
  ], 32);
337
166
  }
338
- const Ge = /* @__PURE__ */ ge(Ue, [["render", Ee], ["__scopeId", "data-v-c31f1fca"]]);
167
+ const R = /* @__PURE__ */ B(D, [["render", N], ["__scopeId", "data-v-3db10484"]]);
339
168
  export {
340
- Ge as default
169
+ R as default
341
170
  };