@kiva/kv-components 10.6.0 → 10.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/index.js +20 -20
  2. package/dist/vue/KvAccordionItem.js +1 -1
  3. package/dist/vue/KvActivityRow.js +1 -1
  4. package/dist/vue/KvAtbModal.js +1 -1
  5. package/dist/vue/KvBorrowerImage.js +1 -1
  6. package/dist/vue/KvButton.js +1 -1
  7. package/dist/vue/KvCardFrame.js +1 -1
  8. package/dist/vue/KvCarousel.js +1 -1
  9. package/dist/vue/KvCartModal.js +1 -1
  10. package/dist/vue/KvCartPill.js +1 -1
  11. package/dist/vue/KvCheckbox.js +1 -1
  12. package/dist/vue/KvCheckoutReceipt.js +1 -1
  13. package/dist/vue/KvChip.js +1 -1
  14. package/dist/vue/KvClassicLoanCard.js +252 -295
  15. package/dist/vue/KvClassicLoanCard.script.js +298 -0
  16. package/dist/vue/KvCommentsAdd.js +2 -2
  17. package/dist/vue/KvCommentsContainer.js +2 -2
  18. package/dist/vue/KvCommentsHeartButton.js +1 -1
  19. package/dist/vue/KvCommentsList.js +1 -1
  20. package/dist/vue/KvCommentsListItem.js +2 -2
  21. package/dist/vue/KvCommentsReplyButton.js +1 -1
  22. package/dist/vue/KvCompactLoanCard.js +416 -380
  23. package/dist/vue/KvCompactLoanCard.script.js +382 -0
  24. package/dist/vue/KvContentfulImg.js +1 -1
  25. package/dist/vue/KvCountdownTimer.js +1 -1
  26. package/dist/vue/KvDatePicker.js +1 -1
  27. package/dist/vue/KvExpandable.js +1 -1
  28. package/dist/vue/KvExpandableQuestion.js +1 -1
  29. package/dist/vue/KvFlag.js +1 -1
  30. package/dist/vue/KvFormAssemblyForm.js +2 -95
  31. package/dist/vue/KvFormAssemblyForm.script.js +97 -0
  32. package/dist/vue/KvGrid.js +1 -1
  33. package/dist/vue/KvIconBag.js +1 -1
  34. package/dist/vue/KvIconButton.js +2 -116
  35. package/dist/vue/KvIconButton.script.js +118 -0
  36. package/dist/vue/KvImageUpload.css +1 -1
  37. package/dist/vue/KvImageUpload.js +47 -34
  38. package/dist/vue/KvImageUpload.script.js +176 -0
  39. package/dist/vue/KvImpactVerticalSelector.js +1 -1
  40. package/dist/vue/KvInlineActivityCard.js +1 -1
  41. package/dist/vue/KvInlineActivityFeed.js +1 -1
  42. package/dist/vue/KvIntroductionLoanCard.js +247 -220
  43. package/dist/vue/KvIntroductionLoanCard.script.js +223 -0
  44. package/dist/vue/KvLendAmountButton.js +1 -1
  45. package/dist/vue/KvLendCta.js +355 -389
  46. package/dist/vue/KvLendCta.script.js +391 -0
  47. package/dist/vue/KvLightbox.js +1 -1
  48. package/dist/vue/KvLineGraph.js +1 -1
  49. package/dist/vue/KvLoadingSpinner.js +1 -1
  50. package/dist/vue/KvLoanActivities.js +75 -149
  51. package/dist/vue/KvLoanActivities.script.js +151 -0
  52. package/dist/vue/KvLoanBookmark.js +22 -33
  53. package/dist/vue/KvLoanBookmark.script.js +35 -0
  54. package/dist/vue/KvLoanCallouts.js +1 -1
  55. package/dist/vue/KvLoanInfoCard.js +2 -2
  56. package/dist/vue/KvLoanProgressGroup.js +1 -1
  57. package/dist/vue/KvLoanTag.js +44 -123
  58. package/dist/vue/KvLoanTag.script.js +125 -0
  59. package/dist/vue/KvLoanUse.js +14 -111
  60. package/dist/vue/KvLoanUse.script.js +113 -0
  61. package/dist/vue/KvMap.js +1 -1
  62. package/dist/vue/KvMaterialIcon.js +1 -1
  63. package/dist/vue/KvPageContainer.js +1 -1
  64. package/dist/vue/KvPagination.js +1 -1
  65. package/dist/vue/KvPieChart.js +1 -1
  66. package/dist/vue/KvPieChartV2.js +1 -1
  67. package/dist/vue/KvPill.js +1 -1
  68. package/dist/vue/KvPopper.js +1 -1
  69. package/dist/vue/KvProgressBar.js +1 -1
  70. package/dist/vue/KvProgressCircle.js +1 -1
  71. package/dist/vue/KvPulsingDot.js +1 -1
  72. package/dist/vue/KvRadio.js +1 -1
  73. package/dist/vue/KvSecondaryNav.js +1 -1
  74. package/dist/vue/KvSelect.js +1 -1
  75. package/dist/vue/KvSideSheet.js +1 -1
  76. package/dist/vue/KvSimpleMap.js +1 -1
  77. package/dist/vue/KvStackedBarGraph.js +1 -1
  78. package/dist/vue/KvSwitch.js +1 -1
  79. package/dist/vue/KvTab.js +1 -1
  80. package/dist/vue/KvTabPanel.js +1 -1
  81. package/dist/vue/KvTabs.js +1 -1
  82. package/dist/vue/KvTextInput.js +1 -1
  83. package/dist/vue/KvTextLink.js +1 -1
  84. package/dist/vue/KvThemeProvider.js +1 -1
  85. package/dist/vue/KvToast.js +1 -1
  86. package/dist/vue/KvTooltip.js +1 -1
  87. package/dist/vue/KvTreeMapChart.js +1 -1
  88. package/dist/vue/KvUserAvatar.js +1 -1
  89. package/dist/vue/KvUtilityMenu.js +1 -1
  90. package/dist/vue/KvVerticalCarousel.js +1 -1
  91. package/dist/vue/KvVotingCard.js +1 -1
  92. package/dist/vue/KvVotingCardV2.js +1 -1
  93. package/dist/vue/KvWideLoanCard.js +206 -232
  94. package/dist/vue/KvWideLoanCard.script.js +235 -0
  95. package/dist/vue/KvWwwHeader/KvHeaderAboutMenu.js +1 -1
  96. package/dist/vue/KvWwwHeader/KvHeaderDropdownLink.js +1 -1
  97. package/dist/vue/KvWwwHeader/KvHeaderLinkBar.js +1 -1
  98. package/dist/vue/KvWwwHeader/KvHeaderLogo.js +1 -1
  99. package/dist/vue/KvWwwHeader/KvHeaderMobileMenu.js +1 -1
  100. package/dist/vue/KvWwwHeader/KvHeaderMyKivaMenu.js +1 -1
  101. package/dist/vue/KvWwwHeader/KvHeaderTakeActionMenu.js +1 -1
  102. package/dist/vue/KvWwwHeader/LendMenu/KvLendListMenu.js +1 -1
  103. package/dist/vue/KvWwwHeader/LendMenu/KvLendMegaMenu.js +1 -1
  104. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenu.js +1 -1
  105. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuCountryList.js +1 -1
  106. package/dist/vue/KvWwwHeader/LendMenu/KvLendMenuSearchList.js +1 -1
  107. package/dist/vue/KvWwwHeader.js +1 -1
  108. package/dist/vue/KvWwwHeaderBasic/AboutMenu.js +1 -1
  109. package/dist/vue/KvWwwHeaderBasic/HeaderMenuGroup.js +1 -1
  110. package/dist/vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js +1 -1
  111. package/dist/vue/KvWwwHeaderBasic/LinkBar.js +1 -1
  112. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/CategoriesPanel.js +1 -1
  113. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MobileLendMenu.js +1 -1
  114. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/MyKivaPanel.js +1 -1
  115. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/RegionsPanel.js +1 -1
  116. package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/SearchPanel.js +1 -1
  117. package/dist/vue/KvWwwHeaderBasic/MobileMenu.js +1 -1
  118. package/dist/vue/KvWwwHeaderBasic/MyKivaMenu.js +1 -1
  119. package/dist/vue/KvWwwHeaderBasic/SearchBar.js +1 -1
  120. package/package.json +2 -2
  121. package/vite.config.ts +16 -13
  122. package/dist/vue/KvClassicLoanCard2.js +0 -255
  123. package/dist/vue/KvCompactLoanCard2.js +0 -418
  124. package/dist/vue/KvFormAssemblyForm2.js +0 -4
  125. package/dist/vue/KvIconButton2.js +0 -4
  126. package/dist/vue/KvImageUpload2.js +0 -150
  127. package/dist/vue/KvIntroductionLoanCard2.js +0 -250
  128. package/dist/vue/KvLendCta2.js +0 -357
  129. package/dist/vue/KvLoanActivities2.js +0 -77
  130. package/dist/vue/KvLoanBookmark2.js +0 -24
  131. package/dist/vue/KvLoanTag2.js +0 -46
  132. package/dist/vue/KvLoanUse2.js +0 -16
  133. package/dist/vue/KvWideLoanCard2.js +0 -209
  134. /package/dist/vue/{KvAccordionItem2.js → KvAccordionItem.script.js} +0 -0
  135. /package/dist/vue/{KvActivityRow2.js → KvActivityRow.script.js} +0 -0
  136. /package/dist/vue/{KvAtbModal2.js → KvAtbModal.script.js} +0 -0
  137. /package/dist/vue/{KvBorrowerImage2.js → KvBorrowerImage.script.js} +0 -0
  138. /package/dist/vue/{KvButton2.js → KvButton.script.js} +0 -0
  139. /package/dist/vue/{KvCardFrame2.js → KvCardFrame.script.js} +0 -0
  140. /package/dist/vue/{KvCarousel2.js → KvCarousel.script.js} +0 -0
  141. /package/dist/vue/{KvCartModal2.js → KvCartModal.script.js} +0 -0
  142. /package/dist/vue/{KvCartPill2.js → KvCartPill.script.js} +0 -0
  143. /package/dist/vue/{KvCheckbox2.js → KvCheckbox.script.js} +0 -0
  144. /package/dist/vue/{KvCheckoutReceipt2.js → KvCheckoutReceipt.script.js} +0 -0
  145. /package/dist/vue/{KvChip2.js → KvChip.script.js} +0 -0
  146. /package/dist/vue/{KvCommentsAdd2.js → KvCommentsAdd.script.js} +0 -0
  147. /package/dist/vue/{KvCommentsContainer2.js → KvCommentsContainer.script.js} +0 -0
  148. /package/dist/vue/{KvCommentsHeartButton2.js → KvCommentsHeartButton.script.js} +0 -0
  149. /package/dist/vue/{KvCommentsList2.js → KvCommentsList.script.js} +0 -0
  150. /package/dist/vue/{KvCommentsListItem2.js → KvCommentsListItem.script.js} +0 -0
  151. /package/dist/vue/{KvCommentsReplyButton2.js → KvCommentsReplyButton.script.js} +0 -0
  152. /package/dist/vue/{KvContentfulImg2.js → KvContentfulImg.script.js} +0 -0
  153. /package/dist/vue/{KvCountdownTimer2.js → KvCountdownTimer.script.js} +0 -0
  154. /package/dist/vue/{KvDatePicker2.js → KvDatePicker.script.js} +0 -0
  155. /package/dist/vue/{KvExpandable2.js → KvExpandable.script.js} +0 -0
  156. /package/dist/vue/{KvExpandableQuestion2.js → KvExpandableQuestion.script.js} +0 -0
  157. /package/dist/vue/{KvFlag2.js → KvFlag.script.js} +0 -0
  158. /package/dist/vue/{KvGrid2.js → KvGrid.script.js} +0 -0
  159. /package/dist/vue/{KvIconBag2.js → KvIconBag.script.js} +0 -0
  160. /package/dist/vue/{KvImpactVerticalSelector2.js → KvImpactVerticalSelector.script.js} +0 -0
  161. /package/dist/vue/{KvInlineActivityCard2.js → KvInlineActivityCard.script.js} +0 -0
  162. /package/dist/vue/{KvInlineActivityFeed2.js → KvInlineActivityFeed.script.js} +0 -0
  163. /package/dist/vue/{KvLendAmountButton2.js → KvLendAmountButton.script.js} +0 -0
  164. /package/dist/vue/{KvLightbox2.js → KvLightbox.script.js} +0 -0
  165. /package/dist/vue/{KvLineGraph2.js → KvLineGraph.script.js} +0 -0
  166. /package/dist/vue/{KvLoadingSpinner2.js → KvLoadingSpinner.script.js} +0 -0
  167. /package/dist/vue/{KvLoanCallouts2.js → KvLoanCallouts.script.js} +0 -0
  168. /package/dist/vue/{KvLoanProgressGroup2.js → KvLoanProgressGroup.script.js} +0 -0
  169. /package/dist/vue/{KvMap2.js → KvMap.script.js} +0 -0
  170. /package/dist/vue/{KvMaterialIcon2.js → KvMaterialIcon.script.js} +0 -0
  171. /package/dist/vue/{KvPageContainer2.js → KvPageContainer.script.js} +0 -0
  172. /package/dist/vue/{KvPagination2.js → KvPagination.script.js} +0 -0
  173. /package/dist/vue/{KvPieChart2.js → KvPieChart.script.js} +0 -0
  174. /package/dist/vue/{KvPieChartV22.js → KvPieChartV2.script.js} +0 -0
  175. /package/dist/vue/{KvPill2.js → KvPill.script.js} +0 -0
  176. /package/dist/vue/{KvPopper2.js → KvPopper.script.js} +0 -0
  177. /package/dist/vue/{KvProgressBar2.js → KvProgressBar.script.js} +0 -0
  178. /package/dist/vue/{KvProgressCircle2.js → KvProgressCircle.script.js} +0 -0
  179. /package/dist/vue/{KvPulsingDot2.js → KvPulsingDot.script.js} +0 -0
  180. /package/dist/vue/{KvRadio2.js → KvRadio.script.js} +0 -0
  181. /package/dist/vue/{KvSecondaryNav2.js → KvSecondaryNav.script.js} +0 -0
  182. /package/dist/vue/{KvSelect2.js → KvSelect.script.js} +0 -0
  183. /package/dist/vue/{KvSideSheet2.js → KvSideSheet.script.js} +0 -0
  184. /package/dist/vue/{KvSimpleMap2.js → KvSimpleMap.script.js} +0 -0
  185. /package/dist/vue/{KvStackedBarGraph2.js → KvStackedBarGraph.script.js} +0 -0
  186. /package/dist/vue/{KvSwitch2.js → KvSwitch.script.js} +0 -0
  187. /package/dist/vue/{KvTab2.js → KvTab.script.js} +0 -0
  188. /package/dist/vue/{KvTabPanel2.js → KvTabPanel.script.js} +0 -0
  189. /package/dist/vue/{KvTabs2.js → KvTabs.script.js} +0 -0
  190. /package/dist/vue/{KvTextInput2.js → KvTextInput.script.js} +0 -0
  191. /package/dist/vue/{KvTextLink2.js → KvTextLink.script.js} +0 -0
  192. /package/dist/vue/{KvThemeProvider2.js → KvThemeProvider.script.js} +0 -0
  193. /package/dist/vue/{KvToast2.js → KvToast.script.js} +0 -0
  194. /package/dist/vue/{KvTooltip2.js → KvTooltip.script.js} +0 -0
  195. /package/dist/vue/{KvTreeMapChart2.js → KvTreeMapChart.script.js} +0 -0
  196. /package/dist/vue/{KvUserAvatar2.js → KvUserAvatar.script.js} +0 -0
  197. /package/dist/vue/{KvUtilityMenu2.js → KvUtilityMenu.script.js} +0 -0
  198. /package/dist/vue/{KvVerticalCarousel2.js → KvVerticalCarousel.script.js} +0 -0
  199. /package/dist/vue/{KvVotingCard2.js → KvVotingCard.script.js} +0 -0
  200. /package/dist/vue/{KvVotingCardV22.js → KvVotingCardV2.script.js} +0 -0
  201. /package/dist/vue/KvWwwHeader/{KvHeaderAboutMenu2.js → KvHeaderAboutMenu.script.js} +0 -0
  202. /package/dist/vue/KvWwwHeader/{KvHeaderDropdownLink2.js → KvHeaderDropdownLink.script.js} +0 -0
  203. /package/dist/vue/KvWwwHeader/{KvHeaderLinkBar2.js → KvHeaderLinkBar.script.js} +0 -0
  204. /package/dist/vue/KvWwwHeader/{KvHeaderLogo2.js → KvHeaderLogo.script.js} +0 -0
  205. /package/dist/vue/KvWwwHeader/{KvHeaderMobileMenu2.js → KvHeaderMobileMenu.script.js} +0 -0
  206. /package/dist/vue/KvWwwHeader/{KvHeaderMyKivaMenu2.js → KvHeaderMyKivaMenu.script.js} +0 -0
  207. /package/dist/vue/KvWwwHeader/{KvHeaderTakeActionMenu2.js → KvHeaderTakeActionMenu.script.js} +0 -0
  208. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendListMenu2.js → KvLendListMenu.script.js} +0 -0
  209. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMegaMenu2.js → KvLendMegaMenu.script.js} +0 -0
  210. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenu2.js → KvLendMenu.script.js} +0 -0
  211. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenuCountryList2.js → KvLendMenuCountryList.script.js} +0 -0
  212. /package/dist/vue/KvWwwHeader/LendMenu/{KvLendMenuSearchList2.js → KvLendMenuSearchList.script.js} +0 -0
  213. /package/dist/vue/{KvWwwHeader2.js → KvWwwHeader.script.js} +0 -0
  214. /package/dist/vue/KvWwwHeaderBasic/{AboutMenu2.js → AboutMenu.script.js} +0 -0
  215. /package/dist/vue/KvWwwHeaderBasic/{HeaderMenuGroup2.js → HeaderMenuGroup.script.js} +0 -0
  216. /package/dist/vue/KvWwwHeaderBasic/{KvWwwHeaderBasic2.js → KvWwwHeaderBasic.script.js} +0 -0
  217. /package/dist/vue/KvWwwHeaderBasic/{LinkBar2.js → LinkBar.script.js} +0 -0
  218. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{CategoriesPanel2.js → CategoriesPanel.script.js} +0 -0
  219. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{MobileLendMenu2.js → MobileLendMenu.script.js} +0 -0
  220. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{MyKivaPanel2.js → MyKivaPanel.script.js} +0 -0
  221. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{RegionsPanel2.js → RegionsPanel.script.js} +0 -0
  222. /package/dist/vue/KvWwwHeaderBasic/MobileLendMenu/{SearchPanel2.js → SearchPanel.script.js} +0 -0
  223. /package/dist/vue/KvWwwHeaderBasic/{MobileMenu2.js → MobileMenu.script.js} +0 -0
  224. /package/dist/vue/KvWwwHeaderBasic/{MyKivaMenu2.js → MyKivaMenu.script.js} +0 -0
  225. /package/dist/vue/KvWwwHeaderBasic/{SearchBar2.js → SearchBar.script.js} +0 -0
