@kiva/kv-components 7.6.3 → 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.
- package/.eslintignore +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +236 -216
- package/dist/utils/Alea.d.ts +9 -0
- package/dist/utils/Alea.js +23 -23
- package/dist/utils/arrayUtils.d.ts +3 -0
- package/dist/utils/arrayUtils.js +1 -1
- package/dist/utils/attrs.d.ts +6 -0
- package/dist/utils/carousels.d.ts +21 -0
- package/dist/utils/comparators.d.ts +3 -0
- package/dist/utils/comparators.js +20 -6
- package/dist/utils/debounce.d.ts +1 -0
- package/dist/utils/debounce.js +4 -4
- package/dist/utils/event.d.ts +1 -0
- package/dist/utils/event.js +7 -0
- package/dist/utils/expander.d.ts +14 -0
- package/dist/utils/imageUtils.d.ts +11 -0
- package/dist/utils/imageUtils.js +12 -12
- package/dist/utils/index.d.ts +21 -0
- package/dist/utils/loanCard.d.ts +35 -0
- package/dist/utils/loanCard.js +2 -2
- package/dist/utils/loanSearch/queryParamUtils.d.ts +1 -0
- package/dist/utils/loanUtils.d.ts +11 -0
- package/dist/utils/loanUtils.js +56 -53
- package/dist/utils/mapUtils.d.ts +5 -0
- package/dist/utils/markMatches.d.ts +1 -0
- package/dist/utils/paramCase.d.ts +1 -0
- package/dist/utils/printing.d.ts +2 -0
- package/dist/utils/scrollLock.d.ts +4 -0
- package/dist/utils/themeUtils.d.ts +12 -0
- package/dist/utils/throttle.d.ts +1 -0
- package/dist/utils/throttle.js +4 -4
- package/dist/utils/touchEvents.d.ts +3 -0
- package/dist/utils/touchEvents.js +9 -9
- package/dist/utils/treemap.d.ts +16 -0
- package/dist/utils/treemap.js +1 -1
- package/dist/vue/KvAccordionItem.js +28 -82
- package/dist/vue/KvAccordionItem.vue.d.ts +107 -0
- package/dist/vue/KvAccordionItem2.js +60 -0
- package/dist/vue/KvActivityRow.js +11 -22
- package/dist/vue/KvActivityRow.vue.d.ts +66 -0
- package/dist/vue/KvActivityRow2.js +16 -0
- package/dist/vue/KvAtbModal.css +1 -1
- package/dist/vue/KvAtbModal.js +68 -248
- package/dist/vue/KvAtbModal.vue.d.ts +359 -0
- package/dist/vue/KvAtbModal2.js +186 -0
- package/dist/vue/KvBorrowerImage.js +17 -118
- package/dist/vue/KvBorrowerImage.vue.d.ts +62 -0
- package/dist/vue/KvBorrowerImage2.js +106 -0
- package/dist/vue/KvButton.js +20 -164
- package/dist/vue/KvButton.vue.d.ts +94 -0
- package/dist/vue/KvButton2.js +149 -0
- package/dist/vue/KvCardFrame.js +12 -74
- package/dist/vue/KvCardFrame.vue.d.ts +86 -0
- package/dist/vue/KvCardFrame2.js +67 -0
- package/dist/vue/KvCarousel.css +1 -1
- package/dist/vue/KvCarousel.js +55 -192
- package/dist/vue/KvCarousel.vue.d.ts +135 -0
- package/dist/vue/KvCarousel2.js +142 -0
- package/dist/vue/KvCartModal.css +1 -1
- package/dist/vue/KvCartModal.js +31 -131
- package/dist/vue/KvCartModal.vue.d.ts +163 -0
- package/dist/vue/KvCartModal2.js +106 -0
- package/dist/vue/KvCartPill.js +12 -51
- package/dist/vue/KvCartPill.vue.d.ts +52 -0
- package/dist/vue/KvCartPill2.js +45 -0
- package/dist/vue/KvCheckbox.css +1 -1
- package/dist/vue/KvCheckbox.js +30 -126
- package/dist/vue/KvCheckbox.vue.d.ts +90 -0
- package/dist/vue/KvCheckbox2.js +102 -0
- package/dist/vue/KvCheckoutReceipt.css +1 -1
- package/dist/vue/KvCheckoutReceipt.js +120 -199
- package/dist/vue/KvCheckoutReceipt.vue.d.ts +164 -0
- package/dist/vue/KvCheckoutReceipt2.js +85 -0
- package/dist/vue/KvChip.js +12 -29
- package/dist/vue/KvChip.vue.d.ts +22 -0
- package/dist/vue/KvChip2.js +22 -0
- package/dist/vue/KvClassicLoanCard.css +1 -1
- package/dist/vue/KvClassicLoanCard.js +83 -351
- package/dist/vue/KvClassicLoanCard.vue.d.ts +2120 -0
- package/dist/vue/KvClassicLoanCard2.js +281 -0
- package/dist/vue/KvCommentsAdd.css +1 -1
- package/dist/vue/KvCommentsAdd.js +34 -81
- package/dist/vue/KvCommentsAdd.vue.d.ts +296 -0
- package/dist/vue/KvCommentsAdd2.js +57 -0
- package/dist/vue/KvCommentsContainer.js +15 -66
- package/dist/vue/KvCommentsContainer.vue.d.ts +954 -0
- package/dist/vue/KvCommentsContainer2.js +58 -0
- package/dist/vue/KvCommentsHeartButton.css +1 -1
- package/dist/vue/KvCommentsHeartButton.js +12 -51
- package/dist/vue/KvCommentsHeartButton.vue.d.ts +42 -0
- package/dist/vue/KvCommentsHeartButton2.js +44 -0
- package/dist/vue/KvCommentsList.js +9 -51
- package/dist/vue/KvCommentsList.vue.d.ts +619 -0
- package/dist/vue/KvCommentsList2.js +46 -0
- package/dist/vue/KvCommentsListItem.js +62 -186
- package/dist/vue/KvCommentsListItem.vue.d.ts +571 -0
- package/dist/vue/KvCommentsListItem2.js +135 -0
- package/dist/vue/KvCommentsReplyButton.css +1 -1
- package/dist/vue/KvCommentsReplyButton.js +8 -17
- package/dist/vue/KvCommentsReplyButton.vue.d.ts +98 -0
- package/dist/vue/KvCommentsReplyButton2.js +13 -0
- package/dist/vue/KvCompactLoanCard.css +1 -1
- package/dist/vue/KvCompactLoanCard.js +71 -327
- package/dist/vue/KvCompactLoanCard.vue.d.ts +1272 -0
- package/dist/vue/KvCompactLoanCard2.js +269 -0
- package/dist/vue/KvContentfulImg.js +51 -164
- package/dist/vue/KvContentfulImg.vue.d.ts +107 -0
- package/dist/vue/KvContentfulImg2.js +119 -0
- package/dist/vue/KvCountdownTimer.js +8 -28
- package/dist/vue/KvCountdownTimer.vue.d.ts +15 -0
- package/dist/vue/KvCountdownTimer2.js +26 -0
- package/dist/vue/KvDatePicker.js +21 -101
- package/dist/vue/KvDatePicker.vue.d.ts +58 -0
- package/dist/vue/KvDatePicker2.js +86 -0
- package/dist/vue/KvExpandable.js +9 -56
- package/dist/vue/KvExpandable.vue.d.ts +53 -0
- package/dist/vue/KvExpandable2.js +52 -0
- package/dist/vue/KvExpandableQuestion.js +23 -82
- package/dist/vue/KvExpandableQuestion.vue.d.ts +124 -0
- package/dist/vue/KvExpandableQuestion2.js +65 -0
- package/dist/vue/KvFlag.css +1 -1
- package/dist/vue/KvFlag.js +16 -617
- package/dist/vue/KvFlag.vue.d.ts +66 -0
- package/dist/vue/KvFlag2.js +606 -0
- package/dist/vue/KvGrid.js +7 -18
- package/dist/vue/KvGrid.vue.d.ts +14 -0
- package/dist/vue/KvGrid2.js +15 -0
- package/dist/vue/KvIconBag.js +12 -18
- package/dist/vue/KvIconBag.vue.d.ts +14 -0
- package/dist/vue/KvIconBag2.js +11 -0
- package/dist/vue/KvImpactDashboardHeader.vue.d.ts +17 -0
- package/dist/vue/KvImpactVerticalSelector.js +31 -110
- package/dist/vue/KvImpactVerticalSelector.vue.d.ts +278 -0
- package/dist/vue/KvImpactVerticalSelector2.js +85 -0
- package/dist/vue/KvInlineActivityCard.js +15 -44
- package/dist/vue/KvInlineActivityCard.vue.d.ts +71 -0
- package/dist/vue/KvInlineActivityCard2.js +35 -0
- package/dist/vue/KvInlineActivityFeed.css +1 -1
- package/dist/vue/KvInlineActivityFeed.js +11 -23
- package/dist/vue/KvInlineActivityFeed.vue.d.ts +85 -0
- package/dist/vue/KvInlineActivityFeed2.js +17 -0
- package/dist/vue/KvIntroductionLoanCard.css +1 -1
- package/dist/vue/KvIntroductionLoanCard.js +111 -309
- package/dist/vue/KvIntroductionLoanCard.vue.d.ts +617 -0
- package/dist/vue/KvIntroductionLoanCard2.js +209 -0
- package/dist/vue/KvLendAmountButton.js +9 -53
- package/dist/vue/KvLendAmountButton.vue.d.ts +140 -0
- package/dist/vue/KvLendAmountButton2.js +48 -0
- package/dist/vue/KvLendCta.css +1 -1
- package/dist/vue/KvLendCta.js +150 -530
- package/dist/vue/KvLendCta.vue.d.ts +583 -0
- package/dist/vue/KvLendCta2.js +387 -0
- package/dist/vue/KvLightbox.js +37 -148
- package/dist/vue/KvLightbox.vue.d.ts +77 -0
- package/dist/vue/KvLightbox2.js +117 -0
- package/dist/vue/KvLineGraph.js +25 -58
- package/dist/vue/KvLineGraph.vue.d.ts +35 -0
- package/dist/vue/KvLineGraph2.js +39 -0
- package/dist/vue/KvLoadingPlaceholder.vue.d.ts +2 -0
- package/dist/vue/KvLoadingSpinner.js +9 -34
- package/dist/vue/KvLoadingSpinner.vue.d.ts +27 -0
- package/dist/vue/KvLoadingSpinner2.js +29 -0
- package/dist/vue/KvLoanActivities.css +1 -1
- package/dist/vue/KvLoanActivities.js +37 -179
- package/dist/vue/KvLoanActivities.vue.d.ts +853 -0
- package/dist/vue/KvLoanActivities2.js +151 -0
- package/dist/vue/KvLoanBookmark.js +14 -40
- package/dist/vue/KvLoanBookmark.vue.d.ts +32 -0
- package/dist/vue/KvLoanBookmark2.js +32 -0
- package/dist/vue/KvLoanCallouts.css +1 -1
- package/dist/vue/KvLoanCallouts.js +10 -17
- package/dist/vue/KvLoanCallouts.vue.d.ts +18 -0
- package/dist/vue/KvLoanCallouts2.js +12 -0
- package/dist/vue/KvLoanInfoCard.js +20 -19
- package/dist/vue/KvLoanProgressGroup.css +1 -1
- package/dist/vue/KvLoanProgressGroup.js +18 -57
- package/dist/vue/KvLoanProgressGroup.vue.d.ts +108 -0
- package/dist/vue/KvLoanProgressGroup2.js +44 -0
- package/dist/vue/KvLoanTag.js +15 -103
- package/dist/vue/KvLoanTag.vue.d.ts +46 -0
- package/dist/vue/KvLoanTag2.js +94 -0
- package/dist/vue/KvLoanTeamPick.vue.d.ts +2 -0
- package/dist/vue/KvLoanUse.js +12 -100
- package/dist/vue/KvLoanUse.vue.d.ts +120 -0
- package/dist/vue/KvLoanUse2.js +95 -0
- package/dist/vue/KvLogo.vue.d.ts +2 -0
- package/dist/vue/KvMap.js +13 -381
- package/dist/vue/KvMap.vue.d.ts +213 -0
- package/dist/vue/KvMap2.js +376 -0
- package/dist/vue/KvMaterialIcon.js +10 -20
- package/dist/vue/KvMaterialIcon.vue.d.ts +14 -0
- package/dist/vue/KvMaterialIcon2.js +15 -0
- package/dist/vue/KvPageContainer.js +9 -8
- package/dist/vue/KvPageContainer.vue.d.ts +2 -0
- package/dist/vue/KvPageContainer2.js +4 -0
- package/dist/vue/KvPagination.js +38 -138
- package/dist/vue/KvPagination.vue.d.ts +107 -0
- package/dist/vue/KvPagination2.js +105 -0
- package/dist/vue/KvPieChart.css +1 -1
- package/dist/vue/KvPieChart.js +49 -128
- package/dist/vue/KvPieChart.vue.d.ts +47 -0
- package/dist/vue/KvPieChart2.js +85 -0
- package/dist/vue/KvPill.js +9 -19
- package/dist/vue/KvPill.vue.d.ts +23 -0
- package/dist/vue/KvPill2.js +15 -0
- package/dist/vue/KvPopper.js +14 -122
- package/dist/vue/KvPopper.vue.d.ts +80 -0
- package/dist/vue/KvPopper2.js +113 -0
- package/dist/vue/KvProgressBar.js +17 -112
- package/dist/vue/KvProgressBar.vue.d.ts +70 -0
- package/dist/vue/KvProgressBar2.js +101 -0
- package/dist/vue/KvPulsingDot.css +1 -1
- package/dist/vue/KvPulsingDot.js +11 -25
- package/dist/vue/KvPulsingDot.vue.d.ts +23 -0
- package/dist/vue/KvPulsingDot2.js +19 -0
- package/dist/vue/KvRadio.js +23 -106
- package/dist/vue/KvRadio.vue.d.ts +62 -0
- package/dist/vue/KvRadio2.js +89 -0
- package/dist/vue/KvSecondaryNav.css +1 -1
- package/dist/vue/KvSecondaryNav.js +46 -122
- package/dist/vue/KvSecondaryNav.vue.d.ts +117 -0
- package/dist/vue/KvSecondaryNav2.js +82 -0
- package/dist/vue/KvSelect.css +1 -1
- package/dist/vue/KvSelect.js +18 -78
- package/dist/vue/KvSelect.vue.d.ts +58 -0
- package/dist/vue/KvSelect2.js +66 -0
- package/dist/vue/KvSideSheet.js +44 -262
- package/dist/vue/KvSideSheet.vue.d.ts +136 -0
- package/dist/vue/KvSideSheet2.js +224 -0
- package/dist/vue/KvSwitch.js +23 -76
- package/dist/vue/KvSwitch.vue.d.ts +34 -0
- package/dist/vue/KvSwitch2.js +59 -0
- package/dist/vue/KvTab.js +15 -57
- package/dist/vue/KvTab.vue.d.ts +34 -0
- package/dist/vue/KvTab2.js +48 -0
- package/dist/vue/KvTabPanel.js +14 -36
- package/dist/vue/KvTabPanel.vue.d.ts +14 -0
- package/dist/vue/KvTabPanel2.js +28 -0
- package/dist/vue/KvTabs.js +21 -75
- package/dist/vue/KvTabs.vue.d.ts +22 -0
- package/dist/vue/KvTabs2.js +60 -0
- package/dist/vue/KvTextInput.js +28 -148
- package/dist/vue/KvTextInput.vue.d.ts +105 -0
- package/dist/vue/KvTextInput2.js +126 -0
- package/dist/vue/KvTextLink.js +13 -76
- package/dist/vue/KvTextLink.vue.d.ts +64 -0
- package/dist/vue/KvTextLink2.js +68 -0
- package/dist/vue/KvThemeProvider.js +8 -59
- package/dist/vue/KvThemeProvider.vue.d.ts +23 -0
- package/dist/vue/KvThemeProvider2.js +55 -0
- package/dist/vue/KvToast.js +32 -69
- package/dist/vue/KvToast.vue.d.ts +31 -0
- package/dist/vue/KvToast2.js +43 -0
- package/dist/vue/KvTooltip.css +1 -1
- package/dist/vue/KvTooltip.js +27 -123
- package/dist/vue/KvTooltip.vue.d.ts +2 -0
- package/dist/vue/KvTooltip2.js +103 -0
- package/dist/vue/KvTreeMapChart.css +1 -1
- package/dist/vue/KvTreeMapChart.js +28 -156
- package/dist/vue/KvTreeMapChart.vue.d.ts +60 -0
- package/dist/vue/KvTreeMapChart2.js +133 -0
- package/dist/vue/KvUserAvatar.js +28 -110
- package/dist/vue/KvUserAvatar.vue.d.ts +55 -0
- package/dist/vue/KvUserAvatar2.js +88 -0
- package/dist/vue/KvUtilityMenu.js +19 -95
- package/dist/vue/KvUtilityMenu.vue.d.ts +104 -0
- package/dist/vue/KvUtilityMenu2.js +81 -0
- package/dist/vue/KvVerticalCarousel.js +40 -137
- package/dist/vue/KvVerticalCarousel.vue.d.ts +90 -0
- package/dist/vue/KvVerticalCarousel2.js +103 -0
- package/dist/vue/KvVotingCard.css +1 -1
- package/dist/vue/KvVotingCard.js +31 -88
- package/dist/vue/KvVotingCard.vue.d.ts +249 -0
- package/dist/vue/KvVotingCard2.js +63 -0
- package/dist/vue/KvVotingCardV2.js +35 -90
- package/dist/vue/KvVotingCardV2.vue.d.ts +308 -0
- package/dist/vue/KvVotingCardV22.js +61 -0
- package/dist/vue/KvWideLoanCard.css +1 -1
- package/dist/vue/KvWideLoanCard.js +66 -274
- package/dist/vue/KvWideLoanCard.vue.d.ts +1191 -0
- package/dist/vue/KvWideLoanCard2.js +220 -0
- package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.js +34 -38
- package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.vue.d.ts +20 -0
- package/dist/vue/KvWwwHeader/KvHeaderAboutMenu2.js +9 -0
- package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +20 -83
- package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.vue.d.ts +91 -0
- package/dist/vue/KvWwwHeader/KvHeaderDropdownLink2.js +69 -0
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.css +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +77 -248
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar.vue.d.ts +1071 -0
- package/dist/vue/KvWwwHeader/KvHeaderLinkBar2.js +178 -0
- package/dist/vue/KvWwwHeader/KvHeaderLogo.js +8 -12
- package/dist/vue/KvWwwHeader/KvHeaderLogo.vue.d.ts +4 -0
- package/dist/vue/KvWwwHeader/KvHeaderLogo2.js +9 -0
- package/dist/vue/KvWwwHeader/KvHeaderMenuLink.vue.d.ts +17 -0
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.css +1 -1
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +37 -91
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.vue.d.ts +162 -0
- package/dist/vue/KvWwwHeader/KvHeaderMobileMenu2.js +59 -0
- package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.js +36 -58
- package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.vue.d.ts +59 -0
- package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu2.js +27 -0
- package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.js +20 -24
- package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.vue.d.ts +20 -0
- package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu2.js +9 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.css +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +105 -181
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.vue.d.ts +319 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu2.js +82 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.css +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +93 -173
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.vue.d.ts +166 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu2.js +86 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +17 -157
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.vue.d.ts +506 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu2.js +145 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.css +1 -1
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.js +11 -18
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.vue.d.ts +20 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList2.js +12 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.js +10 -16
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.vue.d.ts +20 -0
- package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList2.js +11 -0
- package/dist/vue/KvWwwHeader.css +1 -1
- package/dist/vue/KvWwwHeader.js +35 -148
- package/dist/vue/KvWwwHeader.vue.d.ts +4430 -0
- package/dist/vue/KvWwwHeader2.js +119 -0
- package/dist/vue/index.d.ts +86 -0
- package/package.json +34 -32
- package/tsconfig.json +32 -0
- package/vite.config.ts +84 -0
package/dist/utils/debounce.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
let e;
|
|
1
|
+
const i = (t, o) => {
|
|
2
|
+
let e = null;
|
|
3
3
|
return (...u) => {
|
|
4
|
-
clearTimeout(e), e = setTimeout(() => t(...u), o);
|
|
4
|
+
e && clearTimeout(e), e = setTimeout(() => t(...u), o);
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
i as debounce
|
|
9
9
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useEventListener(target: any, event: any, callback: any): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function expand(el: HTMLElement, { easing, delay, done, from, property, }: {
|
|
2
|
+
easing?: string;
|
|
3
|
+
delay?: number;
|
|
4
|
+
done?: () => void;
|
|
5
|
+
from?: number;
|
|
6
|
+
property?: string;
|
|
7
|
+
}): void;
|
|
8
|
+
export declare function collapse(el: HTMLElement, { easing, delay, done, to, property, }: {
|
|
9
|
+
easing?: string;
|
|
10
|
+
delay?: number;
|
|
11
|
+
done?: () => void;
|
|
12
|
+
to?: number;
|
|
13
|
+
property?: string;
|
|
14
|
+
}): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function isLegacyPlaceholderAvatar(filename: any): boolean;
|
|
2
|
+
export declare function randomizedUserAvatarClass(displayName?: string): string;
|
|
3
|
+
export declare function getKivaImageUrl({ base, width, height, square, faceZoom, hash, format, }: {
|
|
4
|
+
base?: string;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
square?: number;
|
|
8
|
+
faceZoom?: number;
|
|
9
|
+
hash: string;
|
|
10
|
+
format?: string;
|
|
11
|
+
}): string;
|
package/dist/utils/imageUtils.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import s from "./Alea.js";
|
|
2
|
-
function
|
|
2
|
+
function $(o) {
|
|
3
3
|
if (!o)
|
|
4
4
|
return !1;
|
|
5
5
|
let t = o.toString();
|
|
6
6
|
return t.includes(".") && ([t] = t.split(".")), ["726677", "315726", "4d844ac2c0b77a8a522741b908ea5c32"].includes(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const t =
|
|
8
|
+
function w(o = "") {
|
|
9
|
+
const t = s(o), r = [
|
|
10
10
|
{ color: "tw-text-action", bg: "tw-bg-brand-100" },
|
|
11
11
|
{ color: "tw-text-black", bg: "tw-bg-brand-100" },
|
|
12
12
|
{ color: "tw-text-white", bg: "tw-bg-action" },
|
|
@@ -14,27 +14,27 @@ function $(o = "") {
|
|
|
14
14
|
{ color: "tw-text-primary-inverse", bg: "tw-bg-action" },
|
|
15
15
|
{ color: "tw-text-white", bg: "tw-bg-black" },
|
|
16
16
|
{ color: "tw-text-action", bg: "tw-bg-black" }
|
|
17
|
-
],
|
|
18
|
-
return `${
|
|
17
|
+
], e = r[Math.floor(t() * r.length)];
|
|
18
|
+
return `${e.color} ${e.bg}`;
|
|
19
19
|
}
|
|
20
20
|
function d({
|
|
21
21
|
base: o = "/img/",
|
|
22
22
|
width: t,
|
|
23
|
-
height:
|
|
24
|
-
square:
|
|
23
|
+
height: r,
|
|
24
|
+
square: e,
|
|
25
25
|
faceZoom: l,
|
|
26
26
|
hash: n,
|
|
27
27
|
format: b = "jpg"
|
|
28
28
|
}) {
|
|
29
|
-
if (!n || !t && !
|
|
29
|
+
if (!n || !t && !r && !e && !l)
|
|
30
30
|
return "";
|
|
31
31
|
let c = "", a = "";
|
|
32
|
-
t &&
|
|
33
|
-
const i =
|
|
32
|
+
t && r && t === r ? e = t : (c = t ? `w${Math.ceil(t)}` : "", a = r ? `h${Math.ceil(r)}` : "");
|
|
33
|
+
const i = e ? `s${Math.ceil(e)}` : "", g = l && (t || r || e) ? `fz${Math.ceil(l)}` : "";
|
|
34
34
|
return `${o}${c}${a}${i}${g}/${n}.${b}`;
|
|
35
35
|
}
|
|
36
36
|
export {
|
|
37
37
|
d as getKivaImageUrl,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
$ as isLegacyPlaceholderAvatar,
|
|
39
|
+
w as randomizedUserAvatarClass
|
|
40
40
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from './Alea';
|
|
2
|
+
export { default as Alea } from './Alea';
|
|
3
|
+
export * from './arrayUtils';
|
|
4
|
+
export * from './attrs';
|
|
5
|
+
export * from './carousels';
|
|
6
|
+
export * from './comparators';
|
|
7
|
+
export * from './debounce';
|
|
8
|
+
export * from './event';
|
|
9
|
+
export * from './expander';
|
|
10
|
+
export * from './imageUtils';
|
|
11
|
+
export * from './loanCard';
|
|
12
|
+
export * from './loanUtils';
|
|
13
|
+
export * from './mapUtils';
|
|
14
|
+
export * from './markMatches';
|
|
15
|
+
export * from './paramCase';
|
|
16
|
+
export * from './printing';
|
|
17
|
+
export * from './scrollLock';
|
|
18
|
+
export * from './themeUtils';
|
|
19
|
+
export * from './throttle';
|
|
20
|
+
export * from './touchEvents';
|
|
21
|
+
export * from './treemap';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface Callout {
|
|
2
|
+
id: number | null;
|
|
3
|
+
label: string;
|
|
4
|
+
type: 'tag' | 'attribute' | 'activity' | 'sector';
|
|
5
|
+
}
|
|
6
|
+
export declare const LOAN_CALLOUTS_FRAGMENT: import('graphql').DocumentNode;
|
|
7
|
+
export declare const LOAN_GEOCODE_FRAGMENT: import('graphql').DocumentNode;
|
|
8
|
+
export declare const LOAN_PROGRESS_FRAGMENT: import('graphql').DocumentNode;
|
|
9
|
+
export declare function loanCardComputedProperties(props: any, hideUnitedStatesText?: boolean): {
|
|
10
|
+
tag: import('vue').ComputedRef<"router-link" | "a">;
|
|
11
|
+
readMorePath: import('vue').ComputedRef<any>;
|
|
12
|
+
isLoading: import('vue').ComputedRef<boolean>;
|
|
13
|
+
borrowerName: import('vue').ComputedRef<any>;
|
|
14
|
+
countryName: import('vue').ComputedRef<any>;
|
|
15
|
+
countryCode: import('vue').ComputedRef<any>;
|
|
16
|
+
city: import('vue').ComputedRef<any>;
|
|
17
|
+
state: import('vue').ComputedRef<any>;
|
|
18
|
+
distributionModel: import('vue').ComputedRef<any>;
|
|
19
|
+
imageHash: import('vue').ComputedRef<any>;
|
|
20
|
+
hasProgressData: import('vue').ComputedRef<boolean>;
|
|
21
|
+
allDataLoaded: import('vue').ComputedRef<boolean>;
|
|
22
|
+
fundraisingPercent: import('vue').ComputedRef<any>;
|
|
23
|
+
unreservedAmount: import('vue').ComputedRef<any>;
|
|
24
|
+
sharesAvailable: import('vue').ComputedRef<boolean>;
|
|
25
|
+
formattedLocation: import('vue').ComputedRef<any>;
|
|
26
|
+
loanUse: import('vue').ComputedRef<any>;
|
|
27
|
+
loanStatus: import('vue').ComputedRef<any>;
|
|
28
|
+
loanAmount: import('vue').ComputedRef<any>;
|
|
29
|
+
loanBorrowerCount: import('vue').ComputedRef<any>;
|
|
30
|
+
mdiMapMarker: string;
|
|
31
|
+
loanCallouts: import('vue').ComputedRef<Callout[]>;
|
|
32
|
+
};
|
|
33
|
+
export declare function loanCardMethods(props: any, emit: any): {
|
|
34
|
+
clickReadMore: (target: string, event: Event) => void;
|
|
35
|
+
};
|
package/dist/utils/loanCard.js
CHANGED
|
@@ -98,8 +98,8 @@ function Ge(c, f = !1) {
|
|
|
98
98
|
var e;
|
|
99
99
|
return ((e = t.value) == null ? void 0 : e.borrowerCount) ?? 0;
|
|
100
100
|
}), Ae = n(() => {
|
|
101
|
-
var Y,
|
|
102
|
-
const e = [], a =
|
|
101
|
+
var Y, B, $, w, K, x, H, q, j, z, J, Q, V, W, X, Z, ee, te, ae;
|
|
102
|
+
const e = [], a = Ue(g.value, T.value), l = ((B = (Y = t.value) == null ? void 0 : Y.activity) == null ? void 0 : B.name) ?? "", u = ((w = ($ = t.value) == null ? void 0 : $.activity) == null ? void 0 : w.id) ?? null, d = ((x = (K = t.value) == null ? void 0 : K.sector) == null ? void 0 : x.name) ?? "", D = ((q = (H = t.value) == null ? void 0 : H.sector) == null ? void 0 : q.id) ?? null, i = ((z = (j = t.value) == null ? void 0 : j.tags) == null ? void 0 : z.filter((o) => o.charAt(0) === "#").map((o) => o.substring(1))) ?? [], y = ((J = t.value) == null ? void 0 : J.themes) ?? [], b = {
|
|
103
103
|
ecoFriendly: !!i.filter((o) => o.toUpperCase() === ne || o.toUpperCase() === le).length,
|
|
104
104
|
refugeesIdps: !!y.filter((o) => o.toUpperCase() === be).length,
|
|
105
105
|
singleParents: !!i.filter((o) => o.toUpperCase() === se).length
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hasExcludedQueryParams(query: any): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ERL_COOKIE_NAME = "kverlfivedollarnotes";
|
|
2
|
+
export declare const TOP_UP_CAMPAIGN = "TOPUP-VB-BALANCE-MPV1";
|
|
3
|
+
export declare const BASE_CAMPAIGN = "BASE-VB_BALANCE_MPV1";
|
|
4
|
+
export declare const BALANCE_CAMPAIGN = "REPAYMENT-NOTIFICATION_BALANCE_MPV1";
|
|
5
|
+
export declare const NO_BALANCE_CAMPAIGN = "REPAYMENT-NOTIFICATION_NO-BALANCE_MPV1";
|
|
6
|
+
export declare function isBetween25And50(unreservedAmount: string | number): boolean;
|
|
7
|
+
export declare function isLessThan25(unreservedAmount: string | number): boolean;
|
|
8
|
+
export type GetCookieFn = (name: string) => string | undefined;
|
|
9
|
+
export type SetCookieFn = (name: string, value: string, options?: any) => void;
|
|
10
|
+
export declare function getLendCtaSelectedOption(getCookie: GetCookieFn | undefined, setCookie: SetCookieFn | undefined, enableFiveDollarsNotes: boolean, campaign: string, unreservedAmount: string | number, userBalance: number | undefined, fiveDollarsSelected: boolean): string;
|
|
11
|
+
export declare function getDropdownPriceArray(unreservedAmount: string | number, isCompleteLoanActive?: boolean, minAmount?: number, enableFiveDollarsNotes?: boolean, isVisitor?: boolean, inPfp?: boolean): string[];
|
package/dist/utils/loanUtils.js
CHANGED
|
@@ -1,80 +1,83 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import l from "numeral";
|
|
2
|
+
const N = "kverlfivedollarnotes", P = "TOPUP-VB-BALANCE-MPV1", a = "BASE-VB_BALANCE_MPV1", A = "REPAYMENT-NOTIFICATION_BALANCE_MPV1", y = "REPAYMENT-NOTIFICATION_NO-BALANCE_MPV1";
|
|
3
3
|
function C(r) {
|
|
4
4
|
return r > 20 ? 25 : r > 15 ? 20 : r > 10 ? 15 : r > 5 ? 10 : 5;
|
|
5
5
|
}
|
|
6
6
|
function E(r) {
|
|
7
|
-
|
|
7
|
+
const t = typeof r == "string" ? parseFloat(r) : r;
|
|
8
|
+
return t <= 50 && t > 25;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
10
|
+
function b(r) {
|
|
11
|
+
const t = typeof r == "string" ? parseFloat(r) : r;
|
|
12
|
+
return t < 25 && t > 0;
|
|
11
13
|
}
|
|
12
|
-
function h(r,
|
|
14
|
+
function h(r, t, o, e, n, i, s) {
|
|
15
|
+
const c = typeof n == "string" ? parseFloat(n) : n;
|
|
13
16
|
if (o && s)
|
|
14
17
|
return "5";
|
|
15
18
|
if (o && typeof i < "u") {
|
|
16
|
-
let
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
19
|
+
let u = r == null ? void 0 : r(N);
|
|
20
|
+
if (e && typeof e == "string" && !u) {
|
|
21
|
+
const f = /* @__PURE__ */ new Date();
|
|
22
|
+
f.setHours(f.getHours() + 24);
|
|
23
|
+
const p = e.toUpperCase();
|
|
24
|
+
u = p.includes(P) ? P : p.includes(a) ? a : p.includes(A) ? A : p.includes(y) ? y : "", u && t && t(N, u, { expires: f });
|
|
22
25
|
}
|
|
23
|
-
if (
|
|
24
|
-
let
|
|
25
|
-
return
|
|
26
|
+
if (u) {
|
|
27
|
+
let f = Math.floor(i / 5) * 5;
|
|
28
|
+
return u === a ? (f = f === 0 ? 5 : f > 25 ? 25 : f, Number(f <= c ? f : c).toFixed()) : u === A ? (f = C(f), Number(f).toFixed()) : Number(c > 5 ? 5 : c).toFixed();
|
|
26
29
|
}
|
|
27
30
|
}
|
|
28
|
-
return E(
|
|
31
|
+
return E(c) || b(c) ? Number(c).toFixed() : "25";
|
|
29
32
|
}
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
let o = 100,
|
|
33
|
-
for (let i = 1; i <=
|
|
33
|
+
function d(r) {
|
|
34
|
+
const t = [];
|
|
35
|
+
let o = 100, e = r > 1e3 ? 1e3 : r, n = e / o;
|
|
36
|
+
for (let i = 1; i <= n; i += 1) {
|
|
34
37
|
const s = o * i + 500;
|
|
35
|
-
if (s >
|
|
36
|
-
|
|
38
|
+
if (s > e) break;
|
|
39
|
+
t.push(l(s).format("0,0"));
|
|
37
40
|
}
|
|
38
|
-
o = 1e3,
|
|
39
|
-
for (let i = 1; i <=
|
|
41
|
+
o = 1e3, e = r > 1e4 ? 1e4 : r, n = e / o;
|
|
42
|
+
for (let i = 1; i <= n; i += 1) {
|
|
40
43
|
const s = o * i + 1e3;
|
|
41
|
-
if (s >
|
|
42
|
-
|
|
44
|
+
if (s > e) break;
|
|
45
|
+
t.push(l(s).format("0,0"));
|
|
43
46
|
}
|
|
44
|
-
return
|
|
47
|
+
return t.includes(l(e).format("0,0")) || t.push(l(e).format("0,0")), t;
|
|
45
48
|
}
|
|
46
|
-
function
|
|
47
|
-
const
|
|
49
|
+
function O(r) {
|
|
50
|
+
const t = r < 50 ? r : 50, o = t / 5, e = Math.ceil((r - t) / 25) + 1, n = [];
|
|
48
51
|
for (let i = 1; i <= o; i += 1)
|
|
49
|
-
|
|
50
|
-
if (r >
|
|
51
|
-
for (let i = 3; i <=
|
|
52
|
-
|
|
53
|
-
return t;
|
|
54
|
-
}
|
|
55
|
-
function d(r, e) {
|
|
56
|
-
const o = r / e, n = [];
|
|
57
|
-
for (let t = 1; t <= o; t += 1)
|
|
58
|
-
n.push(u(e * t).format("0,0"));
|
|
52
|
+
n.push(l(5 * i).format("0,0"));
|
|
53
|
+
if (r > t)
|
|
54
|
+
for (let i = 3; i <= e; i += 1)
|
|
55
|
+
n.push(l(25 * i).format("0,0"));
|
|
59
56
|
return n;
|
|
60
57
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
function _(r, t) {
|
|
59
|
+
const o = r / t, e = [];
|
|
60
|
+
for (let n = 1; n <= o; n += 1)
|
|
61
|
+
e.push(l(t * n).format("0,0"));
|
|
62
|
+
return e;
|
|
63
|
+
}
|
|
64
|
+
function m(r, t = !1, o = 25, e = !1, n = !0, i = !1) {
|
|
65
|
+
const s = typeof r == "number" ? r : parseFloat(r);
|
|
66
|
+
let c = e && !i ? O(s).slice(0, 28) : _(s, o).slice(0, 20);
|
|
67
|
+
if (s > 500 && !n) {
|
|
68
|
+
const u = d(s);
|
|
69
|
+
c = c.concat(u);
|
|
67
70
|
}
|
|
68
|
-
return
|
|
71
|
+
return t && !c.includes(Number(r).toFixed()) && c.push(Number(r).toFixed()), c;
|
|
69
72
|
}
|
|
70
73
|
export {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
A as BALANCE_CAMPAIGN,
|
|
75
|
+
a as BASE_CAMPAIGN,
|
|
76
|
+
N as ERL_COOKIE_NAME,
|
|
77
|
+
y as NO_BALANCE_CAMPAIGN,
|
|
78
|
+
P as TOP_UP_CAMPAIGN,
|
|
79
|
+
m as getDropdownPriceArray,
|
|
77
80
|
h as getLendCtaSelectedOption,
|
|
78
81
|
E as isBetween25And50,
|
|
79
|
-
|
|
82
|
+
b as isLessThan25
|
|
80
83
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function getCoordinatesBetween(startCoordinates: number[], endCoordinates: number[], numberOfSteps: number): number[][];
|
|
2
|
+
export declare function generateMapMarkers(mapInstance: any, borrowerPoints: any): void;
|
|
3
|
+
export declare function animationCoordinator(mapInstance: any, borrowerPoints: any): Promise<void>;
|
|
4
|
+
export declare const getLoansIntervals: (min: number, max: number, nbIntervals: number) => number[][];
|
|
5
|
+
export declare const getCountryColor: (lenderLoans: number, countriesData: any[], kvTokensPrimitives: any, defaultBaseColor: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function markMatches(text: string, marks?: Array<[number, number]>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function paramCase(string: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const headerNumberCase: (str: string) => string;
|
|
2
|
+
export declare const buildTailwindClassName: (prefix: string, value: string) => string;
|
|
3
|
+
export declare const kebabCase: (str: string) => string;
|
|
4
|
+
export declare const removeObjectProperty: (object: Object, key: string) => {
|
|
5
|
+
constructor: Function;
|
|
6
|
+
toString(): string;
|
|
7
|
+
toLocaleString(): string;
|
|
8
|
+
valueOf(): Object;
|
|
9
|
+
hasOwnProperty(v: PropertyKey): boolean;
|
|
10
|
+
isPrototypeOf(v: Object): boolean;
|
|
11
|
+
propertyIsEnumerable(v: PropertyKey): boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function throttle<T extends (...args: any[]) => any>(func: T, timeFrame: number): (...args: Parameters<T>) => void;
|
package/dist/utils/throttle.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function
|
|
1
|
+
function u(n, o) {
|
|
2
2
|
let t = 0;
|
|
3
3
|
return function(...i) {
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const e = (/* @__PURE__ */ new Date()).getTime();
|
|
5
|
+
e - t >= o && (n(...i), t = e);
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
u as throttle
|
|
10
10
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function onBodyTouchstart(handler: EventListenerOrEventListenerObject): void;
|
|
2
|
+
export declare function offBodyTouchstart(handler: EventListenerOrEventListenerObject): void;
|
|
3
|
+
export declare function isTargetElement(event: Event, elements: HTMLElement | HTMLElement[]): boolean;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
function e(
|
|
2
|
-
|
|
1
|
+
function e(t) {
|
|
2
|
+
Array.from(document.body.children).forEach((r) => r.addEventListener("touchstart", t));
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
|
|
4
|
+
function a(t) {
|
|
5
|
+
Array.from(document.body.children).forEach((r) => r.removeEventListener("touchstart", t));
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
const n = Array.isArray(
|
|
7
|
+
function c(t, r) {
|
|
8
|
+
const n = Array.isArray(r) ? r : [r];
|
|
9
9
|
for (let o = 0; o < n.length; o += 1)
|
|
10
|
-
if (n[o] ===
|
|
10
|
+
if (n[o] === t.target || n[o].contains(t.target))
|
|
11
11
|
return !0;
|
|
12
12
|
return !1;
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
c as isTargetElement,
|
|
16
|
+
a as offBodyTouchstart,
|
|
17
17
|
e as onBodyTouchstart
|
|
18
18
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface TreemapDataPoint {
|
|
2
|
+
value: number;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface TreemapRect<T extends TreemapDataPoint = TreemapDataPoint> {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
data?: T;
|
|
11
|
+
}
|
|
12
|
+
export declare function getTreemap({ data, width, height }: {
|
|
13
|
+
data: TreemapDataPoint[];
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}): TreemapRect[];
|
package/dist/utils/treemap.js
CHANGED
|
@@ -7,7 +7,7 @@ const H = (n) => Math.max(...n), R = (n) => Math.min(...n), v = (n, u) => n + u,
|
|
|
7
7
|
throw new Error("You data must be in this format [{ value: 1 }, { value: 2 }], 'value' being a positive number");
|
|
8
8
|
};
|
|
9
9
|
function A({ data: n, width: u, height: i }) {
|
|
10
|
-
let t
|
|
10
|
+
let t, c = [];
|
|
11
11
|
function p(e, o) {
|
|
12
12
|
const r = e.reduce(v, 0), a = H(e), h = R(e);
|
|
13
13
|
return Math.max(o ** 2 * a / r ** 2, r ** 2 / (o ** 2 * h));
|
|
@@ -1,95 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
KvExpandable: y
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
12
|
-
/**
|
|
13
|
-
* Unique id. used for a11y
|
|
14
|
-
* */
|
|
15
|
-
id: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: !0,
|
|
18
|
-
validator: (t) => t.length > 0 && !/\s/g.test(t)
|
|
19
|
-
// must be a valid html5 id
|
|
20
|
-
},
|
|
21
|
-
/**
|
|
22
|
-
* Whether the body is shown initially
|
|
23
|
-
* */
|
|
24
|
-
open: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: !1
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
* Whether the accordion can be toggled
|
|
30
|
-
* */
|
|
31
|
-
disabled: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: !1
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
emits: [
|
|
37
|
-
"toggle"
|
|
38
|
-
],
|
|
39
|
-
setup(t, { emit: n }) {
|
|
40
|
-
const {
|
|
41
|
-
open: a,
|
|
42
|
-
disabled: e
|
|
43
|
-
} = p(t), o = v(a.value);
|
|
44
|
-
return {
|
|
45
|
-
collapse: () => {
|
|
46
|
-
e.value || (o.value = !1);
|
|
47
|
-
},
|
|
48
|
-
expand: () => {
|
|
49
|
-
e.value || (o.value = !0);
|
|
50
|
-
},
|
|
51
|
-
isOpen: o,
|
|
52
|
-
mdiChevronDown: k,
|
|
53
|
-
toggle: () => {
|
|
54
|
-
e.value || (o.value = !o.value, n("toggle", { open: o.value }));
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}, D = { class: "tw-border-b tw-border-tertiary tw-relative last:tw-border-b-0" }, E = ["disabled", "aria-controls", "aria-expanded"], K = { class: "tw-flex-1" }, S = ["id", "aria-hidden"];
|
|
59
|
-
function I(t, n, a, e, o, w) {
|
|
60
|
-
const l = s("kv-material-icon"), r = s("kv-expandable");
|
|
61
|
-
return m(), u("div", D, [
|
|
62
|
-
i("button", {
|
|
1
|
+
import w from "./KvAccordionItem2.js";
|
|
2
|
+
import { resolveComponent as n, openBlock as f, createElementBlock as _, createElementVNode as o, withModifiers as h, renderSlot as r, createVNode as d, normalizeClass as m, withCtx as v, withDirectives as b, vShow as p } from "vue";
|
|
3
|
+
import x from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const k = { class: "tw-border-b tw-border-tertiary tw-relative last:tw-border-b-0" }, u = ["disabled", "aria-controls", "aria-expanded"], g = { class: "tw-flex-1" }, C = ["id", "aria-hidden"];
|
|
5
|
+
function y(i, a, e, t, O, B) {
|
|
6
|
+
const l = n("kv-material-icon"), s = n("kv-expandable");
|
|
7
|
+
return f(), _("div", k, [
|
|
8
|
+
o("button", {
|
|
63
9
|
class: "tw-w-full tw-flex tw-justify-between tw-items-center tw-py-1.5 tw-px-0 tw-text-left disabled:tw-cursor-not-allowed disabled:tw-opacity-low hover:tw-text-action-highlight focus:tw-text-action-highlight",
|
|
64
|
-
disabled:
|
|
65
|
-
"aria-controls": `kv-accordion-${
|
|
66
|
-
"aria-expanded":
|
|
67
|
-
onClick:
|
|
10
|
+
disabled: e.disabled,
|
|
11
|
+
"aria-controls": `kv-accordion-${e.id}`,
|
|
12
|
+
"aria-expanded": t.isOpen ? "true" : "false",
|
|
13
|
+
onClick: a[0] || (a[0] = h((...c) => t.toggle && t.toggle(...c), ["prevent"]))
|
|
68
14
|
}, [
|
|
69
|
-
|
|
70
|
-
|
|
15
|
+
o("span", g, [
|
|
16
|
+
r(i.$slots, "header")
|
|
71
17
|
]),
|
|
72
|
-
|
|
73
|
-
class:
|
|
74
|
-
icon:
|
|
18
|
+
d(l, {
|
|
19
|
+
class: m(["tw-h-3 tw-w-3 tw-transition tw-transform tw-duration-500 tw-ease", { "tw-rotate-180": t.isOpen }]),
|
|
20
|
+
icon: t.mdiChevronDown
|
|
75
21
|
}, null, 8, ["class", "icon"])
|
|
76
|
-
], 8,
|
|
77
|
-
|
|
78
|
-
default:
|
|
79
|
-
b(
|
|
80
|
-
id: `kv-accordion-${
|
|
81
|
-
"aria-hidden":
|
|
22
|
+
], 8, u),
|
|
23
|
+
d(s, null, {
|
|
24
|
+
default: v(() => [
|
|
25
|
+
b(o("div", {
|
|
26
|
+
id: `kv-accordion-${e.id}`,
|
|
27
|
+
"aria-hidden": t.isOpen ? "false" : "true"
|
|
82
28
|
}, [
|
|
83
|
-
|
|
84
|
-
], 8,
|
|
85
|
-
[
|
|
29
|
+
r(i.$slots, "default")
|
|
30
|
+
], 8, C), [
|
|
31
|
+
[p, t.isOpen]
|
|
86
32
|
])
|
|
87
33
|
]),
|
|
88
34
|
_: 3
|
|
89
35
|
})
|
|
90
36
|
]);
|
|
91
37
|
}
|
|
92
|
-
const
|
|
38
|
+
const S = /* @__PURE__ */ x(w, [["render", y]]);
|
|
93
39
|
export {
|
|
94
|
-
|
|
40
|
+
S as default
|
|
95
41
|
};
|