@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
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import u from "graphql-tag";
|
|
2
|
+
import { mdiChevronRight as d } from "@mdi/js";
|
|
3
|
+
import { throttle as h } from "../utils/throttle.js";
|
|
4
|
+
import { getLendCtaSelectedOption as o, getDropdownPriceArray as l } from "../utils/loanUtils.js";
|
|
5
|
+
import c from "./KvLendAmountButton.js";
|
|
6
|
+
import p from "./KvSelect.js";
|
|
7
|
+
import m from "./KvButton.js";
|
|
8
|
+
import f from "./KvMaterialIcon.js";
|
|
9
|
+
const n = "Other", A = 360, r = 480, a = 380, O = u`
|
|
10
|
+
fragment KvLendCta on LoanBasic {
|
|
11
|
+
id
|
|
12
|
+
name
|
|
13
|
+
status
|
|
14
|
+
minNoteSize
|
|
15
|
+
}
|
|
16
|
+
`, D = u`
|
|
17
|
+
fragment KvLendCtaUser on LoanBasic {
|
|
18
|
+
id
|
|
19
|
+
userProperties {
|
|
20
|
+
lentTo
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`, b = {
|
|
24
|
+
name: "KvLendCta",
|
|
25
|
+
components: {
|
|
26
|
+
KvLendAmountButton: c,
|
|
27
|
+
KvUiButton: m,
|
|
28
|
+
KvUiSelect: p,
|
|
29
|
+
KvMaterialIcon: f
|
|
30
|
+
},
|
|
31
|
+
props: {
|
|
32
|
+
loan: {
|
|
33
|
+
type: Object,
|
|
34
|
+
default: () => ({})
|
|
35
|
+
},
|
|
36
|
+
unreservedAmount: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
},
|
|
40
|
+
basketItems: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
},
|
|
44
|
+
isLoading: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !0
|
|
47
|
+
},
|
|
48
|
+
isAdding: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
enableFiveDollarsNotes: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !1
|
|
55
|
+
},
|
|
56
|
+
kvTrackFunction: {
|
|
57
|
+
type: Function,
|
|
58
|
+
required: !0
|
|
59
|
+
},
|
|
60
|
+
showViewLoan: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !1
|
|
63
|
+
},
|
|
64
|
+
customLoanDetails: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1
|
|
67
|
+
},
|
|
68
|
+
externalLinks: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !1
|
|
71
|
+
},
|
|
72
|
+
route: {
|
|
73
|
+
type: Object,
|
|
74
|
+
default: void 0
|
|
75
|
+
},
|
|
76
|
+
userBalance: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: void 0
|
|
79
|
+
},
|
|
80
|
+
getCookie: {
|
|
81
|
+
type: Function,
|
|
82
|
+
default: void 0
|
|
83
|
+
},
|
|
84
|
+
setCookie: {
|
|
85
|
+
type: Function,
|
|
86
|
+
default: void 0
|
|
87
|
+
},
|
|
88
|
+
fiveDollarsSelected: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: !1
|
|
91
|
+
},
|
|
92
|
+
isVisitor: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: !0
|
|
95
|
+
},
|
|
96
|
+
primaryButtonText: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: "Lend"
|
|
99
|
+
},
|
|
100
|
+
secondaryButtonText: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: void 0
|
|
103
|
+
},
|
|
104
|
+
secondaryButtonHandler: {
|
|
105
|
+
type: Function,
|
|
106
|
+
default: void 0
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* Hide preset buttons under this amount when
|
|
110
|
+
* showPresetAmounts is true
|
|
111
|
+
* */
|
|
112
|
+
maxAmount: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: ""
|
|
115
|
+
},
|
|
116
|
+
showPresetAmounts: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: !1
|
|
119
|
+
},
|
|
120
|
+
kvTrackCategory: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: "Lending"
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* Breakpoint for narrow desktop layout (default: 480px)
|
|
126
|
+
* When component width is below this, it will use stacked layout even on desktop
|
|
127
|
+
*/
|
|
128
|
+
narrowSidebarBreakpoint: {
|
|
129
|
+
type: Number,
|
|
130
|
+
default: r
|
|
131
|
+
},
|
|
132
|
+
/**
|
|
133
|
+
* Breakpoint for narrow desktop dropdown layout (default: 380px)
|
|
134
|
+
* When component width is below this in narrow desktop mode, dropdown moves to second row
|
|
135
|
+
*/
|
|
136
|
+
narrowSidebarDropdownBreakpoint: {
|
|
137
|
+
type: Number,
|
|
138
|
+
default: a
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
data() {
|
|
142
|
+
var t, e;
|
|
143
|
+
return {
|
|
144
|
+
mdiChevronRight: d,
|
|
145
|
+
defaultAmountOptions: [25, 50, 75],
|
|
146
|
+
selectedOption: o(
|
|
147
|
+
this.getCookie,
|
|
148
|
+
this.setCookie,
|
|
149
|
+
this.enableFiveDollarsNotes,
|
|
150
|
+
(e = (t = this.route) == null ? void 0 : t.query) == null ? void 0 : e.utm_campaign,
|
|
151
|
+
this.unreservedAmount,
|
|
152
|
+
this.userBalance ? parseFloat(this.userBalance) : void 0,
|
|
153
|
+
this.fiveDollarsSelected
|
|
154
|
+
),
|
|
155
|
+
selectedDropdownOption: n,
|
|
156
|
+
OTHER_OPTION: n,
|
|
157
|
+
// SSR-safe viewport width initialization
|
|
158
|
+
viewportWidth: typeof window < "u" ? window.innerWidth : 1024,
|
|
159
|
+
componentWidth: 1024,
|
|
160
|
+
resizeObserver: null,
|
|
161
|
+
MOBILE_DROPDOWN_BREAKPOINT: A,
|
|
162
|
+
NARROW_SIDEBAR_BREAKPOINT: r,
|
|
163
|
+
NARROW_SIDEBAR_DROPDOWN_BREAKPOINT: a
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
computed: {
|
|
167
|
+
readMorePath() {
|
|
168
|
+
return this.customLoanDetails ? "" : `/lend/${this.loanId}`;
|
|
169
|
+
},
|
|
170
|
+
loanId() {
|
|
171
|
+
var t;
|
|
172
|
+
return (t = this.loan) == null ? void 0 : t.id;
|
|
173
|
+
},
|
|
174
|
+
status() {
|
|
175
|
+
var t;
|
|
176
|
+
return ((t = this.loan) == null ? void 0 : t.status) ?? "";
|
|
177
|
+
},
|
|
178
|
+
minNoteSize() {
|
|
179
|
+
var t;
|
|
180
|
+
return ((t = this.loan) == null ? void 0 : t.minNoteSize) ?? "";
|
|
181
|
+
},
|
|
182
|
+
lentPreviously() {
|
|
183
|
+
var t, e;
|
|
184
|
+
return ((e = (t = this.loan) == null ? void 0 : t.userProperties) == null ? void 0 : e.lentTo) ?? !1;
|
|
185
|
+
},
|
|
186
|
+
isInBasket() {
|
|
187
|
+
var t;
|
|
188
|
+
return ((t = this.basketItems) == null ? void 0 : t.some((e) => e.__typename === "LoanReservation" && e.id === this.loanId)) ?? !1;
|
|
189
|
+
},
|
|
190
|
+
prices() {
|
|
191
|
+
const t = parseFloat(this.unreservedAmount < 25 ? this.minNoteSize : 25), e = l(
|
|
192
|
+
this.unreservedAmount,
|
|
193
|
+
this.isCompleteLoanActive,
|
|
194
|
+
t,
|
|
195
|
+
this.enableFiveDollarsNotes,
|
|
196
|
+
this.isVisitor
|
|
197
|
+
);
|
|
198
|
+
return this.maxAmount ? e.filter((s) => parseFloat(s) <= parseFloat(this.maxAmount)) : e;
|
|
199
|
+
},
|
|
200
|
+
presetButtonsPrices() {
|
|
201
|
+
const t = this.prices.slice(0, 3);
|
|
202
|
+
return this.prices.length === 4 && t.push(this.prices[3]), t;
|
|
203
|
+
},
|
|
204
|
+
presetDropdownPrices() {
|
|
205
|
+
if (this.prices.length === 4)
|
|
206
|
+
return [];
|
|
207
|
+
const t = this.prices.slice(this.defaultAmountOptions.length);
|
|
208
|
+
return t.unshift(n), t;
|
|
209
|
+
},
|
|
210
|
+
loanName() {
|
|
211
|
+
var t;
|
|
212
|
+
return ((t = this.loan) == null ? void 0 : t.name) ?? "";
|
|
213
|
+
},
|
|
214
|
+
presetAmountCtaButtonText() {
|
|
215
|
+
var t;
|
|
216
|
+
return ((t = this.loan) == null ? void 0 : t.borrowerCount) > 1 ? "Support" : `Support ${this.loanName}`;
|
|
217
|
+
},
|
|
218
|
+
defaultCtaButtonText() {
|
|
219
|
+
return this.showPresetAmounts ? this.presetAmountCtaButtonText : this.primaryButtonText || "Lend";
|
|
220
|
+
},
|
|
221
|
+
ctaButtonText() {
|
|
222
|
+
switch (this.state) {
|
|
223
|
+
case "loading":
|
|
224
|
+
return "Loading...";
|
|
225
|
+
case "refunded":
|
|
226
|
+
case "expired":
|
|
227
|
+
default:
|
|
228
|
+
return this.defaultCtaButtonText;
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
loanInBasketButtonText() {
|
|
232
|
+
return this.secondaryButtonText ? this.secondaryButtonText : this.showPresetAmounts ? "Continue to basket" : "Checkout now";
|
|
233
|
+
},
|
|
234
|
+
useFormSubmit() {
|
|
235
|
+
return !!(this.hideShowLendDropdown || this.lendButtonVisibility || this.showLendAgain || this.state === "lent-to" || this.isAdding);
|
|
236
|
+
},
|
|
237
|
+
state() {
|
|
238
|
+
return this.isLoading ? "loading" : this.isAdding ? "adding" : this.isInBasket ? "basketed" : this.status === "funded" || this.status === "refunded" || this.status === "expired" ? this.status : this.allSharesReserved ? "fully-reserved" : this.lentPreviously ? "lent-to" : "lend";
|
|
239
|
+
},
|
|
240
|
+
lendButtonVisibility() {
|
|
241
|
+
return this.state === "lend" || this.state === "loading";
|
|
242
|
+
},
|
|
243
|
+
showNonActionableLoanButton() {
|
|
244
|
+
return this.state === "refunded" || this.state === "expired";
|
|
245
|
+
},
|
|
246
|
+
hideShowLendDropdown() {
|
|
247
|
+
return this.state === "lend" || this.state === "lent-to";
|
|
248
|
+
},
|
|
249
|
+
allSharesReserved() {
|
|
250
|
+
return parseFloat(this.unreservedAmount) === 0;
|
|
251
|
+
},
|
|
252
|
+
isLessThan25() {
|
|
253
|
+
return this.enableFiveDollarsNotes ? !1 : this.isAmountLessThan25(this.unreservedAmount);
|
|
254
|
+
},
|
|
255
|
+
isLentTo() {
|
|
256
|
+
return this.state === "lent-to";
|
|
257
|
+
},
|
|
258
|
+
isCompleteLoanActive() {
|
|
259
|
+
return this.isAmountLessThan25(this.unreservedAmount) || this.isAmountBetween25And500(this.unreservedAmount);
|
|
260
|
+
},
|
|
261
|
+
isLendAmountButton() {
|
|
262
|
+
const t = this.maxAmount ? this.maxAmount : this.unreservedAmount;
|
|
263
|
+
return (this.lendButtonVisibility || this.state === "lent-to") && this.isAmountLessThan25(t) || this.showPresetAmounts && this.presetButtonsPrices.length === 1 && !this.isAdding;
|
|
264
|
+
},
|
|
265
|
+
isFunded() {
|
|
266
|
+
return this.state === "funded" || this.state === "fully-reserved";
|
|
267
|
+
},
|
|
268
|
+
amountToLend() {
|
|
269
|
+
return this.selectedDropdown ? this.selectedDropdownOption : this.isLessThan25 ? this.unreservedAmount : this.selectedOption;
|
|
270
|
+
},
|
|
271
|
+
amountForLendAmountButton() {
|
|
272
|
+
return this.maxAmount && parseFloat(this.maxAmount) === 25 ? Math.min(parseFloat(this.maxAmount), parseFloat(this.unreservedAmount)) : this.unreservedAmount;
|
|
273
|
+
},
|
|
274
|
+
showLendAgain() {
|
|
275
|
+
return this.isLentTo && !this.isLessThan25;
|
|
276
|
+
},
|
|
277
|
+
selectedDropdown() {
|
|
278
|
+
return this.selectedDropdownOption !== n;
|
|
279
|
+
},
|
|
280
|
+
showFilteredDropdown() {
|
|
281
|
+
return this.presetDropdownPrices.length > 1;
|
|
282
|
+
},
|
|
283
|
+
hideLendButton() {
|
|
284
|
+
return this.showPresetAmounts && (this.isAdding || this.presetButtonsPrices.length === 1);
|
|
285
|
+
},
|
|
286
|
+
/**
|
|
287
|
+
* Determines if component should use narrow desktop layout
|
|
288
|
+
* This is true when we're in desktop viewport but component width is narrow
|
|
289
|
+
*/
|
|
290
|
+
isNarrowDesktop() {
|
|
291
|
+
return this.viewportWidth >= 768 && this.componentWidth < this.narrowSidebarBreakpoint;
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
watch: {
|
|
295
|
+
unreservedAmount(t, e) {
|
|
296
|
+
var s, i;
|
|
297
|
+
t !== e && e === "" && (this.selectedOption = o(
|
|
298
|
+
this.getCookie,
|
|
299
|
+
this.setCookie,
|
|
300
|
+
this.enableFiveDollarsNotes,
|
|
301
|
+
(i = (s = this.route) == null ? void 0 : s.query) == null ? void 0 : i.utm_campaign,
|
|
302
|
+
t,
|
|
303
|
+
this.userBalance ? parseFloat(this.userBalance) : void 0,
|
|
304
|
+
this.fiveDollarsSelected
|
|
305
|
+
)), this.showPresetAmounts && (this.selectedOption = n);
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
mounted() {
|
|
309
|
+
const t = () => {
|
|
310
|
+
var e;
|
|
311
|
+
this.viewportWidth = window.innerWidth, this.componentWidth = ((e = this.$refs.root) == null ? void 0 : e.offsetWidth) || 1024;
|
|
312
|
+
};
|
|
313
|
+
typeof window < "u" && (this.viewportWidth = window.innerWidth, window.ResizeObserver && this.$nextTick(() => {
|
|
314
|
+
this.resizeObserver = new window.ResizeObserver(h(t, 50)), this.$refs.root && (this.resizeObserver.observe(this.$refs.root), t());
|
|
315
|
+
}));
|
|
316
|
+
},
|
|
317
|
+
beforeDestroy() {
|
|
318
|
+
this.resizeHandler && typeof window < "u" && window.removeEventListener("resize", this.resizeHandler), this.resizeObserver && this.$refs.root && this.resizeObserver.disconnect();
|
|
319
|
+
},
|
|
320
|
+
methods: {
|
|
321
|
+
async addToBasket() {
|
|
322
|
+
this.kvTrackFunction(
|
|
323
|
+
this.kvTrackCategory,
|
|
324
|
+
"Add to basket",
|
|
325
|
+
this.showLendAgain ? "Lend again" : "lend-button-click",
|
|
326
|
+
this.loanId,
|
|
327
|
+
this.amountToLend
|
|
328
|
+
), this.$emit("add-to-basket", this.amountToLend);
|
|
329
|
+
},
|
|
330
|
+
isAmountLessThan25(t) {
|
|
331
|
+
return t < 25 && t > 0;
|
|
332
|
+
},
|
|
333
|
+
isAmountBetween25And50(t) {
|
|
334
|
+
return t <= 50 && t > 25;
|
|
335
|
+
},
|
|
336
|
+
isAmountBetween25And500(t) {
|
|
337
|
+
return t < 500 && t >= 25;
|
|
338
|
+
},
|
|
339
|
+
trackLendAmountSelection(t) {
|
|
340
|
+
this.showPresetAmounts && (this.selectedOption = null), this.kvTrackFunction(
|
|
341
|
+
this.kvTrackCategory,
|
|
342
|
+
"Modify lend amount",
|
|
343
|
+
t,
|
|
344
|
+
this.loanId,
|
|
345
|
+
this.loanId
|
|
346
|
+
);
|
|
347
|
+
},
|
|
348
|
+
clickDropdown() {
|
|
349
|
+
this.kvTrackFunction(
|
|
350
|
+
this.kvTrackCategory,
|
|
351
|
+
"click-Modify loan amount",
|
|
352
|
+
"open dialog",
|
|
353
|
+
this.loanId,
|
|
354
|
+
this.loanId
|
|
355
|
+
);
|
|
356
|
+
},
|
|
357
|
+
clickSecondaryButton(t) {
|
|
358
|
+
this.secondaryButtonHandler ? (t.preventDefault(), t.stopPropagation(), this.secondaryButtonHandler()) : this.handleCheckout();
|
|
359
|
+
},
|
|
360
|
+
clickPresetButton(t) {
|
|
361
|
+
this.kvTrackFunction(
|
|
362
|
+
this.kvTrackCategory,
|
|
363
|
+
"Modify lend amount",
|
|
364
|
+
t,
|
|
365
|
+
this.loanId,
|
|
366
|
+
this.loanId
|
|
367
|
+
), this.selectedOption = t, this.selectedDropdownOption = n;
|
|
368
|
+
},
|
|
369
|
+
handleCheckout() {
|
|
370
|
+
this.kvTrackFunction(
|
|
371
|
+
this.kvTrackCategory,
|
|
372
|
+
"click-Continue-to-checkout",
|
|
373
|
+
"Continue to checkout",
|
|
374
|
+
this.loanId,
|
|
375
|
+
this.loanId
|
|
376
|
+
);
|
|
377
|
+
},
|
|
378
|
+
isNarrowComponent() {
|
|
379
|
+
return this.componentWidth < 430;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
export {
|
|
384
|
+
O as KV_LEND_CTA_FRAGMENT,
|
|
385
|
+
D as KV_LEND_CTA_USER_FRAGMENT,
|
|
386
|
+
b as default
|
|
387
|
+
};
|
package/dist/vue/KvLightbox.js
CHANGED
|
@@ -1,129 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { unlockScroll as A, lockScroll as G } from "../utils/scrollLock.js";
|
|
6
|
-
import { unlockPrintSingleEl as H, lockPrintSingleEl as J } from "../utils/printing.js";
|
|
7
|
-
import Q from "./KvMaterialIcon.js";
|
|
8
|
-
import W from "../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
-
const X = {
|
|
10
|
-
components: {
|
|
11
|
-
KvMaterialIcon: Q
|
|
12
|
-
},
|
|
13
|
-
props: {
|
|
14
|
-
/**
|
|
15
|
-
* Whether to apply a blur to the background behind the lightbox
|
|
16
|
-
*/
|
|
17
|
-
blurBackground: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: !1
|
|
20
|
-
},
|
|
21
|
-
/**
|
|
22
|
-
* Whether the dialog is open or not
|
|
23
|
-
* */
|
|
24
|
-
visible: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: !1
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
* Appearance and role of the lightbox
|
|
30
|
-
* @values lightbox, alert
|
|
31
|
-
* */
|
|
32
|
-
variant: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "lightbox",
|
|
35
|
-
validator(n) {
|
|
36
|
-
return ["lightbox", "alert"].includes(n);
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
/**
|
|
40
|
-
* The title of the dialog which describes the dialog to screenreaders, and if no
|
|
41
|
-
* content is in the `header` slot, will be displayed at the top of the lightbox.
|
|
42
|
-
* */
|
|
43
|
-
title: {
|
|
44
|
-
type: String,
|
|
45
|
-
required: !0
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* The dialog has no close X button, clicking the screen does not close,
|
|
49
|
-
* pressing ESC does not close.
|
|
50
|
-
* */
|
|
51
|
-
preventClose: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: !1
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
emits: [
|
|
57
|
-
"lightbox-closed"
|
|
58
|
-
],
|
|
59
|
-
setup(n, { emit: e }) {
|
|
60
|
-
const {
|
|
61
|
-
visible: t,
|
|
62
|
-
variant: l,
|
|
63
|
-
preventClose: x
|
|
64
|
-
} = L(n), c = u(null), a = u(null), r = u(null), w = u(null), v = u(null);
|
|
65
|
-
C(() => {
|
|
66
|
-
const {
|
|
67
|
-
activate: o,
|
|
68
|
-
deactivate: s
|
|
69
|
-
} = T([
|
|
70
|
-
c.value,
|
|
71
|
-
// This lightbox
|
|
72
|
-
'[role="alert"]'
|
|
73
|
-
// Any open toasts/alerts on the page
|
|
74
|
-
], {
|
|
75
|
-
allowOutsideClick: !0
|
|
76
|
-
// allow clicking outside the lightbox to close it
|
|
77
|
-
});
|
|
78
|
-
w.value = o, v.value = s;
|
|
79
|
-
});
|
|
80
|
-
let m = null, f = null;
|
|
81
|
-
const B = E(() => l.value === "alert" ? "alertdialog" : "dialog"), d = (o = "") => {
|
|
82
|
-
var s;
|
|
83
|
-
c.value && a.value && ((s = v.value) == null || s.call(v), a.value.scrollTop = 0, H(a.value)), A(), m && (m(), m = null), document.removeEventListener("keyup", f), e("lightbox-closed", { type: o });
|
|
84
|
-
};
|
|
85
|
-
f = (o) => {
|
|
86
|
-
o && o.key === "Escape" && !x.value && d();
|
|
87
|
-
};
|
|
88
|
-
const _ = () => {
|
|
89
|
-
x.value || d("background-click");
|
|
90
|
-
}, h = () => {
|
|
91
|
-
t.value && (document.addEventListener("keyup", f), C(() => {
|
|
92
|
-
var o;
|
|
93
|
-
if (c.value && a.value && ((o = w.value) == null || o.call(w), m = U(c.value), J(a.value)), G(), l.value === "alert") {
|
|
94
|
-
const s = r.value.querySelector("button");
|
|
95
|
-
s && s.focus();
|
|
96
|
-
}
|
|
97
|
-
}));
|
|
98
|
-
};
|
|
99
|
-
return K(t, () => {
|
|
100
|
-
t.value ? h() : d();
|
|
101
|
-
}), M(() => {
|
|
102
|
-
t.value && h();
|
|
103
|
-
}), N(() => d()), {
|
|
104
|
-
mdiClose: O,
|
|
105
|
-
role: B,
|
|
106
|
-
kvLightbox: c,
|
|
107
|
-
kvLightboxBody: a,
|
|
108
|
-
onKeyUp: f,
|
|
109
|
-
onScreenClick: _,
|
|
110
|
-
hide: d,
|
|
111
|
-
show: h,
|
|
112
|
-
controlsRef: r
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
}, Y = ["aria-label", "aria-describedby", "role"], Z = { class: "tw-flex tw-p-2.5 md:tw-px-4 md:tw-pt-4 md:tw-pb-3.5" }, F = { class: "tw-flex-grow" }, $ = { class: "tw-flex-1" }, tt = {
|
|
1
|
+
import v from "./KvLightbox2.js";
|
|
2
|
+
import { resolveComponent as f, openBlock as n, createBlock as x, Transition as b, withCtx as u, withDirectives as h, createElementVNode as o, withModifiers as w, createElementBlock as r, createCommentVNode as s, normalizeClass as c, renderSlot as d, toDisplayString as k, createVNode as y, vShow as g } from "vue";
|
|
3
|
+
import C from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const _ = ["aria-label", "aria-describedby", "role"], p = { class: "tw-flex tw-p-2.5 md:tw-px-4 md:tw-pt-4 md:tw-pb-3.5" }, B = { class: "tw-flex-grow" }, S = { class: "tw-flex-1" }, L = {
|
|
116
5
|
id: "kvLightboxBody",
|
|
117
6
|
ref: "kvLightboxBody",
|
|
118
7
|
class: "tw-flex-1 tw-px-2.5 md:tw-px-4 tw-pb-2.5 md:tw-pb-4 tw-overflow-auto"
|
|
119
|
-
},
|
|
8
|
+
}, N = {
|
|
120
9
|
key: 0,
|
|
121
10
|
ref: "controlsRef",
|
|
122
11
|
class: "tw-flex-shrink-0 tw-flex tw-justify-end tw-gap-x-2.5 tw-p-2.5 md:tw-px-4 md:tw-pb-4 md:tw-pt-1"
|
|
123
12
|
};
|
|
124
|
-
function
|
|
125
|
-
const
|
|
126
|
-
return
|
|
13
|
+
function V(i, e, t, l, j, z) {
|
|
14
|
+
const m = f("kv-material-icon");
|
|
15
|
+
return n(), x(b, {
|
|
127
16
|
"enter-active-class": "tw-transition-opacity tw-duration-300",
|
|
128
17
|
"leave-active-class": "tw-transition-opacity tw-duration-300",
|
|
129
18
|
"enter-class": "tw-opacity-0",
|
|
@@ -131,28 +20,28 @@ function lt(n, e, t, l, x, c) {
|
|
|
131
20
|
"leave-class": "tw-opacity-full",
|
|
132
21
|
"leave-to-class": "tw-opacity-0"
|
|
133
22
|
}, {
|
|
134
|
-
default:
|
|
135
|
-
|
|
23
|
+
default: u(() => [
|
|
24
|
+
h(o("div", {
|
|
136
25
|
class: "tw-z-modal tw-fixed tw-inset-0 tw-bg-black tw-bg-opacity-[75%]",
|
|
137
|
-
onClick: e[3] || (e[3] =
|
|
26
|
+
onClick: e[3] || (e[3] = w((...a) => l.onScreenClick && l.onScreenClick(...a), ["stop", "prevent"]))
|
|
138
27
|
}, [
|
|
139
|
-
|
|
140
|
-
t.blurBackground ? (
|
|
28
|
+
o("div", null, [
|
|
29
|
+
t.blurBackground ? (n(), r("div", {
|
|
141
30
|
key: 0,
|
|
142
31
|
class: "tw-fixed tw-inset-0 tw-w-full tw-h-full tw-backdrop-blur-sm",
|
|
143
|
-
onClick: e[0] || (e[0] =
|
|
144
|
-
})) :
|
|
145
|
-
|
|
146
|
-
class:
|
|
32
|
+
onClick: e[0] || (e[0] = w((...a) => l.onScreenClick && l.onScreenClick(...a), ["stop", "prevent"]))
|
|
33
|
+
})) : s("", !0),
|
|
34
|
+
o("div", {
|
|
35
|
+
class: c(["tw-flex tw-absolute tw-inset-0", {
|
|
147
36
|
"md:tw-px-2": t.variant === "lightbox",
|
|
148
37
|
"tw-px-2": t.variant === "alert"
|
|
149
38
|
}])
|
|
150
39
|
}, [
|
|
151
|
-
|
|
40
|
+
o("div", {
|
|
152
41
|
ref: "kvLightbox",
|
|
153
42
|
tabindex: "-1",
|
|
154
43
|
"data-test": "kv-lightbox",
|
|
155
|
-
class:
|
|
44
|
+
class: c(["tw-bg-primary tw-flex tw-flex-col tw-mx-auto md:tw-my-auto", {
|
|
156
45
|
"tw-w-full md:tw-w-auto": t.variant === "lightbox",
|
|
157
46
|
"tw-mt-auto md:tw-my-auto": t.variant === "lightbox",
|
|
158
47
|
"tw-min-h-half-screen md:tw-min-h-0": t.variant === "lightbox",
|
|
@@ -164,44 +53,44 @@ function lt(n, e, t, l, x, c) {
|
|
|
164
53
|
"aria-label": t.title ? t.title : null,
|
|
165
54
|
"aria-describedby": t.variant === "alert" ? "kvLightboxBody" : null,
|
|
166
55
|
role: l.role,
|
|
167
|
-
onClick: e[2] || (e[2] =
|
|
56
|
+
onClick: e[2] || (e[2] = w(() => {
|
|
168
57
|
}, ["stop"]))
|
|
169
58
|
}, [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
59
|
+
o("div", p, [
|
|
60
|
+
o("div", B, [
|
|
61
|
+
d(i.$slots, "header", {}, () => [
|
|
62
|
+
o("h2", S, k(t.title), 1)
|
|
174
63
|
])
|
|
175
64
|
]),
|
|
176
|
-
t.preventClose ?
|
|
65
|
+
t.preventClose ? s("", !0) : (n(), r("button", {
|
|
177
66
|
key: 0,
|
|
178
67
|
class: "tw-grid tw-content-center tw-justify-center tw-ml-auto tw-w-6 tw-h-6 tw--m-2 hover:tw-text-action-highlight",
|
|
179
|
-
onClick: e[1] || (e[1] =
|
|
68
|
+
onClick: e[1] || (e[1] = w((a) => l.hide("close-x"), ["stop"]))
|
|
180
69
|
}, [
|
|
181
|
-
|
|
70
|
+
y(m, {
|
|
182
71
|
class: "tw-w-3 tw-h-3",
|
|
183
72
|
icon: l.mdiClose
|
|
184
73
|
}, null, 8, ["icon"]),
|
|
185
|
-
e[4] || (e[4] =
|
|
74
|
+
e[4] || (e[4] = o("span", { class: "tw-sr-only" }, "Close", -1))
|
|
186
75
|
]))
|
|
187
76
|
]),
|
|
188
|
-
|
|
189
|
-
|
|
77
|
+
o("div", L, [
|
|
78
|
+
d(i.$slots, "default")
|
|
190
79
|
], 512),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
], 512)) :
|
|
194
|
-
], 10,
|
|
80
|
+
i.$slots.controls ? (n(), r("div", N, [
|
|
81
|
+
d(i.$slots, "controls")
|
|
82
|
+
], 512)) : s("", !0)
|
|
83
|
+
], 10, _)
|
|
195
84
|
], 2)
|
|
196
85
|
])
|
|
197
86
|
], 512), [
|
|
198
|
-
[
|
|
87
|
+
[g, t.visible]
|
|
199
88
|
])
|
|
200
89
|
]),
|
|
201
90
|
_: 3
|
|
202
91
|
});
|
|
203
92
|
}
|
|
204
|
-
const
|
|
93
|
+
const M = /* @__PURE__ */ C(v, [["render", V]]);
|
|
205
94
|
export {
|
|
206
|
-
|
|
95
|
+
M as default
|
|
207
96
|
};
|