@@ -1,118 +1,4 @@
1
- import { defineComponent as n, computed as c, openBlock as s, createElementBlock as u, normalizeClass as a, createElementVNode as w, createVNode as m } from "vue";
2
- import { mdiDotsVertical as f } from "@mdi/js";
3
- import y from "./KvMaterialIcon.js";
4
- const b = ["disabled", "aria-pressed"], V = /* @__PURE__ */ n({
5
- __name: "KvIconButton",
6
- props: {
7
- /**
8
- * The Material Design Icon path from @mdi/js
9
- */
10
- icon: {
11
- type: String,
12
- default: f
13
- },
14
- /**
15
- * Size of the visual button element (touch target is always 44px minimum)
16
- * `small (16px), medium (20px), large (24px - default)`
17
- */
18
- size: {
19
- type: String,
20
- default: "large",
21
- validator(e) {
22
- return ["small", "medium", "large"].includes(e);
23
- }
24
- },
25
- /**
26
- * Whether to show a border on the button
27
- */
28
- showBorder: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- /**
33
- * Border color variant. Only applies when showBorder is true.
34
- * `primary, secondary, tertiary`
35
- */
36
- borderColor: {
37
- type: String,
38
- default: "tertiary",
39
- validator(e) {
40
- return ["primary", "secondary", "tertiary"].includes(e);
41
- }
42
- },
43
- /**
44
- * Whether to show background on the button
45
- * Applies white background with hover and active states
46
- */
47
- showBackground: {
48
- type: Boolean,
49
- default: !1
50
- },
51
- /**
52
- * Whether the button is disabled
53
- */
54
- disabled: {
55
- type: Boolean,
56
- default: !1
57
- },
58
- /**
59
- * Whether the button acts as a toggle (on/off switch)
60
- */
61
- toggleable: {
62
- type: Boolean,
63
- default: !1
64
- },
65
- /**
66
- * The toggle state (for v-model support). Only used when toggleable is true.
67
- */
68
- modelValue: {
69
- type: Boolean,
70
- default: !1
71
- },
72
- /**
73
- * Icon to display when toggle is active/on. Only used when toggleable is true.
74
- */
75
- activeIcon: {
76
- type: String,
77
- default: ""
78
- }
79
- },
80
- emits: ["click", "update:modelValue"],
81
- setup(e, { emit: l }) {
82
- const t = e, r = l, i = (o) => {
83
- t.disabled || (t.toggleable && r("update:modelValue", !t.modelValue), r("click", o));
84
- }, d = c(() => t.toggleable && t.modelValue && t.activeIcon ? t.activeIcon : t.icon);
85
- return (o, g) => (s(), u("button", {
86
- type: "button",
87
- disabled: e.disabled,
88
- "aria-pressed": e.toggleable ? e.modelValue : void 0,
89
- class: a(["tw-flex tw-items-center tw-justify-center tw-min-w-5.5 tw-min-h-5.5 tw-bg-transparent", {
90
- "tw-opacity-low tw-cursor-default": e.disabled
91
- }]),
92
- onClick: i
93
- }, [
94
- w("span", {
95
- class: a(["tw-flex tw-items-center tw-justify-center tw-transition-colors tw-duration-200 tw-rounded-full", {
96
- "tw-w-4 tw-h-4": e.size === "small",
97
- "tw-w-5 tw-h-5": e.size === "medium",
98
- "tw-w-6 tw-h-6": e.size === "large",
99
- "tw-bg-white hover:tw-bg-gray-100 active:tw-bg-gray-200": e.showBackground,
100
- "tw-border": e.showBorder,
101
- "tw-border-primary": e.showBorder && e.borderColor === "primary",
102
- "tw-border-secondary": e.showBorder && e.borderColor === "secondary",
103
- "tw-border-tertiary": e.showBorder && e.borderColor === "tertiary"
104
- }])
105
- }, [
106
- m(y, {
107
- icon: d.value,
108
- class: a({
109
- "tw-w-2.5 tw-h-2.5": e.size === "small"
110
- })
111
- }, null, 8, ["icon", "class"])
112
- ], 2)
113
- ], 10, b));
114
- }
115
- });
1
+ import f from "./KvIconButton.script.js";
116
2
  export {
117
- V as default
3
+ f as default
118
4
  };
