@kiva/kv-components 7.6.3 → 8.0.1
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/.github/copilot-instructions.md +11 -0
- package/AGENTS.md +184 -0
- package/CLAUDE.md +11 -0
- package/GEMINI.md +11 -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 +35 -33
- package/tsconfig.json +32 -0
- package/vite.config.ts +84 -0
package/dist/vue/KvUserAvatar.js
CHANGED
|
@@ -1,153 +1,71 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const K = {
|
|
6
|
-
name: "KvUserAvatar",
|
|
7
|
-
components: {
|
|
8
|
-
KvLoadingPlaceholder: S
|
|
9
|
-
},
|
|
10
|
-
props: {
|
|
11
|
-
/**
|
|
12
|
-
* The name of the lender
|
|
13
|
-
*/
|
|
14
|
-
lenderName: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* The image of the lender
|
|
20
|
-
*/
|
|
21
|
-
lenderImageUrl: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: ""
|
|
24
|
-
},
|
|
25
|
-
/**
|
|
26
|
-
* Whether to render a smaller avatar
|
|
27
|
-
*/
|
|
28
|
-
isSmall: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: !1
|
|
31
|
-
},
|
|
32
|
-
/**
|
|
33
|
-
* Whether to use a css variable for the avatar url before data is loaded
|
|
34
|
-
*/
|
|
35
|
-
showCssPlaceholder: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: !1
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
setup(w) {
|
|
41
|
-
const {
|
|
42
|
-
lenderName: t,
|
|
43
|
-
lenderImageUrl: s,
|
|
44
|
-
isSmall: e,
|
|
45
|
-
showCssPlaceholder: d
|
|
46
|
-
} = B(w), u = m(!0), l = m(null), v = m(null), C = a(() => !d.value && t.value === "" && s.value === "" || t.value === "Anonymous"), _ = a(() => {
|
|
47
|
-
const o = e != null && e.value ? "tw-font-sans tw-font-normal" : "tw-font-serif";
|
|
48
|
-
return `${M(t.value)} ${o}`;
|
|
49
|
-
}), A = a(() => e != null && e.value ? "0 0 27 27" : "0 0 27.5 27.5"), x = a(() => {
|
|
50
|
-
var n;
|
|
51
|
-
if (d.value)
|
|
52
|
-
return !0;
|
|
53
|
-
const o = ((n = s == null ? void 0 : s.value) == null ? void 0 : n.split("/").pop()) ?? "";
|
|
54
|
-
return o && !p(o);
|
|
55
|
-
}), I = a(() => {
|
|
56
|
-
var o;
|
|
57
|
-
return (o = t == null ? void 0 : t.value) == null ? void 0 : o.substring(0, 1).toUpperCase();
|
|
58
|
-
}), g = () => {
|
|
59
|
-
u.value = !1;
|
|
60
|
-
}, U = (o, n = 1e4) => new Promise((k, H) => {
|
|
61
|
-
const L = Date.now() + n, h = () => {
|
|
62
|
-
!o || o.complete ? k(o) : Date.now() > L ? H(new Error(`Timeout: ${o.src}`)) : setTimeout(h, 50);
|
|
63
|
-
};
|
|
64
|
-
h();
|
|
65
|
-
});
|
|
66
|
-
return P(async () => {
|
|
67
|
-
const o = l.value;
|
|
68
|
-
try {
|
|
69
|
-
await U(o), g();
|
|
70
|
-
} catch (n) {
|
|
71
|
-
console.log(n.message);
|
|
72
|
-
}
|
|
73
|
-
}), {
|
|
74
|
-
isAnonymousUser: C,
|
|
75
|
-
avatarClass: _,
|
|
76
|
-
userHasImage: x,
|
|
77
|
-
lenderNameFirstLetter: I,
|
|
78
|
-
letterViewBox: A,
|
|
79
|
-
isLegacyPlaceholderAvatar: p,
|
|
80
|
-
isImageLoading: u,
|
|
81
|
-
onImgLoad: g,
|
|
82
|
-
imageRef: l,
|
|
83
|
-
userAvatar: v
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
}, R = {
|
|
1
|
+
import d from "./KvUserAvatar2.js";
|
|
2
|
+
import { resolveComponent as m, openBlock as t, createElementBlock as r, normalizeClass as c, createElementVNode as l, createCommentVNode as n, withDirectives as w, createVNode as f, vShow as v, normalizeStyle as a, toDisplayString as h } from "vue";
|
|
3
|
+
import g from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const u = {
|
|
87
5
|
key: 0,
|
|
88
6
|
class: "tw-h-3/4",
|
|
89
7
|
viewBox: "0 0 25 37",
|
|
90
8
|
fill: "none",
|
|
91
9
|
xmlns: "http://www.w3.org/2000/svg"
|
|
92
|
-
},
|
|
10
|
+
}, y = ["src"], _ = ["viewBox"], x = {
|
|
93
11
|
x: "50%",
|
|
94
12
|
y: "55%",
|
|
95
13
|
"dominant-baseline": "middle",
|
|
96
14
|
"text-anchor": "middle"
|
|
97
15
|
};
|
|
98
|
-
function
|
|
99
|
-
const
|
|
100
|
-
return
|
|
16
|
+
function C(k, o, s, e, H, A) {
|
|
17
|
+
const i = m("kv-loading-placeholder");
|
|
18
|
+
return t(), r("div", {
|
|
101
19
|
ref: "userAvatar",
|
|
102
|
-
class:
|
|
20
|
+
class: c(["data-hj-suppress tw-flex tw-items-center tw-justify-center tw-rounded-full tw-overflow-hidden", {
|
|
103
21
|
"tw-bg-brand": e.isAnonymousUser,
|
|
104
22
|
[e.avatarClass]: !e.isAnonymousUser
|
|
105
23
|
}])
|
|
106
24
|
}, [
|
|
107
|
-
e.isAnonymousUser ? (
|
|
108
|
-
|
|
25
|
+
e.isAnonymousUser ? (t(), r("svg", u, o[1] || (o[1] = [
|
|
26
|
+
l("path", {
|
|
109
27
|
d: "M8.22861 0.875H0.857178V36.3125H8.22861V0.875Z",
|
|
110
28
|
fill: "white"
|
|
111
29
|
}, null, -1),
|
|
112
|
-
|
|
30
|
+
l("path", {
|
|
113
31
|
d: "M10.1143 23.2751C21.9428 23.2751 24.6857 13.2126 24.6857 11.4626H23.6571C11.8286 11.4626 9.08569 21.5251 9.08569 23.2751H10.1143Z",
|
|
114
32
|
fill: "white"
|
|
115
33
|
}, null, -1),
|
|
116
|
-
|
|
34
|
+
l("path", {
|
|
117
35
|
d: "M9.08569 24.2376C9.08569 26.0751 11.1428 36.3126 23.8285 36.3126H24.8571C24.8571 34.4751 22.8 24.2376 10.1143 24.2376H9.08569Z",
|
|
118
36
|
fill: "white"
|
|
119
37
|
}, null, -1)
|
|
120
|
-
]))) :
|
|
121
|
-
|
|
122
|
-
[
|
|
38
|
+
]))) : n("", !0),
|
|
39
|
+
w(f(i, null, null, 512), [
|
|
40
|
+
[v, !e.isAnonymousUser && e.userHasImage && e.isImageLoading]
|
|
123
41
|
]),
|
|
124
|
-
!e.isAnonymousUser && e.userHasImage ? (
|
|
42
|
+
!e.isAnonymousUser && e.userHasImage ? (t(), r("div", {
|
|
125
43
|
key: 1,
|
|
126
44
|
class: "tw-w-full tw-h-full",
|
|
127
|
-
style:
|
|
45
|
+
style: a(s.showCssPlaceholder ? { display: "var(--user-avatar-display, block)" } : {
|
|
128
46
|
display: e.isImageLoading ? "none" : "block"
|
|
129
47
|
})
|
|
130
48
|
}, [
|
|
131
|
-
|
|
49
|
+
l("img", {
|
|
132
50
|
ref: "imageRef",
|
|
133
51
|
src: s.lenderImageUrl,
|
|
134
52
|
alt: "Image of lender",
|
|
135
53
|
class: "tw-w-full",
|
|
136
|
-
style:
|
|
137
|
-
onLoad:
|
|
138
|
-
}, null, 44,
|
|
139
|
-
], 4)) :
|
|
140
|
-
!e.isAnonymousUser && !e.userHasImage ? (
|
|
54
|
+
style: a(s.showCssPlaceholder ? { content: "var(--user-avatar)" } : {}),
|
|
55
|
+
onLoad: o[0] || (o[0] = (I) => e.onImgLoad())
|
|
56
|
+
}, null, 44, y)
|
|
57
|
+
], 4)) : n("", !0),
|
|
58
|
+
!e.isAnonymousUser && !e.userHasImage ? (t(), r("svg", {
|
|
141
59
|
key: 2,
|
|
142
60
|
class: "tw-w-full tw-h-full",
|
|
143
61
|
fill: "currentColor",
|
|
144
62
|
viewBox: e.letterViewBox
|
|
145
63
|
}, [
|
|
146
|
-
|
|
147
|
-
], 8,
|
|
64
|
+
l("text", x, h(e.lenderNameFirstLetter), 1)
|
|
65
|
+
], 8, _)) : n("", !0)
|
|
148
66
|
], 2);
|
|
149
67
|
}
|
|
150
|
-
const
|
|
68
|
+
const b = /* @__PURE__ */ g(d, [["render", C]]);
|
|
151
69
|
export {
|
|
152
|
-
|
|
70
|
+
b as default
|
|
153
71
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { isLegacyPlaceholderAvatar } from '../utils/imageUtils';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
lenderName: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
lenderImageUrl: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
isSmall: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
showCssPlaceholder: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
}>, {
|
|
20
|
+
isAnonymousUser: import('vue').ComputedRef<boolean>;
|
|
21
|
+
avatarClass: import('vue').ComputedRef<string>;
|
|
22
|
+
userHasImage: import('vue').ComputedRef<boolean>;
|
|
23
|
+
lenderNameFirstLetter: import('vue').ComputedRef<string>;
|
|
24
|
+
letterViewBox: import('vue').ComputedRef<"0 0 27 27" | "0 0 27.5 27.5">;
|
|
25
|
+
isLegacyPlaceholderAvatar: typeof isLegacyPlaceholderAvatar;
|
|
26
|
+
isImageLoading: import('vue').Ref<boolean, boolean>;
|
|
27
|
+
onImgLoad: () => void;
|
|
28
|
+
imageRef: import('vue').Ref<any, any>;
|
|
29
|
+
userAvatar: import('vue').Ref<any, any>;
|
|
30
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
31
|
+
lenderName: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
lenderImageUrl: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
isSmall: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
showCssPlaceholder: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{}>, {
|
|
48
|
+
lenderName: string;
|
|
49
|
+
lenderImageUrl: string;
|
|
50
|
+
isSmall: boolean;
|
|
51
|
+
showCssPlaceholder: boolean;
|
|
52
|
+
}, {}, {
|
|
53
|
+
KvLoadingPlaceholder: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
54
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
55
|
+
export default _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { toRefs as I, ref as r, computed as s, onMounted as U } from "vue";
|
|
2
|
+
import { randomizedUserAvatarClass as B, isLegacyPlaceholderAvatar as f } from "../utils/imageUtils.js";
|
|
3
|
+
import F from "./KvLoadingPlaceholder.js";
|
|
4
|
+
const z = {
|
|
5
|
+
name: "KvUserAvatar",
|
|
6
|
+
components: {
|
|
7
|
+
KvLoadingPlaceholder: F
|
|
8
|
+
},
|
|
9
|
+
props: {
|
|
10
|
+
/**
|
|
11
|
+
* The name of the lender
|
|
12
|
+
*/
|
|
13
|
+
lenderName: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* The image of the lender
|
|
19
|
+
*/
|
|
20
|
+
lenderImageUrl: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* Whether to render a smaller avatar
|
|
26
|
+
*/
|
|
27
|
+
isSmall: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Whether to use a css variable for the avatar url before data is loaded
|
|
33
|
+
*/
|
|
34
|
+
showCssPlaceholder: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
setup(p) {
|
|
40
|
+
const {
|
|
41
|
+
lenderName: t,
|
|
42
|
+
lenderImageUrl: n,
|
|
43
|
+
isSmall: o,
|
|
44
|
+
showCssPlaceholder: l
|
|
45
|
+
} = I(p), u = r(!0), c = r(null), d = r(null), v = s(() => !l.value && t.value === "" && n.value === "" || t.value === "Anonymous"), g = s(() => {
|
|
46
|
+
const e = o != null && o.value ? "tw-font-sans tw-font-normal" : "tw-font-serif";
|
|
47
|
+
return `${B(t.value)} ${e}`;
|
|
48
|
+
}), w = s(() => o != null && o.value ? "0 0 27 27" : "0 0 27.5 27.5"), y = s(() => {
|
|
49
|
+
var a;
|
|
50
|
+
if (l.value)
|
|
51
|
+
return !0;
|
|
52
|
+
const e = ((a = n == null ? void 0 : n.value) == null ? void 0 : a.split("/").pop()) ?? "";
|
|
53
|
+
return e && !f(e);
|
|
54
|
+
}), h = s(() => {
|
|
55
|
+
var e;
|
|
56
|
+
return (e = t == null ? void 0 : t.value) == null ? void 0 : e.substring(0, 1).toUpperCase();
|
|
57
|
+
}), i = () => {
|
|
58
|
+
u.value = !1;
|
|
59
|
+
}, A = (e, a = 1e4) => new Promise((C, L) => {
|
|
60
|
+
const P = Date.now() + a, m = () => {
|
|
61
|
+
!e || e.complete ? C(e) : Date.now() > P ? L(new Error(`Timeout: ${e.src}`)) : setTimeout(m, 50);
|
|
62
|
+
};
|
|
63
|
+
m();
|
|
64
|
+
});
|
|
65
|
+
return U(async () => {
|
|
66
|
+
const e = c.value;
|
|
67
|
+
try {
|
|
68
|
+
await A(e), i();
|
|
69
|
+
} catch (a) {
|
|
70
|
+
console.log(a.message);
|
|
71
|
+
}
|
|
72
|
+
}), {
|
|
73
|
+
isAnonymousUser: v,
|
|
74
|
+
avatarClass: g,
|
|
75
|
+
userHasImage: y,
|
|
76
|
+
lenderNameFirstLetter: h,
|
|
77
|
+
letterViewBox: w,
|
|
78
|
+
isLegacyPlaceholderAvatar: f,
|
|
79
|
+
isImageLoading: u,
|
|
80
|
+
onImgLoad: i,
|
|
81
|
+
imageRef: c,
|
|
82
|
+
userAvatar: d
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
z as default
|
|
88
|
+
};
|
|
@@ -1,86 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
KvMaterialIcon: _
|
|
9
|
-
},
|
|
10
|
-
props: {
|
|
11
|
-
analyticsCategory: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: "event-tracking"
|
|
14
|
-
},
|
|
15
|
-
buttonBorderClass: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: ""
|
|
18
|
-
},
|
|
19
|
-
buttonRadiusClass: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "tw-rounded"
|
|
22
|
-
},
|
|
23
|
-
buttonSize: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: "large",
|
|
26
|
-
validator(n) {
|
|
27
|
-
return [
|
|
28
|
-
"small",
|
|
29
|
-
"medium",
|
|
30
|
-
"large"
|
|
31
|
-
].includes(n);
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
icon: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: w
|
|
37
|
-
},
|
|
38
|
-
menuBorderClass: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: "tw-border tw-border-tertiary"
|
|
41
|
-
},
|
|
42
|
-
menuRadiusClass: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: "tw-rounded"
|
|
45
|
-
},
|
|
46
|
-
menuPosition: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: "left-aligned",
|
|
49
|
-
validator(n) {
|
|
50
|
-
return [
|
|
51
|
-
"left-aligned",
|
|
52
|
-
"right-aligned"
|
|
53
|
-
].includes(n);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
emits: [
|
|
58
|
-
"kv-utility-menu-clicked"
|
|
59
|
-
],
|
|
60
|
-
setup(n, { emit: i }) {
|
|
61
|
-
const t = r(null), e = r(!1), c = r(null), l = (a) => {
|
|
62
|
-
t.value && !t.value.contains(a.target) && (e.value = !1);
|
|
63
|
-
}, o = () => {
|
|
64
|
-
e.value = !e.value, i("kv-utility-menu-clicked", { open: e.value });
|
|
65
|
-
};
|
|
66
|
-
return f(() => {
|
|
67
|
-
document.addEventListener("click", l);
|
|
68
|
-
}), g(() => {
|
|
69
|
-
document.removeEventListener("click", l);
|
|
70
|
-
}), {
|
|
71
|
-
handleMenuClickOutside: l,
|
|
72
|
-
handleMenuAnchorClick: o,
|
|
73
|
-
mdiDotsVertical: w,
|
|
74
|
-
menuAnchor: t,
|
|
75
|
-
menuOpen: e,
|
|
76
|
-
optionsMenu: c
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
function A(n, i, t, e, c, l) {
|
|
81
|
-
const o = h("KvMaterialIcon"), a = y("kv-track-event");
|
|
82
|
-
return s(), d("div", {
|
|
83
|
-
class: u(["tw-relative utility-menu-wrapper", [
|
|
1
|
+
import m from "./KvUtilityMenu2.js";
|
|
2
|
+
import { resolveComponent as s, resolveDirective as d, openBlock as l, createElementBlock as o, normalizeClass as n, withDirectives as a, withModifiers as h, createVNode as v, createElementVNode as b, normalizeStyle as f, renderSlot as g, vShow as _ } from "vue";
|
|
3
|
+
import k from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function z(r, i, t, e, C, S) {
|
|
5
|
+
const w = s("KvMaterialIcon"), c = d("kv-track-event");
|
|
6
|
+
return l(), o("div", {
|
|
7
|
+
class: n(["tw-relative utility-menu-wrapper", [
|
|
84
8
|
{
|
|
85
9
|
"tw-w-4 tw-h-4": t.buttonSize === "small",
|
|
86
10
|
"tw-w-5 tw-h-5": t.buttonSize === "medium",
|
|
@@ -88,9 +12,9 @@ function A(n, i, t, e, c, l) {
|
|
|
88
12
|
}
|
|
89
13
|
]])
|
|
90
14
|
}, [
|
|
91
|
-
|
|
15
|
+
a((l(), o("button", {
|
|
92
16
|
ref: "menuAnchor",
|
|
93
|
-
class:
|
|
17
|
+
class: n(["tw-absolute tw-bg-white tw-flex tw-items-center tw-justify-center menu-trigger", [
|
|
94
18
|
t.buttonBorderClass,
|
|
95
19
|
t.buttonRadiusClass,
|
|
96
20
|
{
|
|
@@ -99,30 +23,30 @@ function A(n, i, t, e, c, l) {
|
|
|
99
23
|
"tw-w-6 tw-h-6": t.buttonSize === "large"
|
|
100
24
|
}
|
|
101
25
|
]]),
|
|
102
|
-
onClick: i[0] || (i[0] =
|
|
26
|
+
onClick: i[0] || (i[0] = h((...u) => e.handleMenuAnchorClick && e.handleMenuAnchorClick(...u), ["stop"]))
|
|
103
27
|
}, [
|
|
104
|
-
|
|
28
|
+
v(w, { icon: t.icon }, null, 8, ["icon"])
|
|
105
29
|
], 2)), [
|
|
106
|
-
[
|
|
30
|
+
[c, [t.analyticsCategory, "click", "utility-menu"]]
|
|
107
31
|
]),
|
|
108
|
-
|
|
32
|
+
a(b("div", {
|
|
109
33
|
ref: "optionsMenu",
|
|
110
|
-
class:
|
|
34
|
+
class: n(["tw-absolute tw-bg-white tw-z-1 tw-shadow-lg vertical-menu", [
|
|
111
35
|
t.menuBorderClass,
|
|
112
36
|
t.menuRadiusClass,
|
|
113
37
|
{
|
|
114
38
|
"tw-right-0": t.menuPosition === "right-aligned"
|
|
115
39
|
}
|
|
116
40
|
]]),
|
|
117
|
-
style:
|
|
41
|
+
style: f(`width: 236px; top: ${t.buttonSize === "small" ? "2.5rem" : "3.5rem"};`)
|
|
118
42
|
}, [
|
|
119
|
-
|
|
43
|
+
g(r.$slots, "default")
|
|
120
44
|
], 6), [
|
|
121
|
-
[
|
|
45
|
+
[_, e.menuOpen]
|
|
122
46
|
])
|
|
123
47
|
], 2);
|
|
124
48
|
}
|
|
125
|
-
const
|
|
49
|
+
const B = /* @__PURE__ */ k(m, [["render", z]]);
|
|
126
50
|
export {
|
|
127
|
-
|
|
51
|
+
B as default
|
|
128
52
|
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
analyticsCategory: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
buttonBorderClass: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
buttonRadiusClass: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
buttonSize: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
validator(value: string): boolean;
|
|
18
|
+
};
|
|
19
|
+
icon: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
menuBorderClass: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
menuRadiusClass: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
menuPosition: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
validator(value: string): boolean;
|
|
35
|
+
};
|
|
36
|
+
}>, {
|
|
37
|
+
handleMenuClickOutside: (event: any) => void;
|
|
38
|
+
handleMenuAnchorClick: () => void;
|
|
39
|
+
mdiDotsVertical: string;
|
|
40
|
+
menuAnchor: import('vue').Ref<any, any>;
|
|
41
|
+
menuOpen: import('vue').Ref<boolean, boolean>;
|
|
42
|
+
optionsMenu: import('vue').Ref<any, any>;
|
|
43
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "kv-utility-menu-clicked"[], "kv-utility-menu-clicked", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
44
|
+
analyticsCategory: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
buttonBorderClass: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
buttonRadiusClass: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
buttonSize: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: string;
|
|
59
|
+
validator(value: string): boolean;
|
|
60
|
+
};
|
|
61
|
+
icon: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
menuBorderClass: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
menuRadiusClass: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
menuPosition: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
validator(value: string): boolean;
|
|
77
|
+
};
|
|
78
|
+
}>> & Readonly<{
|
|
79
|
+
"onKv-utility-menu-clicked"?: (...args: any[]) => any;
|
|
80
|
+
}>, {
|
|
81
|
+
icon: string;
|
|
82
|
+
analyticsCategory: string;
|
|
83
|
+
buttonBorderClass: string;
|
|
84
|
+
buttonRadiusClass: string;
|
|
85
|
+
buttonSize: string;
|
|
86
|
+
menuBorderClass: string;
|
|
87
|
+
menuRadiusClass: string;
|
|
88
|
+
menuPosition: string;
|
|
89
|
+
}, {}, {
|
|
90
|
+
KvMaterialIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
91
|
+
icon: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
96
|
+
icon: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: string;
|
|
99
|
+
};
|
|
100
|
+
}>> & Readonly<{}>, {
|
|
101
|
+
icon: string;
|
|
102
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
103
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
104
|
+
export default _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ref as l, onMounted as s, onBeforeUnmount as c } from "vue";
|
|
2
|
+
import { mdiDotsVertical as r } from "@mdi/js";
|
|
3
|
+
import m from "./KvMaterialIcon.js";
|
|
4
|
+
const v = {
|
|
5
|
+
name: "KvUtilityMenu",
|
|
6
|
+
components: {
|
|
7
|
+
KvMaterialIcon: m
|
|
8
|
+
},
|
|
9
|
+
props: {
|
|
10
|
+
analyticsCategory: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "event-tracking"
|
|
13
|
+
},
|
|
14
|
+
buttonBorderClass: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
buttonRadiusClass: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "tw-rounded"
|
|
21
|
+
},
|
|
22
|
+
buttonSize: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "large",
|
|
25
|
+
validator(t) {
|
|
26
|
+
return [
|
|
27
|
+
"small",
|
|
28
|
+
"medium",
|
|
29
|
+
"large"
|
|
30
|
+
].includes(t);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
icon: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: r
|
|
36
|
+
},
|
|
37
|
+
menuBorderClass: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "tw-border tw-border-tertiary"
|
|
40
|
+
},
|
|
41
|
+
menuRadiusClass: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "tw-rounded"
|
|
44
|
+
},
|
|
45
|
+
menuPosition: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "left-aligned",
|
|
48
|
+
validator(t) {
|
|
49
|
+
return [
|
|
50
|
+
"left-aligned",
|
|
51
|
+
"right-aligned"
|
|
52
|
+
].includes(t);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
emits: [
|
|
57
|
+
"kv-utility-menu-clicked"
|
|
58
|
+
],
|
|
59
|
+
setup(t, { emit: a }) {
|
|
60
|
+
const n = l(null), e = l(!1), u = l(null), i = (d) => {
|
|
61
|
+
n.value && !n.value.contains(d.target) && (e.value = !1);
|
|
62
|
+
}, o = () => {
|
|
63
|
+
e.value = !e.value, a("kv-utility-menu-clicked", { open: e.value });
|
|
64
|
+
};
|
|
65
|
+
return s(() => {
|
|
66
|
+
document.addEventListener("click", i);
|
|
67
|
+
}), c(() => {
|
|
68
|
+
document.removeEventListener("click", i);
|
|
69
|
+
}), {
|
|
70
|
+
handleMenuClickOutside: i,
|
|
71
|
+
handleMenuAnchorClick: o,
|
|
72
|
+
mdiDotsVertical: r,
|
|
73
|
+
menuAnchor: n,
|
|
74
|
+
menuOpen: e,
|
|
75
|
+
optionsMenu: u
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
v as default
|
|
81
|
+
};
|