@kiva/kv-components 8.5.0 → 8.5.2
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/dist/index.js +146 -144
- package/dist/vue/KvProgressCircle.css +1 -0
- package/dist/vue/KvProgressCircle.js +102 -0
- package/dist/vue/KvProgressCircle.vue.d.ts +72 -0
- package/dist/vue/KvProgressCircle2.js +70 -0
- package/dist/vue/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { default as K } from "./vue/KvCartModal.js";
|
|
|
8
8
|
import { default as A } from "./vue/KvCartPill.js";
|
|
9
9
|
import { default as C } from "./vue/KvCheckbox.js";
|
|
10
10
|
import { default as L } from "./vue/KvCheckoutReceipt.js";
|
|
11
|
-
import { default as
|
|
11
|
+
import { default as c } from "./vue/KvChip.js";
|
|
12
12
|
import { default as E } from "./vue/KvClassicLoanCard.js";
|
|
13
13
|
import { default as O } from "./vue/KvCompactLoanCard.js";
|
|
14
14
|
import { default as I } from "./vue/KvCommentsAdd.js";
|
|
@@ -35,7 +35,7 @@ import { default as vo } from "./vue/KvLendCta.js";
|
|
|
35
35
|
import { default as io } from "./vue/KvLightbox.js";
|
|
36
36
|
import { default as _o } from "./vue/KvLineGraph.js";
|
|
37
37
|
import { default as No } from "./vue/KvLoanActivities.js";
|
|
38
|
-
import { default as
|
|
38
|
+
import { default as To } from "./vue/KvLoanBookmark.js";
|
|
39
39
|
import { default as Ro } from "./vue/KvLoanCallouts.js";
|
|
40
40
|
import { KV_LOAN_INFO_CARD_FRAGMENT as Mo, default as Io } from "./vue/KvLoanInfoCard.js";
|
|
41
41
|
import { default as go } from "./vue/KvLoanProgressGroup.js";
|
|
@@ -52,81 +52,82 @@ import { default as Xo } from "./vue/KvPieChart.js";
|
|
|
52
52
|
import { default as Zo } from "./vue/KvPill.js";
|
|
53
53
|
import { default as oe } from "./vue/KvPopper.js";
|
|
54
54
|
import { default as re } from "./vue/KvProgressBar.js";
|
|
55
|
-
import { default as ae } from "./vue/
|
|
56
|
-
import { default as le } from "./vue/
|
|
57
|
-
import { default as se } from "./vue/
|
|
58
|
-
import { default as pe } from "./vue/
|
|
59
|
-
import { default as ue } from "./vue/
|
|
60
|
-
import { default as Ke } from "./vue/
|
|
61
|
-
import { default as Ae } from "./vue/
|
|
62
|
-
import { default as Ce } from "./vue/
|
|
63
|
-
import { default as Le } from "./vue/
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as Ee } from "./vue/
|
|
66
|
-
import { default as Oe } from "./vue/
|
|
67
|
-
import { default as Ie } from "./vue/
|
|
68
|
-
import { default as ge } from "./vue/
|
|
69
|
-
import { default as Ge } from "./vue/
|
|
70
|
-
import { default as he } from "./vue/
|
|
71
|
-
import { default as Be } from "./vue/
|
|
72
|
-
import { default as ye } from "./vue/
|
|
73
|
-
import { default as ke } from "./vue/
|
|
74
|
-
import { default as we } from "./vue/
|
|
75
|
-
import { default as He } from "./vue/
|
|
76
|
-
import { default as ze } from "./vue/
|
|
77
|
-
import { default as qe } from "./vue/
|
|
78
|
-
import { default as Xe
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
55
|
+
import { default as ae } from "./vue/KvProgressCircle.js";
|
|
56
|
+
import { default as le } from "./vue/KvPulsingDot.js";
|
|
57
|
+
import { default as se } from "./vue/KvRadio.js";
|
|
58
|
+
import { default as pe } from "./vue/KvSelect.js";
|
|
59
|
+
import { default as ue } from "./vue/KvSideSheet.js";
|
|
60
|
+
import { default as Ke } from "./vue/KvSwitch.js";
|
|
61
|
+
import { default as Ae } from "./vue/KvTab.js";
|
|
62
|
+
import { default as Ce } from "./vue/KvTabPanel.js";
|
|
63
|
+
import { default as Le } from "./vue/KvTabs.js";
|
|
64
|
+
import { default as ce } from "./vue/KvTextInput.js";
|
|
65
|
+
import { default as Ee } from "./vue/KvTextLink.js";
|
|
66
|
+
import { default as Oe } from "./vue/KvThemeProvider.js";
|
|
67
|
+
import { default as Ie } from "./vue/KvToast.js";
|
|
68
|
+
import { default as ge } from "./vue/KvTooltip.js";
|
|
69
|
+
import { default as Ge } from "./vue/KvTreeMapChart.js";
|
|
70
|
+
import { default as he } from "./vue/KvUserAvatar.js";
|
|
71
|
+
import { default as Be } from "./vue/KvUtilityMenu.js";
|
|
72
|
+
import { default as ye } from "./vue/KvVerticalCarousel.js";
|
|
73
|
+
import { default as ke } from "./vue/KvVotingCard.js";
|
|
74
|
+
import { default as we } from "./vue/KvVotingCardV2.js";
|
|
75
|
+
import { default as He } from "./vue/KvWideLoanCard.js";
|
|
76
|
+
import { default as ze } from "./vue/KvAtbModal.js";
|
|
77
|
+
import { default as qe } from "./vue/KvSecondaryNav.js";
|
|
78
|
+
import { default as Xe } from "./vue/KvWwwHeader.js";
|
|
79
|
+
import { default as Ze, Mash as $e } from "./utils/Alea.js";
|
|
80
|
+
import { groupBy as er, sortBy as rr } from "./utils/arrayUtils.js";
|
|
81
|
+
import { useAttrs as ar } from "./utils/attrs.js";
|
|
82
|
+
import { carouselUtil as lr } from "./utils/carousels.js";
|
|
83
|
+
import { abc as sr, indexIn as dr, startsWith as pr } from "./utils/comparators.js";
|
|
84
|
+
import { debounce as ur } from "./utils/debounce.js";
|
|
85
|
+
import { useEventListener as Kr } from "./utils/event.js";
|
|
86
|
+
import { collapse as Ar, expand as ir } from "./utils/expander.js";
|
|
87
|
+
import { getKivaImageUrl as _r, isLegacyPlaceholderAvatar as Lr, randomizedUserAvatarClass as Nr } from "./utils/imageUtils.js";
|
|
88
|
+
import { LOAN_CALLOUTS_FRAGMENT as Tr, LOAN_GEOCODE_FRAGMENT as Er, LOAN_PROGRESS_FRAGMENT as Rr, loanCardComputedProperties as Or, loanCardMethods as Mr } from "./utils/loanCard.js";
|
|
89
|
+
import { BALANCE_CAMPAIGN as Sr, BASE_CAMPAIGN as gr, ERL_COOKIE_NAME as Pr, NO_BALANCE_CAMPAIGN as Gr, TOP_UP_CAMPAIGN as Fr, getDropdownPriceArray as hr, getLendCtaSelectedOption as Vr, isBetween25And50 as Br, isLessThan25 as Dr, truncateStringByWords as yr } from "./utils/loanUtils.js";
|
|
90
|
+
import { animationCoordinator as kr, generateMapMarkers as Ur, getCoordinatesBetween as wr, getCountryColor as Wr, getLoansIntervals as Hr } from "./utils/mapUtils.js";
|
|
91
|
+
import { lockPrintSingleEl as zr, unlockPrintSingleEl as Qr } from "./utils/printing.js";
|
|
92
|
+
import { lockScroll as Jr, lockScrollSmallOnly as Xr, unlockScroll as Yr, unlockScrollSmallOnly as Zr } from "./utils/scrollLock.js";
|
|
93
|
+
import { buildTailwindClassName as ot, headerNumberCase as et, kebabCase as rt, removeObjectProperty as tt } from "./utils/themeUtils.js";
|
|
94
|
+
import { throttle as ft } from "./utils/throttle.js";
|
|
95
|
+
import { isTargetElement as mt, offBodyTouchstart as st, onBodyTouchstart as dt } from "./utils/touchEvents.js";
|
|
96
|
+
import { getTreemap as xt } from "./utils/treemap.js";
|
|
97
|
+
import { KvBlueskyIcon as nt } from "./assets/icons/bluesky.js";
|
|
98
|
+
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as vt, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as At } from "./vue/KvClassicLoanCard2.js";
|
|
99
|
+
import { KV_COMPACT_LOAN_CARD_FRAGMENT as Ct, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as _t } from "./vue/KvCompactLoanCard2.js";
|
|
100
|
+
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as Nt, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as ct } from "./vue/KvIntroductionLoanCard2.js";
|
|
101
|
+
import { KV_LEND_CTA_FRAGMENT as Et, KV_LEND_CTA_USER_FRAGMENT as Rt } from "./vue/KvLendCta2.js";
|
|
102
|
+
import { KV_LOAN_ACTIVITIES_FRAGMENT as Mt } from "./vue/KvLoanActivities2.js";
|
|
103
|
+
import { KV_LOAN_BOOKMARK_FRAGMENT as St } from "./vue/KvLoanBookmark2.js";
|
|
104
|
+
import { KV_LOAN_TAG_FRAGMENT as Pt } from "./vue/KvLoanTag2.js";
|
|
105
|
+
import { KV_LOAN_USE_FRAGMENT as Ft } from "./vue/KvLoanUse2.js";
|
|
106
|
+
import { KV_WIDE_LOAN_CARD_FRAGMENT as Vt, KV_WIDE_LOAN_CARD_USER_FRAGMENT as Bt } from "./vue/KvWideLoanCard2.js";
|
|
106
107
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
108
|
+
Ze as Alea,
|
|
109
|
+
Sr as BALANCE_CAMPAIGN,
|
|
110
|
+
gr as BASE_CAMPAIGN,
|
|
111
|
+
Pr as ERL_COOKIE_NAME,
|
|
112
|
+
vt as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
113
|
+
At as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
|
114
|
+
Ct as KV_COMPACT_LOAN_CARD_FRAGMENT,
|
|
115
|
+
_t as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
|
|
116
|
+
Nt as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
|
|
117
|
+
ct as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
|
|
118
|
+
Et as KV_LEND_CTA_FRAGMENT,
|
|
119
|
+
Rt as KV_LEND_CTA_USER_FRAGMENT,
|
|
120
|
+
Mt as KV_LOAN_ACTIVITIES_FRAGMENT,
|
|
121
|
+
St as KV_LOAN_BOOKMARK_FRAGMENT,
|
|
121
122
|
Mo as KV_LOAN_INFO_CARD_FRAGMENT,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
Pt as KV_LOAN_TAG_FRAGMENT,
|
|
124
|
+
Ft as KV_LOAN_USE_FRAGMENT,
|
|
125
|
+
Vt as KV_WIDE_LOAN_CARD_FRAGMENT,
|
|
126
|
+
Bt as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
|
|
126
127
|
r as KvAccordionItem,
|
|
127
128
|
a as KvActivityRow,
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
ze as KvAtbModal,
|
|
130
|
+
nt as KvBlueskyIcon,
|
|
130
131
|
l as KvBorrowerImage,
|
|
131
132
|
s as KvButton,
|
|
132
133
|
p as KvCardFrame,
|
|
@@ -135,7 +136,7 @@ export {
|
|
|
135
136
|
A as KvCartPill,
|
|
136
137
|
C as KvCheckbox,
|
|
137
138
|
L as KvCheckoutReceipt,
|
|
138
|
-
|
|
139
|
+
c as KvChip,
|
|
139
140
|
E as KvClassicLoanCard,
|
|
140
141
|
I as KvCommentsAdd,
|
|
141
142
|
g as KvCommentsContainer,
|
|
@@ -164,7 +165,7 @@ export {
|
|
|
164
165
|
yo as KvLoadingPlaceholder,
|
|
165
166
|
ko as KvLoadingSpinner,
|
|
166
167
|
No as KvLoanActivities,
|
|
167
|
-
|
|
168
|
+
To as KvLoanBookmark,
|
|
168
169
|
Ro as KvLoanCallouts,
|
|
169
170
|
Io as KvLoanInfoCard,
|
|
170
171
|
go as KvLoanProgressGroup,
|
|
@@ -179,73 +180,74 @@ export {
|
|
|
179
180
|
Zo as KvPill,
|
|
180
181
|
oe as KvPopper,
|
|
181
182
|
re as KvProgressBar,
|
|
182
|
-
ae as
|
|
183
|
-
le as
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
pe as
|
|
187
|
-
ue as
|
|
188
|
-
Ke as
|
|
189
|
-
Ae as
|
|
190
|
-
Ce as
|
|
191
|
-
Le as
|
|
192
|
-
|
|
193
|
-
Ee as
|
|
194
|
-
Oe as
|
|
195
|
-
Ie as
|
|
196
|
-
ge as
|
|
197
|
-
Ge as
|
|
198
|
-
he as
|
|
199
|
-
Be as
|
|
200
|
-
ye as
|
|
201
|
-
ke as
|
|
202
|
-
we as
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
Tr as
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
183
|
+
ae as KvProgressCircle,
|
|
184
|
+
le as KvPulsingDot,
|
|
185
|
+
se as KvRadio,
|
|
186
|
+
qe as KvSecondaryNav,
|
|
187
|
+
pe as KvSelect,
|
|
188
|
+
ue as KvSideSheet,
|
|
189
|
+
Ke as KvSwitch,
|
|
190
|
+
Ae as KvTab,
|
|
191
|
+
Ce as KvTabPanel,
|
|
192
|
+
Le as KvTabs,
|
|
193
|
+
ce as KvTextInput,
|
|
194
|
+
Ee as KvTextLink,
|
|
195
|
+
Oe as KvThemeProvider,
|
|
196
|
+
Ie as KvToast,
|
|
197
|
+
ge as KvTooltip,
|
|
198
|
+
Ge as KvTreeMapChart,
|
|
199
|
+
he as KvUserAvatar,
|
|
200
|
+
Be as KvUtilityMenu,
|
|
201
|
+
ye as KvVerticalCarousel,
|
|
202
|
+
ke as KvVotingCard,
|
|
203
|
+
we as KvVotingCardV2,
|
|
204
|
+
He as KvWideLoanCard,
|
|
205
|
+
Xe as KvWwwHeader,
|
|
206
|
+
Tr as LOAN_CALLOUTS_FRAGMENT,
|
|
207
|
+
Er as LOAN_GEOCODE_FRAGMENT,
|
|
208
|
+
Rr as LOAN_PROGRESS_FRAGMENT,
|
|
209
|
+
$e as Mash,
|
|
210
|
+
Gr as NO_BALANCE_CAMPAIGN,
|
|
211
|
+
Fr as TOP_UP_CAMPAIGN,
|
|
212
|
+
sr as abc,
|
|
213
|
+
kr as animationCoordinator,
|
|
214
|
+
ot as buildTailwindClassName,
|
|
215
|
+
lr as carouselUtil,
|
|
216
|
+
Ar as collapse,
|
|
217
|
+
ur as debounce,
|
|
218
|
+
ir as expand,
|
|
219
|
+
Ur as generateMapMarkers,
|
|
220
|
+
wr as getCoordinatesBetween,
|
|
221
|
+
Wr as getCountryColor,
|
|
222
|
+
hr as getDropdownPriceArray,
|
|
223
|
+
_r as getKivaImageUrl,
|
|
224
|
+
Vr as getLendCtaSelectedOption,
|
|
225
|
+
Hr as getLoansIntervals,
|
|
226
|
+
xt as getTreemap,
|
|
227
|
+
er as groupBy,
|
|
228
|
+
et as headerNumberCase,
|
|
229
|
+
dr as indexIn,
|
|
230
|
+
Br as isBetween25And50,
|
|
231
|
+
Lr as isLegacyPlaceholderAvatar,
|
|
232
|
+
Dr as isLessThan25,
|
|
233
|
+
mt as isTargetElement,
|
|
234
|
+
rt as kebabCase,
|
|
235
|
+
Or as loanCardComputedProperties,
|
|
236
|
+
Mr as loanCardMethods,
|
|
237
|
+
zr as lockPrintSingleEl,
|
|
238
|
+
Jr as lockScroll,
|
|
239
|
+
Xr as lockScrollSmallOnly,
|
|
240
|
+
st as offBodyTouchstart,
|
|
241
|
+
dt as onBodyTouchstart,
|
|
242
|
+
Nr as randomizedUserAvatarClass,
|
|
243
|
+
tt as removeObjectProperty,
|
|
244
|
+
rr as sortBy,
|
|
245
|
+
pr as startsWith,
|
|
246
|
+
ft as throttle,
|
|
247
|
+
yr as truncateStringByWords,
|
|
248
|
+
Qr as unlockPrintSingleEl,
|
|
249
|
+
Yr as unlockScroll,
|
|
250
|
+
Zr as unlockScrollSmallOnly,
|
|
251
|
+
ar as useAttrs,
|
|
252
|
+
Kr as useEventListener
|
|
251
253
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@supports (-moz-appearance:none){.kv-progress-circle__ring-text[data-v-a03fc07d],.kv-progress-circle__ring-text-backdrop[data-v-a03fc07d]{display:none}}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import c from "./KvProgressCircle2.js";
|
|
2
|
+
import { openBlock as o, createElementBlock as a, createElementVNode as t, normalizeStyle as i, normalizeClass as s, Fragment as l, toDisplayString as n, createCommentVNode as d } from "vue";
|
|
3
|
+
import "./KvProgressCircle.css";
|
|
4
|
+
import f from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const x = ["value"], h = { class: "tw-w-full" }, _ = ["viewBox"], w = ["stroke-dasharray", "stroke-width", "r", "cx", "cy"], k = ["stroke-dasharray", "stroke-width", "r", "cx", "cy"], m = ["d"], y = ["d"], g = ["dy", "dx", "font-size"], u = ["xlink:href"], v = ["dy", "dx", "font-size"], z = ["xlink:href"];
|
|
6
|
+
function D(b, T, e, r, C, S) {
|
|
7
|
+
return o(), a("div", null, [
|
|
8
|
+
t("progress", {
|
|
9
|
+
class: "tw-sr-only",
|
|
10
|
+
max: "100",
|
|
11
|
+
value: e.value
|
|
12
|
+
}, null, 8, x),
|
|
13
|
+
t("div", h, [
|
|
14
|
+
(o(), a("svg", {
|
|
15
|
+
class: "tw-block tw-overflow-visible",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
viewBox: `0 0 ${r.radius * 2} ${r.radius * 2}`
|
|
18
|
+
}, [
|
|
19
|
+
t("circle", {
|
|
20
|
+
class: "tw-origin-center tw-text-primary-inverse tw-stroke-current",
|
|
21
|
+
"stroke-dasharray": r.circumference + " " + r.circumference,
|
|
22
|
+
style: i([{ fill: "transparent", "stroke-linecap": "round", transition: "stroke-dashoffset 0.125s" }, {
|
|
23
|
+
strokeDashoffset: r.backgroundStrokeDashoffset,
|
|
24
|
+
transform: r.circleTransform
|
|
25
|
+
}]),
|
|
26
|
+
"stroke-width": e.strokeWidth,
|
|
27
|
+
r: r.normalizedRadius,
|
|
28
|
+
cx: r.radius,
|
|
29
|
+
cy: r.radius
|
|
30
|
+
}, null, 12, w),
|
|
31
|
+
t("circle", {
|
|
32
|
+
class: s(`tw-origin-center tw-text-${e.color} tw-stroke-current`),
|
|
33
|
+
"stroke-dasharray": r.circumference + " " + r.circumference,
|
|
34
|
+
style: i([{ fill: "transparent", "stroke-linecap": "round", transition: "stroke-dashoffset 0.125s" }, {
|
|
35
|
+
strokeDashoffset: r.strokeDashoffset,
|
|
36
|
+
transform: r.circleTransform
|
|
37
|
+
}]),
|
|
38
|
+
"stroke-width": e.strokeWidth,
|
|
39
|
+
r: r.normalizedRadius,
|
|
40
|
+
cx: r.radius,
|
|
41
|
+
cy: r.radius
|
|
42
|
+
}, null, 14, k),
|
|
43
|
+
e.showNumber ? (o(), a(l, { key: 0 }, [
|
|
44
|
+
t("defs", null, [
|
|
45
|
+
t("path", {
|
|
46
|
+
id: "text_circle",
|
|
47
|
+
d: `
|
|
48
|
+
M ${r.radius}, ${r.radius}
|
|
49
|
+
m -${r.radius}, 0
|
|
50
|
+
a ${r.radius},${r.radius} 0 1,1 ${r.radius * 2},0
|
|
51
|
+
a ${r.radius},${r.radius} 0 1,1 -${r.radius * 2},0
|
|
52
|
+
`,
|
|
53
|
+
class: "tw-text-transparent tw-fill-current tw-origin-center",
|
|
54
|
+
style: i({
|
|
55
|
+
transform: `${r.textCircleTransform}`
|
|
56
|
+
})
|
|
57
|
+
}, null, 12, m),
|
|
58
|
+
t("path", {
|
|
59
|
+
id: "text_circle_flipped",
|
|
60
|
+
d: `
|
|
61
|
+
M ${r.radius}, ${r.radius}
|
|
62
|
+
m -${r.radius}, 0
|
|
63
|
+
a ${r.radius},${r.radius} 0 1,0 ${r.radius * 2},0
|
|
64
|
+
a ${r.radius},${r.radius} 0 1,0 -${r.radius * 2},0
|
|
65
|
+
`,
|
|
66
|
+
class: "tw-text-transparent tw-fill-current tw-origin-center",
|
|
67
|
+
style: i({
|
|
68
|
+
transform: `${r.textCircleTransform}`
|
|
69
|
+
})
|
|
70
|
+
}, null, 12, y)
|
|
71
|
+
]),
|
|
72
|
+
t("text", {
|
|
73
|
+
class: "kv-progress-circle__ring-text-backdrop tw-text-white tw-fill-current tw-stroke-current",
|
|
74
|
+
style: { "paint-order": "stroke", "stroke-width": "0.675em", "stroke-linecap": "butt", "stroke-linejoin": "round", "font-weight": "900", "text-anchor": "start", "letter-spacing": "0.1em" },
|
|
75
|
+
dy: r.textDy,
|
|
76
|
+
dx: r.textDx,
|
|
77
|
+
"font-size": r.fontSize
|
|
78
|
+
}, [
|
|
79
|
+
t("textPath", {
|
|
80
|
+
"xlink:href": `#text_circle${r.flipText ? "_flipped" : ""}`
|
|
81
|
+
}, n(e.value) + "% ", 9, u)
|
|
82
|
+
], 8, g),
|
|
83
|
+
t("text", {
|
|
84
|
+
class: s(`kv-progress-circle__ring-text tw-text-${e.color} tw-fill-current tw-stroke-current`),
|
|
85
|
+
style: { "font-weight": "900", "text-anchor": "start", "letter-spacing": "0.1em" },
|
|
86
|
+
dy: r.textDy,
|
|
87
|
+
dx: r.textDx,
|
|
88
|
+
"font-size": r.fontSize
|
|
89
|
+
}, [
|
|
90
|
+
t("textPath", {
|
|
91
|
+
"xlink:href": `#text_circle${r.flipText ? "_flipped" : ""}`
|
|
92
|
+
}, n(e.value) + "% ", 9, z)
|
|
93
|
+
], 10, v)
|
|
94
|
+
], 64)) : d("", !0)
|
|
95
|
+
], 8, _))
|
|
96
|
+
])
|
|
97
|
+
]);
|
|
98
|
+
}
|
|
99
|
+
const M = /* @__PURE__ */ f(c, [["render", D], ["__scopeId", "data-v-a03fc07d"]]);
|
|
100
|
+
export {
|
|
101
|
+
M as default
|
|
102
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
value: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
validator(val: number): boolean;
|
|
6
|
+
};
|
|
7
|
+
arcScale: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
rotate: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
strokeWidth: {
|
|
16
|
+
default: number;
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
};
|
|
19
|
+
showNumber: {
|
|
20
|
+
default: boolean;
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
};
|
|
23
|
+
color: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
}>, {
|
|
28
|
+
radius: import('vue').Ref<number, number>;
|
|
29
|
+
fontSize: import('vue').ComputedRef<number>;
|
|
30
|
+
normalizedRadius: import('vue').ComputedRef<number>;
|
|
31
|
+
circumference: import('vue').ComputedRef<number>;
|
|
32
|
+
strokeDashoffset: import('vue').ComputedRef<number>;
|
|
33
|
+
backgroundStrokeDashoffset: import('vue').ComputedRef<number>;
|
|
34
|
+
circleTransform: import('vue').ComputedRef<string>;
|
|
35
|
+
textCircleTransform: import('vue').ComputedRef<string>;
|
|
36
|
+
flipText: import('vue').ComputedRef<boolean>;
|
|
37
|
+
textDx: import('vue').ComputedRef<number>;
|
|
38
|
+
textDy: import('vue').ComputedRef<number>;
|
|
39
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
40
|
+
value: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
required: true;
|
|
43
|
+
validator(val: number): boolean;
|
|
44
|
+
};
|
|
45
|
+
arcScale: {
|
|
46
|
+
type: NumberConstructor;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
rotate: {
|
|
50
|
+
type: NumberConstructor;
|
|
51
|
+
default: number;
|
|
52
|
+
};
|
|
53
|
+
strokeWidth: {
|
|
54
|
+
default: number;
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
};
|
|
57
|
+
showNumber: {
|
|
58
|
+
default: boolean;
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
};
|
|
61
|
+
color: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
}>> & Readonly<{}>, {
|
|
66
|
+
color: string;
|
|
67
|
+
arcScale: number;
|
|
68
|
+
rotate: number;
|
|
69
|
+
strokeWidth: number;
|
|
70
|
+
showNumber: boolean;
|
|
71
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
72
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ref as m, computed as t } from "vue";
|
|
2
|
+
const b = {
|
|
3
|
+
name: "KvProgressCircle",
|
|
4
|
+
props: {
|
|
5
|
+
/**
|
|
6
|
+
* Value of the progress circle, between 0 and 100.
|
|
7
|
+
* */
|
|
8
|
+
value: {
|
|
9
|
+
type: Number,
|
|
10
|
+
required: !0,
|
|
11
|
+
validator(e) {
|
|
12
|
+
return e >= 0 && e <= 100;
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* Create an arc instead of a full circle. A percent.
|
|
17
|
+
* */
|
|
18
|
+
arcScale: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 1
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* Degrees to rotate the circle, used in tandem with arcScale.
|
|
24
|
+
* */
|
|
25
|
+
rotate: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 0
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* Stroke width as a percent of the circle
|
|
31
|
+
* */
|
|
32
|
+
strokeWidth: {
|
|
33
|
+
default: 8,
|
|
34
|
+
type: Number
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* Whether to show the value as a number
|
|
38
|
+
* */
|
|
39
|
+
showNumber: {
|
|
40
|
+
default: !1,
|
|
41
|
+
type: Boolean
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Color of the progress circle
|
|
45
|
+
* */
|
|
46
|
+
color: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "brand"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
setup(e) {
|
|
52
|
+
const u = m(100), l = t(() => e.strokeWidth * 3), c = t(() => u.value - e.strokeWidth / 2), a = t(() => c.value * 2 * Math.PI), o = t(() => a.value - e.value / 100 * a.value * e.arcScale), n = t(() => a.value - 1 * a.value * e.arcScale), f = t(() => `rotate(${90 + e.rotate}deg)`), s = t(() => `rotate(${-90 + e.rotate}deg)`), r = t(() => e.value > 75 || e.value < 25), d = t(() => r.value ? a.value - e.value / 100 * a.value * e.arcScale : e.value / 100 * a.value * e.arcScale), i = t(() => r.value ? 0 : l.value * 0.625);
|
|
53
|
+
return {
|
|
54
|
+
radius: u,
|
|
55
|
+
fontSize: l,
|
|
56
|
+
normalizedRadius: c,
|
|
57
|
+
circumference: a,
|
|
58
|
+
strokeDashoffset: o,
|
|
59
|
+
backgroundStrokeDashoffset: n,
|
|
60
|
+
circleTransform: f,
|
|
61
|
+
textCircleTransform: s,
|
|
62
|
+
flipText: r,
|
|
63
|
+
textDx: d,
|
|
64
|
+
textDy: i
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
b as default
|
|
70
|
+
};
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export { default as KvPieChart } from './KvPieChart.vue';
|
|
|
61
61
|
export { default as KvPill } from './KvPill.vue';
|
|
62
62
|
export { default as KvPopper } from './KvPopper.vue';
|
|
63
63
|
export { default as KvProgressBar } from './KvProgressBar.vue';
|
|
64
|
+
export { default as KvProgressCircle } from './KvProgressCircle.vue';
|
|
64
65
|
export { default as KvPulsingDot } from './KvPulsingDot.vue';
|
|
65
66
|
export { default as KvRadio } from './KvRadio.vue';
|
|
66
67
|
export { default as KvSelect } from './KvSelect.vue';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@babel/preset-env": "^7.24.8",
|
|
35
35
|
"@babel/preset-react": "^7.24.7",
|
|
36
36
|
"@babel/preset-typescript": "^7.24.7",
|
|
37
|
-
"@kiva/kv-tokens": "^3.7.
|
|
37
|
+
"@kiva/kv-tokens": "^3.7.1",
|
|
38
38
|
"@kiva/vite-plugin-vue-lib-css": "^2.0.0",
|
|
39
39
|
"@laynezh/vite-plugin-lib-assets": "^0.6.1",
|
|
40
40
|
"@mdi/js": "^7.4.47",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"embla-carousel-fade",
|
|
126
126
|
"popper.js"
|
|
127
127
|
],
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "8ae76e2ab2c457b7dd52654cb154bbd2723904ef"
|
|
129
129
|
}
|