@@ -0,0 +1,118 @@
1
+ import { defineComponent as n, computed as c, openBlock as s, createElementBlock as u, normalizeClass as a, createElementVNode as w, createVNode as m } from "vue";
2
+ import { mdiDotsVertical as f } from "@mdi/js";
3
+ import y from "./KvMaterialIcon.js";
4
+ const b = ["disabled", "aria-pressed"], V = /* @__PURE__ */ n({
5
+ __name: "KvIconButton",
6
+ props: {
7
+ /**
8
+ * The Material Design Icon path from @mdi/js
9
+ */
10
+ icon: {
11
+ type: String,
12
+ default: f
13
+ },
14
+ /**
15
+ * Size of the visual button element (touch target is always 44px minimum)
16
+ * `small (16px), medium (20px), large (24px - default)`
17
+ */
18
+ size: {
19
+ type: String,
20
+ default: "large",
21
+ validator(e) {
22
+ return ["small", "medium", "large"].includes(e);
23
+ }
24
+ },
25
+ /**
26
+ * Whether to show a border on the button
27
+ */
28
+ showBorder: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ /**
33
+ * Border color variant. Only applies when showBorder is true.
34
+ * `primary, secondary, tertiary`
35
+ */
36
+ borderColor: {
37
+ type: String,
38
+ default: "tertiary",
39
+ validator(e) {
40
+ return ["primary", "secondary", "tertiary"].includes(e);
41
+ }
42
+ },
43
+ /**
44
+ * Whether to show background on the button
45
+ * Applies white background with hover and active states
46
+ */
47
+ showBackground: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ /**
52
+ * Whether the button is disabled
53
+ */
54
+ disabled: {
55
+ type: Boolean,
56
+ default: !1
57
+ },
58
+ /**
59
+ * Whether the button acts as a toggle (on/off switch)
60
+ */
61
+ toggleable: {
62
+ type: Boolean,
63
+ default: !1
64
+ },
65
+ /**
66
+ * The toggle state (for v-model support). Only used when toggleable is true.
67
+ */
68
+ modelValue: {
69
+ type: Boolean,
70
+ default: !1
71
+ },
72
+ /**
73
+ * Icon to display when toggle is active/on. Only used when toggleable is true.
74
+ */
75
+ activeIcon: {
76
+ type: String,
77
+ default: ""
78
+ }
79
+ },
80
+ emits: ["click", "update:modelValue"],
81
+ setup(e, { emit: l }) {
82
+ const t = e, r = l, i = (o) => {
83
+ t.disabled || (t.toggleable && r("update:modelValue", !t.modelValue), r("click", o));
84
+ }, d = c(() => t.toggleable && t.modelValue && t.activeIcon ? t.activeIcon : t.icon);
85
+ return (o, g) => (s(), u("button", {
86
+ type: "button",
87
+ disabled: e.disabled,
88
+ "aria-pressed": e.toggleable ? e.modelValue : void 0,
89
+ class: a(["tw-flex tw-items-center tw-justify-center tw-min-w-5.5 tw-min-h-5.5 tw-bg-transparent", {
90
+ "tw-opacity-low tw-cursor-default": e.disabled
91
+ }]),
92
+ onClick: i
93
+ }, [
94
+ w("span", {
95
+ class: a(["tw-flex tw-items-center tw-justify-center tw-transition-colors tw-duration-200 tw-rounded-full", {
96
+ "tw-w-4 tw-h-4": e.size === "small",
97
+ "tw-w-5 tw-h-5": e.size === "medium",
98
+ "tw-w-6 tw-h-6": e.size === "large",
99
+ "tw-bg-white hover:tw-bg-gray-100 active:tw-bg-gray-200": e.showBackground,
100
+ "tw-border": e.showBorder,
101
+ "tw-border-primary": e.showBorder && e.borderColor === "primary",
102
+ "tw-border-secondary": e.showBorder && e.borderColor === "secondary",
103
+ "tw-border-tertiary": e.showBorder && e.borderColor === "tertiary"
104
+ }])
105
+ }, [
106
+ m(y, {
107
+ icon: d.value,
108
+ class: a({
109
+ "tw-w-2.5 tw-h-2.5": e.size === "small"
110
+ })
111
+ }, null, 8, ["icon", "class"])
112
+ ], 2)
113
+ ], 10, b));
114
+ }
115
+ });
116
+ export {
117
+ V as default
118
+ };
@@ -1 +1 @@
1
- .image-upload-icon[data-v-ea802cf6]{background-color:#ffffffbf;border-radius:9px;display:flex;align-items:center;justify-content:center;border-radius:.5rem}.image-upload-icon--circle[data-v-ea802cf6]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow: 0 1px 4px 0 rgb(0 0 0 / .08);--tw-shadow-colored: 0 1px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}
1
+ .image-upload-icon[data-v-373dd692]{background-color:#ffffffbf;border-radius:9px;display:flex;align-items:center;justify-content:center;border-radius:.5rem}.image-upload-icon--circle[data-v-373dd692]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow: 0 1px 4px 0 rgb(0 0 0 / .08);--tw-shadow-colored: 0 1px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}
@@ -1,72 +1,85 @@
1
- import p from "./KvImageUpload2.js";
2
- import { resolveComponent as f, openBlock as i, createElementBlock as n, createElementVNode as a, normalizeStyle as g, normalizeClass as l, renderSlot as b, createVNode as c, withModifiers as w, createCommentVNode as m } from "vue";
1
+ import v from "./KvImageUpload.script.js";
2
+ import { resolveComponent as f, openBlock as t, createElementBlock as r, createElementVNode as i, normalizeStyle as b, normalizeClass as l, renderSlot as c, createVNode as s, toDisplayString as p, withModifiers as m, createCommentVNode as w } from "vue";
3
3
  import "./KvImageUpload.css";
4
- import u from "../_virtual/_plugin-vue_export-helper.js";
5
- const v = { class: "tw-flex tw-flex-col" }, h = ["src", "alt"], C = ["accept", "aria-label"];
6
- function k(d, t, s, e, I, _) {
7
- const r = f("kv-material-icon");
8
- return i(), n("div", v, [
9
- a("div", {
10
- class: l(["kv-image-upload tw-relative", e.shapeClass]),
11
- style: g(e.containerStyle)
4
+ import D from "../_virtual/_plugin-vue_export-helper.js";
5
+ const C = { class: "tw-flex tw-flex-col" }, k = ["src", "alt"], y = { class: "tw-text-label" }, I = ["accept", "aria-label"];
6
+ function h(n, o, d, e, u, O) {
7
+ const g = f("kv-material-icon");
8
+ return t(), r("div", C, [
9
+ i("div", {
10
+ class: l(["kv-image-upload tw-relative", [e.shapeClass, { "kv-image-upload--dragging": e.isDraggingOver }]]),
11
+ style: b(e.containerStyle),
12
+ onDragenter: o[3] || (o[3] = (...a) => e.onDragEnter && e.onDragEnter(...a)),
13
+ onDragover: o[4] || (o[4] = (...a) => e.onDragOver && e.onDragOver(...a)),
14
+ onDragleave: o[5] || (o[5] = (...a) => e.onDragLeave && e.onDragLeave(...a)),
15
+ onDrop: o[6] || (o[6] = (...a) => e.onDrop && e.onDrop(...a))
12
16
  }, [
13
- e.previewImage ? (i(), n("img", {
17
+ e.previewImage ? (t(), r("img", {
14
18
  key: 0,
15
19
  src: e.previewImage,
16
- alt: s.imageAlt,
20
+ alt: d.imageAlt,
17
21
  class: l(["tw-w-full tw-h-full tw-object-cover", e.shapeClass])
18
- }, null, 10, h)) : b(d.$slots, "fallback-image", { key: 1 }, () => [
19
- a("div", {
22
+ }, null, 10, k)) : c(n.$slots, "fallback-image", {
23
+ key: 1,
24
+ isDraggingOver: e.isDraggingOver
25
+ }, () => [
26
+ i("div", {
20
27
  class: l(["kv-image-upload__placeholder tw-w-full tw-h-full tw-bg-eco-green-1 tw-p-0.5", e.shapeClass])
21
28
  }, [
22
- a("div", {
23
- class: l(["tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-0.5 tw-w-full tw-h-full tw-border-2 tw-border-dashed tw-border-black", e.shapeClass])
29
+ i("div", {
30
+ class: l(["tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-0.5 tw-w-full tw-h-full tw-border-2 tw-border-dashed", [e.shapeClass, e.isDraggingOver ? "tw-border-action" : "tw-border-black"]])
24
31
  }, [
25
- c(r, {
32
+ s(g, {
26
33
  icon: e.mdiCameraPlusOutline,
27
34
  class: "tw-w-3.5"
28
35
  }, null, 8, ["icon"]),
29
- t[3] || (t[3] = a("span", { class: "tw-text-label" }, " Add a photo ", -1))
36
+ i("span", y, p(e.isDraggingOver ? "Drop to upload" : "Add a photo"), 1)
30
37
  ], 2)
31
38
  ], 2)
32
39
  ], !0),
33
- a("input", {
40
+ i("input", {
34
41
  ref: "fileInput",
35
42
  type: "file",
36
43
  accept: e.acceptAttr,
37
44
  "aria-label": e.inputLabel,
38
45
  class: "tw-absolute tw-inset-0 tw-w-full tw-h-full tw-opacity-0 tw-cursor-pointer",
39
- onChange: t[0] || (t[0] = (...o) => e.handleFileChange && e.handleFileChange(...o))
40
- }, null, 40, C),
41
- e.previewImage || s.showEditIcon ? (i(), n("button", {
46
+ onChange: o[0] || (o[0] = (...a) => e.handleFileChange && e.handleFileChange(...a))
47
+ }, null, 40, I),
48
+ e.previewImage || d.showEditIcon ? (t(), r("button", {
42
49
  key: 2,
43
- class: l(["image-upload-icon edit-icon tw-absolute tw-bottom-1 tw-right-1 tw-p-1 tw-z-10", { "image-upload-icon--circle": e.isCircle }]),
50
+ class: l(["image-upload-icon edit-icon tw-absolute tw-bottom-1 tw-right-1 tw-p-1 tw-z-1", { "image-upload-icon--circle": e.isCircle }]),
44
51
  type: "button",
45
52
  "aria-hidden": "true",
46
53
  tabindex: "-1",
47
- onClick: t[1] || (t[1] = w((...o) => e.openFileInput && e.openFileInput(...o), ["stop"]))
54
+ onClick: o[1] || (o[1] = m((...a) => e.openFileInput && e.openFileInput(...a), ["stop"]))
48
55
  }, [
49
- c(r, {
56
+ s(g, {
50
57
  icon: e.mdiPencil,
51
58
  class: "tw-w-2"
52
59
  }, null, 8, ["icon"])
53
- ], 2)) : m("", !0),
54
- e.previewImage ? (i(), n("button", {
60
+ ], 2)) : w("", !0),
61
+ e.previewImage ? (t(), r("button", {
55
62
  key: 3,
56
- class: l(["image-upload-icon remove-icon tw-absolute tw-top-1 tw-right-1 tw-p-1 tw-z-10", { "image-upload-icon--circle": e.isCircle }]),
63
+ class: l(["image-upload-icon remove-icon tw-absolute tw-top-1 tw-right-1 tw-p-1 tw-z-1", { "image-upload-icon--circle": e.isCircle }]),
57
64
  type: "button",
58
65
  "aria-label": "Remove Image",
59
- onClick: t[2] || (t[2] = w((...o) => e.removeImage && e.removeImage(...o), ["stop"]))
66
+ onClick: o[2] || (o[2] = m((...a) => e.removeImage && e.removeImage(...a), ["stop"]))
60
67
  }, [
61
- c(r, {
68
+ s(g, {
62
69
  icon: e.mdiClose,
63
70
  class: "tw-w-2"
64
71
  }, null, 8, ["icon"])
65
- ], 2)) : m("", !0)
66
- ], 6)
72
+ ], 2)) : w("", !0),
73
+ e.isDraggingOver && e.previewImage && n.$slots["drag-overlay"] ? (t(), r("div", {
74
+ key: 4,
75
+ class: l(["tw-absolute tw-inset-0 tw-z-2 tw-pointer-events-none", e.shapeClass])
76
+ }, [
77
+ c(n.$slots, "drag-overlay", {}, void 0, !0)
78
+ ], 2)) : w("", !0)
79
+ ], 38)
67
80
  ]);
68
81
  }
69
- const A = /* @__PURE__ */ u(p, [["render", k], ["__scopeId", "data-v-ea802cf6"]]);
82
+ const F = /* @__PURE__ */ D(v, [["render", h], ["__scopeId", "data-v-373dd692"]]);
70
83
  export {
71
- A as default
84
+ F as default
72
85
  };
@@ -0,0 +1,176 @@
1
+ import { toRefs as T, ref as f, watch as w, computed as o } from "vue";
2
+ import { mdiCameraPlusOutline as E, mdiClose as I, mdiPencil as C } from "@mdi/js";
3
+ import b from "./KvMaterialIcon.js";
4
+ import { DEFAULT_ACCEPTED_IMAGE_TYPES as R, validateImageFile as z, cropResizeImageToDataUrl as A } from "../utils/imageUtils.js";
5
+ const H = {
6
+ components: {
7
+ KvMaterialIcon: b
8
+ },
9
+ props: {
10
+ /**
11
+ * URL of an initial image to preview.
12
+ */
13
+ imageUrl: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ /**
18
+ * Target crop aspect ratio (width / height). `1` = square, `4 / 3` ≈ 1.333.
19
+ */
20
+ aspectRatio: {
21
+ type: Number,
22
+ default: 1
23
+ },
24
+ /**
25
+ * Preview shape. `square (default), circle`
26
+ */
27
+ shape: {
28
+ type: String,
29
+ default: "square",
30
+ validator(a) {
31
+ return ["square", "circle"].includes(a);
32
+ }
33
+ },
34
+ /**
35
+ * Maximum allowed file size, in megabytes.
36
+ */
37
+ maxSizeMb: {
38
+ type: Number,
39
+ default: 1
40
+ },
41
+ /**
42
+ * Output resolution used when generating the preview.
43
+ */
44
+ maxDimension: {
45
+ type: Number,
46
+ default: 1e3
47
+ },
48
+ /**
49
+ * Maximum rendered preview size, in pixels (height; width follows aspectRatio).
50
+ * Note: the parent element must supply a width; this component sets only
51
+ * max-width/max-height + aspect-ratio and will not stretch to fill a sizeless container.
52
+ */
53
+ previewSize: {
54
+ type: Number,
55
+ default: 200
56
+ },
57
+ /**
58
+ * Accepted MIME types for both the file input and validation.
59
+ */
60
+ acceptedFileTypes: {
61
+ type: Array,
62
+ default: () => [...R]
63
+ },
64
+ /**
65
+ * Whether to show the edit (pencil) affordance in the blank state, before an image is
66
+ * selected. Off by default. Once an image is present the edit icon always shows
67
+ * (bottom-right, below the remove icon), regardless of this prop.
68
+ */
69
+ showEditIcon: {
70
+ type: Boolean,
71
+ default: !1
72
+ },
73
+ /**
74
+ * Alt text for the preview image.
75
+ */
76
+ imageAlt: {
77
+ type: String,
78
+ default: "Image preview"
79
+ }
80
+ },
81
+ emits: [
82
+ /**
83
+ * Emitted with `{ file }` when a valid file is selected or dropped.
84
+ */
85
+ "file-uploaded",
86
+ /**
87
+ * Emitted when the current image is removed.
88
+ */
89
+ "file-removed",
90
+ /**
91
+ * Emitted with `{ type, message }` when validation or processing fails.
92
+ */
93
+ "file-error"
94
+ ],
95
+ setup(a, { emit: s }) {
96
+ const { imageUrl: d } = T(a), n = f(d.value || ""), m = f(null), c = f(!1);
97
+ let l = 0;
98
+ w(d, (e) => {
99
+ n.value = e || "";
100
+ });
101
+ const p = o(() => a.shape === "circle"), v = o(() => p.value ? "tw-rounded-full" : "tw-rounded"), y = o(() => a.acceptedFileTypes.join(",")), D = o(() => n.value ? "Change image" : "Upload image"), h = o(() => ({
102
+ aspectRatio: String(a.aspectRatio),
103
+ maxHeight: `${a.previewSize}px`,
104
+ maxWidth: `${a.previewSize * a.aspectRatio}px`
105
+ })), x = () => {
106
+ var e;
107
+ (e = m.value) == null || e.click();
108
+ }, F = () => {
109
+ n.value = "", s("file-removed");
110
+ }, g = async (e) => {
111
+ const { valid: t, error: r } = z(e, {
112
+ maxSizeMb: a.maxSizeMb,
113
+ acceptedFileTypes: a.acceptedFileTypes
114
+ });
115
+ if (!t && r) {
116
+ s("file-error", r);
117
+ return;
118
+ }
119
+ try {
120
+ n.value = await A(e, {
121
+ aspectRatio: a.aspectRatio,
122
+ maxDimension: a.maxDimension
123
+ }), s("file-uploaded", { file: e });
124
+ } catch {
125
+ s("file-error", { type: "other", message: "Failed to read file" });
126
+ }
127
+ }, S = (e) => {
128
+ var i;
129
+ const t = e.target, r = (i = t.files) == null ? void 0 : i[0];
130
+ r && (g(r), t.value = "");
131
+ }, u = (e) => {
132
+ var t;
133
+ return Array.from(((t = e.dataTransfer) == null ? void 0 : t.types) ?? []).includes("Files");
134
+ };
135
+ return {
136
+ mdiPencil: C,
137
+ mdiClose: I,
138
+ mdiCameraPlusOutline: E,
139
+ fileInput: m,
140
+ previewImage: n,
141
+ isCircle: p,
142
+ isDraggingOver: c,
143
+ shapeClass: v,
144
+ acceptAttr: y,
145
+ inputLabel: D,
146
+ containerStyle: h,
147
+ openFileInput: x,
148
+ removeImage: F,
149
+ handleFileChange: S,
150
+ onDragEnter: (e) => {
151
+ u(e) && (l += 1, c.value = !0);
152
+ },
153
+ onDragOver: (e) => {
154
+ if (!u(e))
155
+ return;
156
+ e.preventDefault();
157
+ const { dataTransfer: t } = e;
158
+ t && (t.dropEffect = "copy");
159
+ },
160
+ onDragLeave: (e) => {
161
+ u(e) && (l = Math.max(0, l - 1), l === 0 && (c.value = !1));
162
+ },
163
+ onDrop: (e) => {
164
+ var r, i;
165
+ if (!u(e))
166
+ return;
167
+ e.preventDefault(), l = 0, c.value = !1;
168
+ const t = (i = (r = e.dataTransfer) == null ? void 0 : r.files) == null ? void 0 : i[0];
169
+ t && g(t);
170
+ }
171
+ };
172
+ }
173
+ };
174
+ export {
175
+ H as default
176
+ };
@@ -1,4 +1,4 @@
1
- import _ from "./KvImpactVerticalSelector2.js";
1
+ import _ from "./KvImpactVerticalSelector.script.js";
2
2
  import { resolveComponent as d, openBlock as s, createElementBlock as n, createElementVNode as l, Fragment as f, renderList as C, createBlock as c, withCtx as g, normalizeClass as i, createCommentVNode as o, toDisplayString as r } from "vue";
3
3
  import h from "../_virtual/_plugin-vue_export-helper.js";
4
4
  const b = { class: "tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3" }, k = ["alt", "src", "width"], u = { class: "tw-mb-0.5 tw-font-medium" }, v = { class: "tw-text-small" }, x = {
@@ -1,4 +1,4 @@
1
- import o from "./KvInlineActivityCard2.js";
1
+ import o from "./KvInlineActivityCard.script.js";
2
2
  import { resolveComponent as s, openBlock as a, createElementBlock as l, createVNode as d, createElementVNode as r, toDisplayString as c, createTextVNode as i } from "vue";
3
3
  import m from "../_virtual/_plugin-vue_export-helper.js";
4
4
  const p = { class: "tw-flex tw-items-center tw-gap-1 tw-py-0.5 tw-px-1 tw-shadow-lg tw-rounded-xs tw-bg-white" }, w = { class: "tw-text-base tw-whitespace-nowrap" }, _ = { class: "data-hj-suppress" };
@@ -1,4 +1,4 @@
1
- import c from "./KvInlineActivityFeed2.js";
1
+ import c from "./KvInlineActivityFeed.script.js";
2
2
  import { resolveComponent as a, openBlock as t, createElementBlock as e, Fragment as l, renderList as s, createBlock as p } from "vue";
3
3
  import "./KvInlineActivityFeed.css";
4
4
  import d from "../_virtual/_plugin-vue_export-helper.js";