@kiva/kv-components 8.21.1 → 8.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +159 -157
- package/dist/utils/chartColors.d.ts +2 -0
- package/dist/utils/chartColors.js +40 -0
- package/dist/utils/pieChartColors.d.ts +1 -1
- package/dist/utils/pieChartColors.js +5 -39
- package/dist/vue/KvStackedBarGraph.css +1 -0
- package/dist/vue/KvStackedBarGraph.js +112 -0
- package/dist/vue/KvStackedBarGraph.vue.d.ts +105 -0
- package/dist/vue/KvStackedBarGraph2.js +127 -0
- package/dist/vue/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { default as l } from "./vue/KvBorrowerImage.js";
|
|
|
4
4
|
import { default as p } from "./vue/KvButton.js";
|
|
5
5
|
import { default as d } from "./vue/KvCardFrame.js";
|
|
6
6
|
import { default as x } from "./vue/KvCarousel.js";
|
|
7
|
-
import { default as
|
|
7
|
+
import { default as n } 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 c } from "./vue/KvCheckoutReceipt.js";
|
|
@@ -14,10 +14,10 @@ import { default as M } from "./vue/KvCompactLoanCard.js";
|
|
|
14
14
|
import { default as O } from "./vue/KvCommentsAdd.js";
|
|
15
15
|
import { default as g } from "./vue/KvCommentsContainer.js";
|
|
16
16
|
import { default as G } from "./vue/KvCommentsHeartButton.js";
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
17
|
+
import { default as h } from "./vue/KvCommentsList.js";
|
|
18
|
+
import { default as B } from "./vue/KvCommentsListItem.js";
|
|
19
19
|
import { default as U } from "./vue/KvCommentsReplyButton.js";
|
|
20
|
-
import { default as
|
|
20
|
+
import { default as k } from "./vue/KvContentfulImg.js";
|
|
21
21
|
import { default as w } from "./vue/KvCountdownTimer.js";
|
|
22
22
|
import { default as H } from "./vue/KvDatePicker.js";
|
|
23
23
|
import { default as j } from "./vue/KvExpandable.js";
|
|
@@ -31,7 +31,7 @@ import { default as le } from "./vue/KvImpactVerticalSelector.js";
|
|
|
31
31
|
import { default as pe } from "./vue/KvInlineActivityCard.js";
|
|
32
32
|
import { default as de } from "./vue/KvInlineActivityFeed.js";
|
|
33
33
|
import { default as xe } from "./vue/KvIntroductionLoanCard.js";
|
|
34
|
-
import { default as
|
|
34
|
+
import { default as ne } from "./vue/KvLendAmountButton.js";
|
|
35
35
|
import { default as Ae } from "./vue/KvLendCta.js";
|
|
36
36
|
import { default as Ce } from "./vue/KvLightbox.js";
|
|
37
37
|
import { default as ce } from "./vue/KvLineGraph.js";
|
|
@@ -41,10 +41,10 @@ import { default as Me } from "./vue/KvLoanCallouts.js";
|
|
|
41
41
|
import { KV_LOAN_INFO_CARD_FRAGMENT as Oe, default as Se } from "./vue/KvLoanInfoCard.js";
|
|
42
42
|
import { default as Pe } from "./vue/KvLoanProgressGroup.js";
|
|
43
43
|
import { default as Fe } from "./vue/KvLoanTag.js";
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
44
|
+
import { default as De } from "./vue/KvLoanTeamPick.js";
|
|
45
|
+
import { default as Ve } from "./vue/KvLoanUse.js";
|
|
46
46
|
import { default as ye } from "./vue/KvLoadingPlaceholder.js";
|
|
47
|
-
import { default as
|
|
47
|
+
import { default as be } from "./vue/KvLoadingSpinner.js";
|
|
48
48
|
import { default as We } from "./vue/KvMap.js";
|
|
49
49
|
import { default as ze } from "./vue/KvMaterialIcon.js";
|
|
50
50
|
import { default as Qe } from "./vue/KvSimpleMap.js";
|
|
@@ -57,87 +57,88 @@ import { default as fo } from "./vue/KvPopper.js";
|
|
|
57
57
|
import { default as mo } from "./vue/KvProgressBar.js";
|
|
58
58
|
import { default as so } from "./vue/KvProgressCircle.js";
|
|
59
59
|
import { default as xo } from "./vue/KvPulsingDot.js";
|
|
60
|
-
import { default as
|
|
60
|
+
import { default as no } from "./vue/KvRadio.js";
|
|
61
61
|
import { default as Ao } from "./vue/KvSelect.js";
|
|
62
62
|
import { default as Co } from "./vue/KvSideSheet.js";
|
|
63
|
-
import { default as co } from "./vue/
|
|
64
|
-
import { default as Lo } from "./vue/
|
|
65
|
-
import { default as Eo } from "./vue/
|
|
66
|
-
import { default as Mo } from "./vue/
|
|
67
|
-
import { default as Oo } from "./vue/
|
|
68
|
-
import { default as go } from "./vue/
|
|
69
|
-
import { default as Go } from "./vue/
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as Uo } from "./vue/
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as wo } from "./vue/
|
|
75
|
-
import { default as Ho } from "./vue/
|
|
76
|
-
import { default as jo } from "./vue/
|
|
77
|
-
import { default as Yo } from "./vue/
|
|
78
|
-
import { default as qo } from "./vue/
|
|
79
|
-
import { default as Xo } from "./vue/
|
|
80
|
-
import { default as er } from "./vue/
|
|
81
|
-
import { default as rr } from "./vue/
|
|
82
|
-
import { default as ar } from "./vue/
|
|
83
|
-
import { default as lr
|
|
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 {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
63
|
+
import { default as co } from "./vue/KvStackedBarGraph.js";
|
|
64
|
+
import { default as Lo } from "./vue/KvSwitch.js";
|
|
65
|
+
import { default as Eo } from "./vue/KvTab.js";
|
|
66
|
+
import { default as Mo } from "./vue/KvTabPanel.js";
|
|
67
|
+
import { default as Oo } from "./vue/KvTabs.js";
|
|
68
|
+
import { default as go } from "./vue/KvTextInput.js";
|
|
69
|
+
import { default as Go } from "./vue/KvTextLink.js";
|
|
70
|
+
import { default as ho } from "./vue/KvThemeProvider.js";
|
|
71
|
+
import { default as Bo } from "./vue/KvToast.js";
|
|
72
|
+
import { default as Uo } from "./vue/KvTooltip.js";
|
|
73
|
+
import { default as ko } from "./vue/KvTreeMapChart.js";
|
|
74
|
+
import { default as wo } from "./vue/KvUserAvatar.js";
|
|
75
|
+
import { default as Ho } from "./vue/KvUtilityMenu.js";
|
|
76
|
+
import { default as jo } from "./vue/KvVerticalCarousel.js";
|
|
77
|
+
import { default as Yo } from "./vue/KvVotingCard.js";
|
|
78
|
+
import { default as qo } from "./vue/KvVotingCardV2.js";
|
|
79
|
+
import { default as Xo } from "./vue/KvWideLoanCard.js";
|
|
80
|
+
import { default as er } from "./vue/KvAtbModal.js";
|
|
81
|
+
import { default as rr } from "./vue/KvSecondaryNav.js";
|
|
82
|
+
import { default as ar } from "./vue/KvWwwHeader.js";
|
|
83
|
+
import { default as lr } from "./vue/KvWwwHeaderBasic/KvWwwHeaderBasic.js";
|
|
84
|
+
import { default as pr, Mash as sr } from "./utils/Alea.js";
|
|
85
|
+
import { groupBy as ur, sortBy as xr } from "./utils/arrayUtils.js";
|
|
86
|
+
import { useAttrs as nr } from "./utils/attrs.js";
|
|
87
|
+
import { carouselUtil as Ar } from "./utils/carousels.js";
|
|
88
|
+
import { abc as Cr, indexIn as _r, startsWith as cr } from "./utils/comparators.js";
|
|
89
|
+
import { debounce as Lr } from "./utils/debounce.js";
|
|
90
|
+
import { useEventListener as Er } from "./utils/event.js";
|
|
91
|
+
import { collapse as Mr, expand as Ir } from "./utils/expander.js";
|
|
92
|
+
import { DEFAULT_ACCEPTED_IMAGE_TYPES as Sr, cropResizeImageToDataUrl as gr, getKivaImageUrl as Pr, isLegacyPlaceholderAvatar as Gr, randomizedUserAvatarClass as Fr, validateImageFile as hr } from "./utils/imageUtils.js";
|
|
93
|
+
import { LOAN_CALLOUTS_FRAGMENT as Br, LOAN_GEOCODE_FRAGMENT as Vr, LOAN_PROGRESS_FRAGMENT as Ur, loanCardComputedProperties as yr, loanCardMethods as kr } from "./utils/loanCard.js";
|
|
94
|
+
import { BALANCE_CAMPAIGN as wr, BASE_CAMPAIGN as Wr, ERL_COOKIE_NAME as Hr, NO_BALANCE_CAMPAIGN as zr, TOP_UP_CAMPAIGN as jr, getDropdownPriceArray as Qr, getLendCtaSelectedOption as Yr, isBetween25And50 as Zr, isLessThan25 as qr, truncateStringByWords as Jr } from "./utils/loanUtils.js";
|
|
95
|
+
import { animationCoordinator as $r, computeMapCenter as et, computeMapZoom as ot, generateMapMarkers as rt, getCoordinatesBetween as tt, getCountryColor as at, getLoansIntervals as ft } from "./utils/mapUtils.js";
|
|
96
|
+
import { lockPrintSingleEl as mt, unlockPrintSingleEl as pt } from "./utils/printing.js";
|
|
97
|
+
import { lockScroll as dt, lockScrollSmallOnly as ut, unlockScroll as xt, unlockScrollSmallOnly as Kt } from "./utils/scrollLock.js";
|
|
98
|
+
import { buildTailwindClassName as vt, headerNumberCase as At, kebabCase as it, removeObjectProperty as Ct } from "./utils/themeUtils.js";
|
|
99
|
+
import { throttle as ct } from "./utils/throttle.js";
|
|
100
|
+
import { isTargetElement as Lt, offBodyTouchstart as Nt, onBodyTouchstart as Et } from "./utils/touchEvents.js";
|
|
101
|
+
import { getTreemap as Mt } from "./utils/treemap.js";
|
|
102
|
+
import { KvBlueskyIcon as Ot } from "./assets/icons/bluesky.js";
|
|
103
|
+
import { KV_CLASSIC_LOAN_CARD_FRAGMENT as gt, KV_CLASSIC_LOAN_CARD_USER_FRAGMET as Pt } from "./vue/KvClassicLoanCard2.js";
|
|
104
|
+
import { KV_COMPACT_LOAN_CARD_FRAGMENT as Ft, KV_COMPACT_LOAN_CARD_USER_FRAGMENT as ht } from "./vue/KvCompactLoanCard2.js";
|
|
105
|
+
import { KV_INTRODUCTION_LOAN_CARD_FRAGMENT as Bt, KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT as Vt } from "./vue/KvIntroductionLoanCard2.js";
|
|
106
|
+
import { KV_LEND_CTA_FRAGMENT as yt, KV_LEND_CTA_USER_FRAGMENT as kt } from "./vue/KvLendCta2.js";
|
|
107
|
+
import { KV_LOAN_ACTIVITIES_FRAGMENT as wt } from "./vue/KvLoanActivities2.js";
|
|
108
|
+
import { KV_LOAN_BOOKMARK_FRAGMENT as Ht } from "./vue/KvLoanBookmark2.js";
|
|
109
|
+
import { KV_LOAN_TAG_FRAGMENT as jt } from "./vue/KvLoanTag2.js";
|
|
110
|
+
import { KV_LOAN_USE_FRAGMENT as Yt } from "./vue/KvLoanUse2.js";
|
|
111
|
+
import { KV_WIDE_LOAN_CARD_FRAGMENT as qt, KV_WIDE_LOAN_CARD_USER_FRAGMENT as Jt } from "./vue/KvWideLoanCard2.js";
|
|
111
112
|
export {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
113
|
+
pr as Alea,
|
|
114
|
+
wr as BALANCE_CAMPAIGN,
|
|
115
|
+
Wr as BASE_CAMPAIGN,
|
|
116
|
+
Sr as DEFAULT_ACCEPTED_IMAGE_TYPES,
|
|
117
|
+
Hr as ERL_COOKIE_NAME,
|
|
118
|
+
gt as KV_CLASSIC_LOAN_CARD_FRAGMENT,
|
|
119
|
+
Pt as KV_CLASSIC_LOAN_CARD_USER_FRAGMET,
|
|
120
|
+
Ft as KV_COMPACT_LOAN_CARD_FRAGMENT,
|
|
121
|
+
ht as KV_COMPACT_LOAN_CARD_USER_FRAGMENT,
|
|
122
|
+
Bt as KV_INTRODUCTION_LOAN_CARD_FRAGMENT,
|
|
123
|
+
Vt as KV_INTRODUCTION_LOAN_CARD_USER_FRAGMENT,
|
|
124
|
+
yt as KV_LEND_CTA_FRAGMENT,
|
|
125
|
+
kt as KV_LEND_CTA_USER_FRAGMENT,
|
|
126
|
+
wt as KV_LOAN_ACTIVITIES_FRAGMENT,
|
|
127
|
+
Ht as KV_LOAN_BOOKMARK_FRAGMENT,
|
|
127
128
|
Oe as KV_LOAN_INFO_CARD_FRAGMENT,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
jt as KV_LOAN_TAG_FRAGMENT,
|
|
130
|
+
Yt as KV_LOAN_USE_FRAGMENT,
|
|
131
|
+
qt as KV_WIDE_LOAN_CARD_FRAGMENT,
|
|
132
|
+
Jt as KV_WIDE_LOAN_CARD_USER_FRAGMENT,
|
|
132
133
|
r as KvAccordionItem,
|
|
133
134
|
a as KvActivityRow,
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
er as KvAtbModal,
|
|
136
|
+
Ot as KvBlueskyIcon,
|
|
136
137
|
l as KvBorrowerImage,
|
|
137
138
|
p as KvButton,
|
|
138
139
|
d as KvCardFrame,
|
|
139
140
|
x as KvCarousel,
|
|
140
|
-
|
|
141
|
+
n as KvCartModal,
|
|
141
142
|
A as KvCartPill,
|
|
142
143
|
C as KvCheckbox,
|
|
143
144
|
c as KvCheckoutReceipt,
|
|
@@ -146,11 +147,11 @@ export {
|
|
|
146
147
|
O as KvCommentsAdd,
|
|
147
148
|
g as KvCommentsContainer,
|
|
148
149
|
G as KvCommentsHeartButton,
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
h as KvCommentsList,
|
|
151
|
+
B as KvCommentsListItem,
|
|
151
152
|
U as KvCommentsReplyButton,
|
|
152
153
|
M as KvCompactLoanCard,
|
|
153
|
-
|
|
154
|
+
k as KvContentfulImg,
|
|
154
155
|
w as KvCountdownTimer,
|
|
155
156
|
H as KvDatePicker,
|
|
156
157
|
j as KvExpandable,
|
|
@@ -164,20 +165,20 @@ export {
|
|
|
164
165
|
pe as KvInlineActivityCard,
|
|
165
166
|
de as KvInlineActivityFeed,
|
|
166
167
|
xe as KvIntroductionLoanCard,
|
|
167
|
-
|
|
168
|
+
ne as KvLendAmountButton,
|
|
168
169
|
Ae as KvLendCta,
|
|
169
170
|
Ce as KvLightbox,
|
|
170
171
|
ce as KvLineGraph,
|
|
171
172
|
ye as KvLoadingPlaceholder,
|
|
172
|
-
|
|
173
|
+
be as KvLoadingSpinner,
|
|
173
174
|
Le as KvLoanActivities,
|
|
174
175
|
Ee as KvLoanBookmark,
|
|
175
176
|
Me as KvLoanCallouts,
|
|
176
177
|
Se as KvLoanInfoCard,
|
|
177
178
|
Pe as KvLoanProgressGroup,
|
|
178
179
|
Fe as KvLoanTag,
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
De as KvLoanTeamPick,
|
|
181
|
+
Ve as KvLoanUse,
|
|
181
182
|
We as KvMap,
|
|
182
183
|
ze as KvMaterialIcon,
|
|
183
184
|
Ze as KvPageContainer,
|
|
@@ -189,78 +190,79 @@ export {
|
|
|
189
190
|
mo as KvProgressBar,
|
|
190
191
|
so as KvProgressCircle,
|
|
191
192
|
xo as KvPulsingDot,
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
no as KvRadio,
|
|
194
|
+
rr as KvSecondaryNav,
|
|
194
195
|
Ao as KvSelect,
|
|
195
196
|
Co as KvSideSheet,
|
|
196
197
|
Qe as KvSimpleMap,
|
|
197
|
-
co as
|
|
198
|
-
Lo as
|
|
199
|
-
Eo as
|
|
200
|
-
Mo as
|
|
201
|
-
Oo as
|
|
202
|
-
go as
|
|
203
|
-
Go as
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
Uo as
|
|
207
|
-
|
|
208
|
-
wo as
|
|
209
|
-
Ho as
|
|
210
|
-
jo as
|
|
211
|
-
Yo as
|
|
212
|
-
qo as
|
|
213
|
-
|
|
214
|
-
ar as
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
Vr as
|
|
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
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
198
|
+
co as KvStackedBarGraph,
|
|
199
|
+
Lo as KvSwitch,
|
|
200
|
+
Eo as KvTab,
|
|
201
|
+
Mo as KvTabPanel,
|
|
202
|
+
Oo as KvTabs,
|
|
203
|
+
go as KvTextInput,
|
|
204
|
+
Go as KvTextLink,
|
|
205
|
+
ho as KvThemeProvider,
|
|
206
|
+
Bo as KvToast,
|
|
207
|
+
Uo as KvTooltip,
|
|
208
|
+
ko as KvTreeMapChart,
|
|
209
|
+
wo as KvUserAvatar,
|
|
210
|
+
Ho as KvUtilityMenu,
|
|
211
|
+
jo as KvVerticalCarousel,
|
|
212
|
+
Yo as KvVotingCard,
|
|
213
|
+
qo as KvVotingCardV2,
|
|
214
|
+
Xo as KvWideLoanCard,
|
|
215
|
+
ar as KvWwwHeader,
|
|
216
|
+
lr as KvWwwHeaderBasic,
|
|
217
|
+
Br as LOAN_CALLOUTS_FRAGMENT,
|
|
218
|
+
Vr as LOAN_GEOCODE_FRAGMENT,
|
|
219
|
+
Ur as LOAN_PROGRESS_FRAGMENT,
|
|
220
|
+
sr as Mash,
|
|
221
|
+
zr as NO_BALANCE_CAMPAIGN,
|
|
222
|
+
jr as TOP_UP_CAMPAIGN,
|
|
223
|
+
Cr as abc,
|
|
224
|
+
$r as animationCoordinator,
|
|
225
|
+
vt as buildTailwindClassName,
|
|
226
|
+
Ar as carouselUtil,
|
|
227
|
+
Mr as collapse,
|
|
228
|
+
et as computeMapCenter,
|
|
229
|
+
ot as computeMapZoom,
|
|
230
|
+
gr as cropResizeImageToDataUrl,
|
|
231
|
+
Lr as debounce,
|
|
232
|
+
Ir as expand,
|
|
233
|
+
rt as generateMapMarkers,
|
|
234
|
+
tt as getCoordinatesBetween,
|
|
235
|
+
at as getCountryColor,
|
|
236
|
+
Qr as getDropdownPriceArray,
|
|
237
|
+
Pr as getKivaImageUrl,
|
|
238
|
+
Yr as getLendCtaSelectedOption,
|
|
239
|
+
ft as getLoansIntervals,
|
|
240
|
+
Mt as getTreemap,
|
|
241
|
+
ur as groupBy,
|
|
242
|
+
At as headerNumberCase,
|
|
243
|
+
_r as indexIn,
|
|
244
|
+
Zr as isBetween25And50,
|
|
245
|
+
Gr as isLegacyPlaceholderAvatar,
|
|
246
|
+
qr as isLessThan25,
|
|
247
|
+
Lt as isTargetElement,
|
|
248
|
+
it as kebabCase,
|
|
249
|
+
yr as loanCardComputedProperties,
|
|
250
|
+
kr as loanCardMethods,
|
|
251
|
+
mt as lockPrintSingleEl,
|
|
252
|
+
dt as lockScroll,
|
|
253
|
+
ut as lockScrollSmallOnly,
|
|
254
|
+
Nt as offBodyTouchstart,
|
|
255
|
+
Et as onBodyTouchstart,
|
|
256
|
+
Fr as randomizedUserAvatarClass,
|
|
257
|
+
Ct as removeObjectProperty,
|
|
258
|
+
xr as sortBy,
|
|
259
|
+
cr as startsWith,
|
|
260
|
+
ct as throttle,
|
|
261
|
+
Jr as truncateStringByWords,
|
|
262
|
+
pt as unlockPrintSingleEl,
|
|
263
|
+
xt as unlockScroll,
|
|
264
|
+
Kt as unlockScrollSmallOnly,
|
|
265
|
+
nr as useAttrs,
|
|
266
|
+
Er as useEventListener,
|
|
267
|
+
hr as validateImageFile
|
|
266
268
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import n from "@kiva/kv-tokens";
|
|
2
|
+
const { colors: e } = n, o = [
|
|
3
|
+
// Tier 1 — Bold primaries
|
|
4
|
+
e["eco-green"][3],
|
|
5
|
+
// #276A43
|
|
6
|
+
e.marigold.DEFAULT,
|
|
7
|
+
// #F4B539
|
|
8
|
+
e["desert-rose"].DEFAULT,
|
|
9
|
+
// #C45F4F
|
|
10
|
+
"#2E3BAD",
|
|
11
|
+
// Custom blue for contrast
|
|
12
|
+
"#874FFF",
|
|
13
|
+
// Custom purple for contrast
|
|
14
|
+
e.stone[3],
|
|
15
|
+
// #635544
|
|
16
|
+
e.brand[500],
|
|
17
|
+
// #4AB67E
|
|
18
|
+
e.marigold[3],
|
|
19
|
+
// #996210
|
|
20
|
+
// Tier 2 — Lighter variants
|
|
21
|
+
e["eco-green"][2],
|
|
22
|
+
// #78C79F
|
|
23
|
+
e.marigold[2],
|
|
24
|
+
// #F8CD69
|
|
25
|
+
e["desert-rose"][2],
|
|
26
|
+
// #E0988D
|
|
27
|
+
e.stone[2],
|
|
28
|
+
// #AA9E8D
|
|
29
|
+
e.brand[300],
|
|
30
|
+
// #95D4B3
|
|
31
|
+
e["desert-rose"][3]
|
|
32
|
+
// #A24536
|
|
33
|
+
];
|
|
34
|
+
function i(t, r) {
|
|
35
|
+
return r || o[t % o.length];
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
o as CHART_COLORS,
|
|
39
|
+
i as getChartColor
|
|
40
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const LOADING_BG_COLOR: string;
|
|
2
2
|
export declare const OTHER_SEGMENT_BG_COLOR: string;
|
|
3
3
|
export declare const PIE_CHART_COLORS: string[];
|
|
4
|
-
export declare
|
|
4
|
+
export declare const getPieChartColor: (index: number, customColor?: string) => string;
|
|
@@ -1,42 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
e["eco-green"][3],
|
|
5
|
-
// #276A43
|
|
6
|
-
e.marigold.DEFAULT,
|
|
7
|
-
// #F4B539
|
|
8
|
-
e["desert-rose"].DEFAULT,
|
|
9
|
-
// #C45F4F
|
|
10
|
-
"#2E3BAD",
|
|
11
|
-
// Custom blue for contrast
|
|
12
|
-
"#874FFF",
|
|
13
|
-
// Custom purple for contrast
|
|
14
|
-
e.stone[3],
|
|
15
|
-
// #635544
|
|
16
|
-
e.brand[500],
|
|
17
|
-
// #4AB67E
|
|
18
|
-
e.marigold[3],
|
|
19
|
-
// #996210
|
|
20
|
-
// Tier 2 — Lighter variants
|
|
21
|
-
e["eco-green"][2],
|
|
22
|
-
// #78C79F
|
|
23
|
-
e.marigold[2],
|
|
24
|
-
// #F8CD69
|
|
25
|
-
e["desert-rose"][2],
|
|
26
|
-
// #E0988D
|
|
27
|
-
e.stone[2],
|
|
28
|
-
// #AA9E8D
|
|
29
|
-
e.brand[300],
|
|
30
|
-
// #95D4B3
|
|
31
|
-
e["desert-rose"][3]
|
|
32
|
-
// #A24536
|
|
33
|
-
];
|
|
34
|
-
function a(t, r) {
|
|
35
|
-
return r || o[t % o.length];
|
|
36
|
-
}
|
|
1
|
+
import r from "@kiva/kv-tokens";
|
|
2
|
+
import { getChartColor as t } from "./chartColors.js";
|
|
3
|
+
const { colors: o } = r, i = o.gray[200], C = o.gray[300], O = t;
|
|
37
4
|
export {
|
|
38
5
|
i as LOADING_BG_COLOR,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
a as getPieChartColor
|
|
6
|
+
C as OTHER_SEGMENT_BG_COLOR,
|
|
7
|
+
O as getPieChartColor
|
|
42
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kv-stacked-bar-graph__svg[data-v-198c22df]{height:auto;max-width:100%}.kv-stacked-bar-graph__swatch[data-v-198c22df]{width:12px;height:12px}.kv-stacked-bar-graph__segment[data-v-198c22df]{pointer-events:none;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.kv-stacked-bar-graph__bar:hover .kv-stacked-bar-graph__segment[data-v-198c22df],.kv-stacked-bar-graph__bar:focus-within .kv-stacked-bar-graph__segment[data-v-198c22df]{opacity:.85}.kv-stacked-bar-graph__hit[data-v-198c22df]{cursor:pointer;fill:transparent}.kv-stacked-bar-graph__hit[data-v-198c22df]:focus{outline:2px solid transparent;outline-offset:2px}.kv-stacked-bar-graph__hit[data-v-198c22df]:focus-visible{stroke:rgb(var(--text-primary));stroke-width:2}.kv-stacked-bar-graph__gridline[data-v-198c22df]{stroke:rgb(var(--text-tertiary));stroke-width:1;opacity:.25}.kv-stacked-bar-graph__axis-label[data-v-198c22df]{fill:currentColor;--tw-text-opacity: 1;color:rgba(var(--text-tertiary),var(--tw-text-opacity, 1));font-size:11px}.kv-stacked-bar-graph__total-label[data-v-198c22df]{fill:currentColor;--tw-text-opacity: 1;color:rgba(var(--text-secondary),var(--tw-text-opacity, 1));font-size:11px;font-weight:600}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import g from "./KvStackedBarGraph2.js";
|
|
2
|
+
import { openBlock as a, createElementBlock as r, createElementVNode as l, toDisplayString as s, Fragment as o, renderList as n, normalizeStyle as y, createTextVNode as w, createCommentVNode as _, withKeys as x, withModifiers as k } from "vue";
|
|
3
|
+
import "./KvStackedBarGraph.css";
|
|
4
|
+
import m from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const v = { class: "kv-stacked-bar-graph tw-m-0" }, f = { class: "tw-sr-only" }, b = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "kv-stacked-bar-graph__legend tw-flex tw-flex-wrap tw-gap-x-3 tw-gap-y-1 tw-mb-2 tw-p-0",
|
|
8
|
+
"aria-hidden": "false"
|
|
9
|
+
}, u = { class: "kv-stacked-bar-graph__scroll tw-overflow-x-auto" }, p = ["viewBox", "width", "height"], B = {
|
|
10
|
+
class: "kv-stacked-bar-graph__grid",
|
|
11
|
+
"aria-hidden": "true"
|
|
12
|
+
}, H = ["x1", "x2", "y1", "y2"], L = ["x", "y"], T = ["x", "y", "width", "height", "fill"], W = ["x", "y", "width", "height", "aria-label", "onClick", "onKeydown"], A = ["x", "y"], D = ["x", "y"], R = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "tw-text-center tw-text-small tw-text-tertiary tw-mt-1"
|
|
15
|
+
};
|
|
16
|
+
function K(d, S, c, t, V, C) {
|
|
17
|
+
return a(), r("figure", v, [
|
|
18
|
+
l("figcaption", f, s(t.ariaSummary), 1),
|
|
19
|
+
c.series.length ? (a(), r("ul", b, [
|
|
20
|
+
(a(!0), r(o, null, n(t.resolvedSeries, (e) => (a(), r("li", {
|
|
21
|
+
key: e.key,
|
|
22
|
+
class: "tw-flex tw-items-center tw-text-small tw-text-secondary"
|
|
23
|
+
}, [
|
|
24
|
+
l("span", {
|
|
25
|
+
class: "kv-stacked-bar-graph__swatch tw-inline-block tw-mr-0.5 tw-rounded-sm",
|
|
26
|
+
style: y({ backgroundColor: e.color })
|
|
27
|
+
}, null, 4),
|
|
28
|
+
w(" " + s(e.label), 1)
|
|
29
|
+
]))), 128))
|
|
30
|
+
])) : _("", !0),
|
|
31
|
+
l("div", u, [
|
|
32
|
+
(a(), r("svg", {
|
|
33
|
+
viewBox: `0 0 ${t.chartWidth} ${t.chartHeight}`,
|
|
34
|
+
width: t.chartWidth,
|
|
35
|
+
height: t.chartHeight,
|
|
36
|
+
class: "kv-stacked-bar-graph__svg",
|
|
37
|
+
preserveAspectRatio: "xMinYMin meet"
|
|
38
|
+
}, [
|
|
39
|
+
l("g", B, [
|
|
40
|
+
(a(!0), r(o, null, n(t.yTicks, (e) => (a(), r(o, {
|
|
41
|
+
key: `grid-${e.value}`
|
|
42
|
+
}, [
|
|
43
|
+
l("line", {
|
|
44
|
+
x1: t.padLeft,
|
|
45
|
+
x2: t.chartWidth - t.PAD_RIGHT,
|
|
46
|
+
y1: e.y,
|
|
47
|
+
y2: e.y,
|
|
48
|
+
class: "kv-stacked-bar-graph__gridline"
|
|
49
|
+
}, null, 8, H),
|
|
50
|
+
l("text", {
|
|
51
|
+
x: t.padLeft - 6,
|
|
52
|
+
y: e.y + 3,
|
|
53
|
+
"text-anchor": "end",
|
|
54
|
+
class: "kv-stacked-bar-graph__axis-label"
|
|
55
|
+
}, s(c.formatValue(e.value)), 9, L)
|
|
56
|
+
], 64))), 128))
|
|
57
|
+
]),
|
|
58
|
+
(a(!0), r(o, null, n(t.bars, (e, h) => (a(), r("g", {
|
|
59
|
+
key: `bar-${e.label}`,
|
|
60
|
+
class: "kv-stacked-bar-graph__bar"
|
|
61
|
+
}, [
|
|
62
|
+
(a(!0), r(o, null, n(e.segments, (i) => (a(), r("rect", {
|
|
63
|
+
key: `${e.label}-${i.seriesKey}`,
|
|
64
|
+
x: e.x,
|
|
65
|
+
y: i.y,
|
|
66
|
+
width: t.BAR_WIDTH,
|
|
67
|
+
height: i.height,
|
|
68
|
+
fill: i.color,
|
|
69
|
+
class: "kv-stacked-bar-graph__segment",
|
|
70
|
+
"aria-hidden": "true"
|
|
71
|
+
}, null, 8, T))), 128)),
|
|
72
|
+
l("rect", {
|
|
73
|
+
class: "kv-stacked-bar-graph__hit",
|
|
74
|
+
x: e.x,
|
|
75
|
+
y: e.totalY,
|
|
76
|
+
width: t.BAR_WIDTH,
|
|
77
|
+
height: e.height,
|
|
78
|
+
role: "button",
|
|
79
|
+
tabindex: "0",
|
|
80
|
+
"aria-label": e.ariaLabel,
|
|
81
|
+
onClick: (i) => d.$emit("bar-click", h),
|
|
82
|
+
onKeydown: [
|
|
83
|
+
x(k((i) => d.$emit("bar-click", h), ["prevent"]), ["enter"]),
|
|
84
|
+
x(k((i) => d.$emit("bar-click", h), ["prevent"]), ["space"])
|
|
85
|
+
]
|
|
86
|
+
}, [
|
|
87
|
+
l("title", null, s(e.ariaLabel), 1)
|
|
88
|
+
], 40, W),
|
|
89
|
+
l("text", {
|
|
90
|
+
x: e.x + t.BAR_WIDTH / 2,
|
|
91
|
+
y: t.chartHeight - 8,
|
|
92
|
+
"text-anchor": "middle",
|
|
93
|
+
class: "kv-stacked-bar-graph__axis-label",
|
|
94
|
+
"aria-hidden": "true"
|
|
95
|
+
}, s(e.label), 9, A),
|
|
96
|
+
l("text", {
|
|
97
|
+
x: e.x + t.BAR_WIDTH / 2,
|
|
98
|
+
y: e.totalY - 6,
|
|
99
|
+
"text-anchor": "middle",
|
|
100
|
+
class: "kv-stacked-bar-graph__total-label",
|
|
101
|
+
"aria-hidden": "true"
|
|
102
|
+
}, s(c.formatValue(e.total)), 9, D)
|
|
103
|
+
]))), 128))
|
|
104
|
+
], 8, p))
|
|
105
|
+
]),
|
|
106
|
+
c.axisLabel ? (a(), r("p", R, s(c.axisLabel), 1)) : _("", !0)
|
|
107
|
+
]);
|
|
108
|
+
}
|
|
109
|
+
const E = /* @__PURE__ */ m(g, [["render", K], ["__scopeId", "data-v-198c22df"]]);
|
|
110
|
+
export {
|
|
111
|
+
E as default
|
|
112
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export interface KvStackedBarSegment {
|
|
3
|
+
seriesKey: string;
|
|
4
|
+
value: number;
|
|
5
|
+
}
|
|
6
|
+
export interface KvStackedBarPoint {
|
|
7
|
+
label: string;
|
|
8
|
+
segments: KvStackedBarSegment[];
|
|
9
|
+
}
|
|
10
|
+
export interface KvStackedBarSeries {
|
|
11
|
+
key: string;
|
|
12
|
+
label: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
}
|
|
15
|
+
interface RenderSegment {
|
|
16
|
+
seriesKey: string;
|
|
17
|
+
color: string;
|
|
18
|
+
y: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}
|
|
21
|
+
interface RenderBar {
|
|
22
|
+
label: string;
|
|
23
|
+
x: number;
|
|
24
|
+
total: number;
|
|
25
|
+
totalY: number;
|
|
26
|
+
height: number;
|
|
27
|
+
segments: RenderSegment[];
|
|
28
|
+
ariaLabel: string;
|
|
29
|
+
}
|
|
30
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
31
|
+
points: {
|
|
32
|
+
type: PropType<KvStackedBarPoint[]>;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
series: {
|
|
36
|
+
type: PropType<KvStackedBarSeries[]>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
formatValue: {
|
|
40
|
+
type: PropType<(value: number) => string>;
|
|
41
|
+
default: (value: number) => string;
|
|
42
|
+
};
|
|
43
|
+
axisLabel: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
title: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
barActionLabel: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
}>, {
|
|
56
|
+
PAD_RIGHT: number;
|
|
57
|
+
BAR_WIDTH: number;
|
|
58
|
+
resolvedSeries: import('vue').ComputedRef<{
|
|
59
|
+
color: string;
|
|
60
|
+
key: string;
|
|
61
|
+
label: string;
|
|
62
|
+
}[]>;
|
|
63
|
+
padLeft: import('vue').ComputedRef<number>;
|
|
64
|
+
chartHeight: import('vue').ComputedRef<number>;
|
|
65
|
+
chartWidth: import('vue').ComputedRef<number>;
|
|
66
|
+
yTicks: import('vue').ComputedRef<{
|
|
67
|
+
value: number;
|
|
68
|
+
y: number;
|
|
69
|
+
}[]>;
|
|
70
|
+
bars: import('vue').ComputedRef<RenderBar[]>;
|
|
71
|
+
ariaSummary: import('vue').ComputedRef<string>;
|
|
72
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "bar-click"[], "bar-click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
73
|
+
points: {
|
|
74
|
+
type: PropType<KvStackedBarPoint[]>;
|
|
75
|
+
required: true;
|
|
76
|
+
};
|
|
77
|
+
series: {
|
|
78
|
+
type: PropType<KvStackedBarSeries[]>;
|
|
79
|
+
required: true;
|
|
80
|
+
};
|
|
81
|
+
formatValue: {
|
|
82
|
+
type: PropType<(value: number) => string>;
|
|
83
|
+
default: (value: number) => string;
|
|
84
|
+
};
|
|
85
|
+
axisLabel: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
title: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
barActionLabel: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
default: string;
|
|
96
|
+
};
|
|
97
|
+
}>> & Readonly<{
|
|
98
|
+
"onBar-click"?: (...args: any[]) => any;
|
|
99
|
+
}>, {
|
|
100
|
+
title: string;
|
|
101
|
+
axisLabel: string;
|
|
102
|
+
formatValue: (value: number) => string;
|
|
103
|
+
barActionLabel: string;
|
|
104
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
105
|
+
export default _default;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { toRefs as D, computed as t } from "vue";
|
|
2
|
+
import { getChartColor as j } from "../utils/chartColors.js";
|
|
3
|
+
const g = 220, $ = 16, Y = 26, G = 8, S = 30, x = 26, q = 2, F = 5;
|
|
4
|
+
function V(c) {
|
|
5
|
+
const l = 10 ** Math.floor(Math.log10(c)), o = c / l;
|
|
6
|
+
let n;
|
|
7
|
+
return o < 1.5 ? n = 1 : o < 3 ? n = 2 : o < 7 ? n = 5 : n = 10, n * l;
|
|
8
|
+
}
|
|
9
|
+
const z = {
|
|
10
|
+
name: "KvStackedBarGraph",
|
|
11
|
+
props: {
|
|
12
|
+
/**
|
|
13
|
+
* Bars to plot, in display order. Each point stacks its segments bottom-up.
|
|
14
|
+
* [{ label: 'Jul 2026', segments: [{ seriesKey: 'user', value: 340 }, …] }]
|
|
15
|
+
*/
|
|
16
|
+
points: {
|
|
17
|
+
type: Array,
|
|
18
|
+
required: !0
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* Series definitions in fixed order (never cycled). Each supplies a stable
|
|
22
|
+
* key, a legend label, and an optional `color` override.
|
|
23
|
+
* [{ key: 'user', label: 'Repaid to your account', color: '#26985D' }]
|
|
24
|
+
*/
|
|
25
|
+
series: {
|
|
26
|
+
type: Array,
|
|
27
|
+
required: !0
|
|
28
|
+
},
|
|
29
|
+
/** Formatter for values shown in axis labels, direct labels, and aria text. */
|
|
30
|
+
formatValue: {
|
|
31
|
+
type: Function,
|
|
32
|
+
default: (c) => String(c)
|
|
33
|
+
},
|
|
34
|
+
/** Optional caption shown below the plot. */
|
|
35
|
+
axisLabel: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
/** Accessible title summarising what the chart shows. */
|
|
40
|
+
title: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* Optional call-to-action sentence appended to each bar's aria-label,
|
|
46
|
+
* e.g. "Select to view repayments for this month." Empty ⇒ no suffix.
|
|
47
|
+
*/
|
|
48
|
+
barActionLabel: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: ["bar-click"],
|
|
54
|
+
setup(c) {
|
|
55
|
+
const {
|
|
56
|
+
points: l,
|
|
57
|
+
series: o,
|
|
58
|
+
formatValue: n,
|
|
59
|
+
title: A,
|
|
60
|
+
barActionLabel: T
|
|
61
|
+
} = D(c), _ = t(() => o.value.map((e, s) => ({
|
|
62
|
+
...e,
|
|
63
|
+
color: j(s, e.color)
|
|
64
|
+
}))), L = t(
|
|
65
|
+
() => Object.fromEntries(_.value.map((e) => [e.key, e.color]))
|
|
66
|
+
), P = t(
|
|
67
|
+
() => Object.fromEntries(o.value.map((e) => [e.key, e.label]))
|
|
68
|
+
), B = t(() => new Set(o.value.map((e) => e.key))), k = t(() => l.value.map(
|
|
69
|
+
(e) => (e.segments || []).reduce(
|
|
70
|
+
(s, r) => B.value.has(r.seriesKey) && Number(r.value) > 0 ? s + Number(r.value) : s,
|
|
71
|
+
0
|
|
72
|
+
)
|
|
73
|
+
)), p = t(() => {
|
|
74
|
+
const e = Math.max(...k.value, 0);
|
|
75
|
+
if (e <= 0)
|
|
76
|
+
return { max: 1, ticks: [0] };
|
|
77
|
+
const s = V(e / F), r = Math.ceil(e / s) * s, u = Math.round(r / s), v = Array.from({ length: u + 1 }, (b, h) => h * s);
|
|
78
|
+
return { max: r, ticks: v };
|
|
79
|
+
}), f = t(() => g / p.value.max), m = t(() => $ + g), y = t(() => {
|
|
80
|
+
const e = n.value(p.value.max);
|
|
81
|
+
return Math.max(40, 14 + e.length * 7);
|
|
82
|
+
}), E = t(() => $ + g + Y), H = t(() => {
|
|
83
|
+
const e = Math.max(l.value.length, 1);
|
|
84
|
+
return y.value + e * (S + x) + G;
|
|
85
|
+
}), N = t(() => p.value.ticks.map((e) => ({
|
|
86
|
+
value: e,
|
|
87
|
+
y: m.value - e * f.value
|
|
88
|
+
}))), O = t(() => l.value.map((e, s) => {
|
|
89
|
+
const r = k.value[s], u = o.value.map((a) => (e.segments || []).find((i) => i.seriesKey === a.key)).filter((a) => !!a && Number(a.value) > 0);
|
|
90
|
+
let v = m.value;
|
|
91
|
+
const b = [];
|
|
92
|
+
for (let a = u.length - 1; a >= 0; a -= 1) {
|
|
93
|
+
const i = u[a], d = Number(i.value) * f.value, w = a === u.length - 1, K = v - d, C = w ? d : Math.max(d - q, 1);
|
|
94
|
+
v = K, b.push({
|
|
95
|
+
seriesKey: i.seriesKey,
|
|
96
|
+
color: L.value[i.seriesKey],
|
|
97
|
+
y: K,
|
|
98
|
+
height: C
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
const h = m.value - r * f.value, M = u.map((a) => `${P.value[a.seriesKey] || a.seriesKey}: ${n.value(Number(a.value))}`).join(", "), R = T.value ? `. ${T.value}` : "";
|
|
102
|
+
return {
|
|
103
|
+
label: e.label,
|
|
104
|
+
x: y.value + s * (S + x) + x / 2,
|
|
105
|
+
total: r,
|
|
106
|
+
totalY: h,
|
|
107
|
+
height: m.value - h,
|
|
108
|
+
segments: b,
|
|
109
|
+
ariaLabel: `${e.label} — total ${n.value(r)}${M ? `; ${M}` : ""}${R}`
|
|
110
|
+
};
|
|
111
|
+
})), I = t(() => A.value ? A.value : `Stacked bar graph of ${l.value.length} periods across ${o.value.length} series.`);
|
|
112
|
+
return {
|
|
113
|
+
PAD_RIGHT: G,
|
|
114
|
+
BAR_WIDTH: S,
|
|
115
|
+
resolvedSeries: _,
|
|
116
|
+
padLeft: y,
|
|
117
|
+
chartHeight: E,
|
|
118
|
+
chartWidth: H,
|
|
119
|
+
yTicks: N,
|
|
120
|
+
bars: O,
|
|
121
|
+
ariaSummary: I
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
export {
|
|
126
|
+
z as default
|
|
127
|
+
};
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export { default as KvPulsingDot } from './KvPulsingDot.vue';
|
|
|
70
70
|
export { default as KvRadio } from './KvRadio.vue';
|
|
71
71
|
export { default as KvSelect } from './KvSelect.vue';
|
|
72
72
|
export { default as KvSideSheet } from './KvSideSheet.vue';
|
|
73
|
+
export { default as KvStackedBarGraph } from './KvStackedBarGraph.vue';
|
|
73
74
|
export { default as KvSwitch } from './KvSwitch.vue';
|
|
74
75
|
export { default as KvTab } from './KvTab.vue';
|
|
75
76
|
export { default as KvTabPanel } from './KvTabPanel.vue';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.22.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"dependencies": {
|
|
114
114
|
"fuse.js": "^7.1.0"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "cf0d2b3894bff0585eb9ce54bd95dd2554792b86"
|
|
117
117
|
}
|