@kiva/kv-components 8.11.4 → 8.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import y from "./KvPieChartV22.js";
2
- import { resolveComponent as x, openBlock as l, createElementBlock as o, createElementVNode as r, normalizeClass as k, createCommentVNode as n, Fragment as d, renderList as c, normalizeStyle as a, toDisplayString as w, createBlock as _, withCtx as b } from "vue";
2
+ import { resolveComponent as x, openBlock as l, createElementBlock as o, createElementVNode as r, normalizeClass as k, createCommentVNode as n, Fragment as d, renderList as c, normalizeStyle as s, toDisplayString as w, createBlock as _, withCtx as b } from "vue";
3
3
  import "./KvPieChartV2.css";
4
4
  import u from "../_virtual/_plugin-vue_export-helper.js";
5
5
  const v = {
@@ -14,25 +14,25 @@ const v = {
14
14
  }, S = ["cx", "cy", "r", "stroke", "stroke-width"], L = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "transform"], O = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "transform"], V = {
15
15
  key: 0,
16
16
  class: "tw-flex tw-flex-wrap tw-justify-center tw-gap-0.5 tw-w-full tw-pt-0.5"
17
- }, W = { class: "tw-flex tw-gap-0.5 tw-items-center tw-min-w-0 tw-overflow-hidden" }, p = { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap tw-truncate" }, B = { class: "tw-flex tw-gap-0.5 tw-items-center tw-shrink-0" }, I = { class: "tw-grid tw-grid-cols-2 tw-grid-flow-row tw-gap-0.5" }, E = { class: "tw-flex tw-gap-0.5 tw-items-center tw-shrink-0 tw-overflow-hidden" }, X = { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap tw-truncate" }, Y = {
17
+ }, W = { class: "tw-flex tw-gap-0.5 tw-items-center tw-min-w-0 tw-overflow-hidden" }, B = { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap tw-truncate" }, p = { class: "tw-flex tw-gap-0.5 tw-items-center tw-shrink-0" }, E = { class: "tw-grid tw-grid-cols-2 tw-grid-flow-row tw-gap-0.5" }, I = { class: "tw-flex tw-gap-0.5 tw-items-center tw-shrink-0 tw-overflow-hidden" }, X = { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap tw-truncate" }, Y = {
18
18
  class: "tw-font-light tw-text-small tw-text-primary tw-text-right tw-shrink-0 tw-tabular-nums",
19
19
  style: { "min-width": "2.8ch" }
20
20
  };
21
- function G(N, s, i, t, M, R) {
21
+ function G(N, i, a, t, M, R) {
22
22
  var h, m;
23
23
  const f = x("kv-lightbox");
24
24
  return l(), o("figure", v, [
25
25
  r("div", C, [
26
26
  (l(), o("svg", D, [
27
- i.loading || !t.hasData ? (l(), o("circle", {
27
+ a.loading || !t.hasData ? (l(), o("circle", {
28
28
  key: 0,
29
29
  cx: t.CX,
30
30
  cy: t.CY,
31
31
  r: t.radius,
32
32
  stroke: t.LOADING_BG_COLOR,
33
- "stroke-width": i.strokeWidth,
33
+ "stroke-width": a.strokeWidth,
34
34
  fill: "none",
35
- class: k(["skeleton-ring tw-opacity-0", { "skeleton-ring--hidden": t.animatedIn }])
35
+ class: k(["skeleton-ring", { "skeleton-ring--loading": a.loading }])
36
36
  }, null, 10, S)) : n("", !0),
37
37
  (l(!0), o(d, null, c(t.visibleSegments, (e) => (l(), o("circle", {
38
38
  key: e.label,
@@ -40,12 +40,12 @@ function G(N, s, i, t, M, R) {
40
40
  cy: t.CY,
41
41
  r: t.radius,
42
42
  stroke: e.color,
43
- "stroke-width": i.strokeWidth,
43
+ "stroke-width": a.strokeWidth,
44
44
  fill: "none",
45
45
  "stroke-dasharray": `${e.dashLength} ${t.circumference * 2}`,
46
46
  transform: `rotate(${e.startDeg}, ${t.CX}, ${t.CY})`,
47
47
  class: "segment-circle",
48
- style: a({
48
+ style: s({
49
49
  strokeDashoffset: e.isVisible ? 0 : e.dashLength,
50
50
  transitionDelay: `${e.delay}ms`
51
51
  })
@@ -56,19 +56,19 @@ function G(N, s, i, t, M, R) {
56
56
  cy: t.CY,
57
57
  r: t.radius,
58
58
  stroke: t.OTHER_SEGMENT_BG_COLOR,
59
- "stroke-width": i.strokeWidth,
59
+ "stroke-width": a.strokeWidth,
60
60
  fill: "none",
61
61
  "stroke-dasharray": `${t.otherSegment.dashLength} ${t.circumference * 2}`,
62
62
  transform: `rotate(${t.otherSegment.startDeg}, ${t.CX}, ${t.CY})`,
63
63
  class: "segment-circle",
64
- style: a({
64
+ style: s({
65
65
  strokeDashoffset: t.otherSegment.isVisible ? 0 : t.otherSegment.dashLength,
66
66
  transitionDelay: `${t.otherSegment.delay}ms`
67
67
  })
68
68
  }, null, 12, O)) : n("", !0)
69
69
  ]))
70
70
  ]),
71
- t.hasData && !i.loading ? (l(), o("div", V, [
71
+ t.hasData && !a.loading ? (l(), o("div", V, [
72
72
  (l(!0), o(d, null, c(t.visibleSegments, (e, g) => (l(), o("div", {
73
73
  key: e.label,
74
74
  class: "tw-bg-gray-100 tw-flex tw-gap-0.5 tw-items-center tw-px-1 tw-py-0.5 tw-rounded-xs"
@@ -76,56 +76,56 @@ function G(N, s, i, t, M, R) {
76
76
  r("div", W, [
77
77
  r("span", {
78
78
  class: "tw-shrink-0 tw-w-1 tw-h-1 tw-rounded-full legend-dot",
79
- style: a({
79
+ style: s({
80
80
  backgroundColor: e.isVisible ? e.color : "#d1d5db",
81
81
  transitionDelay: `${e.delay}ms`
82
82
  })
83
83
  }, null, 4),
84
- r("span", p, w(e.label), 1)
84
+ r("span", B, w(e.label), 1)
85
85
  ]),
86
86
  r("span", {
87
87
  class: "tw-font-light tw-text-small tw-text-primary tw-text-right tw-shrink-0 tw-tabular-nums",
88
- style: a({ minWidth: t.valueMinWidth })
88
+ style: s({ minWidth: t.valueMinWidth })
89
89
  }, w(t.formatDisplayValue(g)), 5)
90
90
  ]))), 128)),
91
91
  t.otherItems.length > 0 ? (l(), o("button", {
92
92
  key: 0,
93
93
  class: "tw-bg-gray-100 tw-flex tw-gap-0.5 tw-items-center tw-px-1 tw-py-0.5 tw-rounded-xs tw-cursor-pointer tw-border-0 tw-text-left",
94
94
  type: "button",
95
- onClick: s[0] || (s[0] = (e) => t.showOtherLightbox = !0)
95
+ onClick: i[0] || (i[0] = (e) => t.showOtherLightbox = !0)
96
96
  }, [
97
- r("div", B, [
97
+ r("div", p, [
98
98
  r("span", {
99
99
  class: "tw-shrink-0 tw-w-1 tw-h-1 tw-rounded-full legend-dot",
100
- style: a({
100
+ style: s({
101
101
  backgroundColor: (h = t.otherSegment) != null && h.isVisible ? "#C4C4C4" : "#d1d5db",
102
102
  transitionDelay: `${((m = t.otherSegment) == null ? void 0 : m.delay) ?? 0}ms`
103
103
  })
104
104
  }, null, 4),
105
- s[2] || (s[2] = r("span", { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap" }, " Other ", -1))
105
+ i[2] || (i[2] = r("span", { class: "tw-font-medium tw-text-small tw-text-primary tw-whitespace-nowrap" }, " Other ", -1))
106
106
  ]),
107
107
  r("span", {
108
108
  class: "tw-font-light tw-text-small tw-text-primary tw-text-right tw-shrink-0 tw-tabular-nums",
109
- style: a({ minWidth: t.valueMinWidth })
109
+ style: s({ minWidth: t.valueMinWidth })
110
110
  }, w(t.formatOtherDisplayValue()), 5)
111
111
  ])) : n("", !0)
112
112
  ])) : n("", !0),
113
- t.hasData && !i.loading ? (l(), _(f, {
113
+ t.hasData && !a.loading ? (l(), _(f, {
114
114
  key: 1,
115
115
  visible: t.showOtherLightbox,
116
116
  title: "Other",
117
- onLightboxClosed: s[1] || (s[1] = (e) => t.showOtherLightbox = !1)
117
+ onLightboxClosed: i[1] || (i[1] = (e) => t.showOtherLightbox = !1)
118
118
  }, {
119
119
  default: b(() => [
120
- r("div", I, [
120
+ r("div", E, [
121
121
  (l(!0), o(d, null, c(t.allItemsWithColors, (e) => (l(), o("div", {
122
122
  key: e.label,
123
123
  class: "tw-bg-gray-100 tw-flex tw-gap-0.5 tw-items-center tw-px-1 tw-py-0.5 tw-rounded-xs tw-justify-between tw-w-full"
124
124
  }, [
125
- r("div", E, [
125
+ r("div", I, [
126
126
  r("span", {
127
127
  class: "tw-shrink-0 tw-w-1 tw-h-1 tw-rounded-full",
128
- style: a({ backgroundColor: e.color })
128
+ style: s({ backgroundColor: e.color })
129
129
  }, null, 4),
130
130
  r("span", X, w(e.label), 1)
131
131
  ]),
@@ -137,7 +137,7 @@ function G(N, s, i, t, M, R) {
137
137
  }, 8, ["visible"])) : n("", !0)
138
138
  ]);
139
139
  }
140
- const A = /* @__PURE__ */ u(y, [["render", G], ["__scopeId", "data-v-3e2d3156"]]);
140
+ const A = /* @__PURE__ */ u(y, [["render", G], ["__scopeId", "data-v-73c9f5f9"]]);
141
141
  export {
142
142
  A as default
143
143
  };
@@ -115,11 +115,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
115
115
  }>> & Readonly<{}>, {
116
116
  values: KvPieChartV2Item[];
117
117
  loading: boolean;
118
+ initialDelay: number;
119
+ strokeWidth: number;
118
120
  unit: PieChartUnit;
119
121
  shownSegments: number;
120
- strokeWidth: number;
121
122
  segmentGap: number;
122
- initialDelay: number;
123
123
  animateOut: boolean;
124
124
  }, {}, {
125
125
  KvLightbox: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -64,9 +64,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
64
64
  };
65
65
  }>> & Readonly<{}>, {
66
66
  color: string;
67
+ rotate: number;
67
68
  strokeWidth: number;
68
69
  arcScale: number;
69
- rotate: number;
70
70
  showNumber: boolean;
71
71
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
72
72
  export default _default;
@@ -72,9 +72,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
72
72
  onSubnavLinkClicked?: (...args: any[]) => any;
73
73
  }>, {
74
74
  theme: string;
75
+ links: NavLink[];
75
76
  heading: string;
76
77
  headingLink: NavLink;
77
- links: NavLink[];
78
78
  linkAlignment: string;
79
79
  }, {}, {
80
80
  KvThemeProvider: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -0,0 +1 @@
1
+ .kv-simple-map__pan-layer[data-v-49496ad7]{transform-origin:0 0}.kv-simple-map__control-btn[data-v-49496ad7]{display:flex;height:2rem;width:2rem;cursor:pointer;align-items:center;justify-content:center;border-radius:.25rem;border-width:.0625rem;--tw-border-opacity: 1;border-color:rgba(var(--border-tertiary),var(--tw-border-opacity, 1));--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)}.kv-simple-map__control-btn[data-v-49496ad7]:disabled{cursor:default;opacity:.3}.kv-simple-map__control-btn[data-v-49496ad7]:hover:not(:disabled){--tw-bg-opacity: 1;background-color:rgba(var(--bg-secondary),var(--tw-bg-opacity, 1))}.kv-simple-map__play-btn[data-v-49496ad7]{border-radius:500rem}.kv-simple-map__default-popup[data-v-49496ad7]{white-space:nowrap;border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:.5rem 1.5rem;text-align:center;--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);min-width:80px}.kv-simple-map__popup[data-v-49496ad7]{height:0;width:0}.kv-simple-map__popup-content[data-v-49496ad7]{position:absolute;white-space:nowrap}.kv-simple-map__popup--top>.kv-simple-map__popup-content[data-v-49496ad7]{bottom:var(--kv-simple-map-popup-offset, 4px);left:0;transform:translate(-50%)}.kv-simple-map__popup--bottom>.kv-simple-map__popup-content[data-v-49496ad7]{top:var(--kv-simple-map-popup-offset, 4px);left:0;transform:translate(-50%)}.kv-simple-map__popup--bottom-right>.kv-simple-map__popup-content[data-v-49496ad7]{top:var(--kv-simple-map-popup-offset, 4px);left:var(--kv-simple-map-popup-offset, 4px)}.kv-simple-map-popup-enter-active[data-v-49496ad7],.kv-simple-map-popup-leave-active[data-v-49496ad7]{transition:opacity .18s ease-out}.kv-simple-map-popup-enter-from[data-v-49496ad7],.kv-simple-map-popup-leave-to[data-v-49496ad7]{opacity:0}.kv-simple-map-popup-enter-to[data-v-49496ad7],.kv-simple-map-popup-leave-from[data-v-49496ad7]{opacity:1}
@@ -0,0 +1,7 @@
1
+ import o from "./KvSimpleMap2.js";
2
+ import "./KvSimpleMap.css";
3
+ import p from "../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ p(o, [["__scopeId", "data-v-49496ad7"]]);
5
+ export {
6
+ r as default
7
+ };
@@ -0,0 +1,270 @@
1
+ import { PropType } from 'vue';
2
+ export interface SimpleMapCountry {
3
+ id: string;
4
+ name?: string;
5
+ loanCount?: number;
6
+ cx?: number;
7
+ cy?: number;
8
+ }
9
+ declare function __VLS_template(): {
10
+ attrs: Partial<{}>;
11
+ slots: {
12
+ popup?(_: {
13
+ country: SimpleMapCountry;
14
+ }): any;
15
+ };
16
+ refs: {
17
+ rootRef: HTMLDivElement;
18
+ };
19
+ rootEl: HTMLDivElement;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
23
+ countries: {
24
+ type: PropType<SimpleMapCountry[]>;
25
+ default: () => any[];
26
+ };
27
+ aspectRatio: {
28
+ type: NumberConstructor;
29
+ default: number;
30
+ };
31
+ height: {
32
+ type: NumberConstructor;
33
+ default: any;
34
+ };
35
+ width: {
36
+ type: NumberConstructor;
37
+ default: any;
38
+ };
39
+ autoplay: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ loop: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ allowDragging: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ showZoomControls: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ zoomFactor: {
56
+ type: NumberConstructor;
57
+ default: number;
58
+ };
59
+ minZoom: {
60
+ type: NumberConstructor;
61
+ default: number;
62
+ };
63
+ maxZoom: {
64
+ type: NumberConstructor;
65
+ default: number;
66
+ };
67
+ zoomStep: {
68
+ type: NumberConstructor;
69
+ default: number;
70
+ };
71
+ highlightColor: {
72
+ type: StringConstructor;
73
+ default: any;
74
+ };
75
+ baseColor: {
76
+ type: StringConstructor;
77
+ default: any;
78
+ };
79
+ loanCountTiers: {
80
+ type: PropType<[number, number, number, number]>;
81
+ default: () => number[];
82
+ };
83
+ oceanColor: {
84
+ type: StringConstructor;
85
+ default: string;
86
+ };
87
+ popupPlacement: {
88
+ type: PropType<"top" | "bottom-right">;
89
+ default: string;
90
+ validator: (v: string) => boolean;
91
+ };
92
+ popupOffset: {
93
+ type: NumberConstructor;
94
+ default: number;
95
+ };
96
+ fitToCountries: {
97
+ type: BooleanConstructor;
98
+ default: boolean;
99
+ };
100
+ fitPadding: {
101
+ type: NumberConstructor;
102
+ default: number;
103
+ };
104
+ initialDelay: {
105
+ type: NumberConstructor;
106
+ default: number;
107
+ };
108
+ panDuration: {
109
+ type: NumberConstructor;
110
+ default: number;
111
+ };
112
+ holdPerStep: {
113
+ type: NumberConstructor;
114
+ default: number;
115
+ };
116
+ popupHideBefore: {
117
+ type: NumberConstructor;
118
+ default: number;
119
+ };
120
+ holdAll: {
121
+ type: NumberConstructor;
122
+ default: number;
123
+ };
124
+ fadeDuration: {
125
+ type: NumberConstructor;
126
+ default: number;
127
+ };
128
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
129
+ countries: {
130
+ type: PropType<SimpleMapCountry[]>;
131
+ default: () => any[];
132
+ };
133
+ aspectRatio: {
134
+ type: NumberConstructor;
135
+ default: number;
136
+ };
137
+ height: {
138
+ type: NumberConstructor;
139
+ default: any;
140
+ };
141
+ width: {
142
+ type: NumberConstructor;
143
+ default: any;
144
+ };
145
+ autoplay: {
146
+ type: BooleanConstructor;
147
+ default: boolean;
148
+ };
149
+ loop: {
150
+ type: BooleanConstructor;
151
+ default: boolean;
152
+ };
153
+ allowDragging: {
154
+ type: BooleanConstructor;
155
+ default: boolean;
156
+ };
157
+ showZoomControls: {
158
+ type: BooleanConstructor;
159
+ default: boolean;
160
+ };
161
+ zoomFactor: {
162
+ type: NumberConstructor;
163
+ default: number;
164
+ };
165
+ minZoom: {
166
+ type: NumberConstructor;
167
+ default: number;
168
+ };
169
+ maxZoom: {
170
+ type: NumberConstructor;
171
+ default: number;
172
+ };
173
+ zoomStep: {
174
+ type: NumberConstructor;
175
+ default: number;
176
+ };
177
+ highlightColor: {
178
+ type: StringConstructor;
179
+ default: any;
180
+ };
181
+ baseColor: {
182
+ type: StringConstructor;
183
+ default: any;
184
+ };
185
+ loanCountTiers: {
186
+ type: PropType<[number, number, number, number]>;
187
+ default: () => number[];
188
+ };
189
+ oceanColor: {
190
+ type: StringConstructor;
191
+ default: string;
192
+ };
193
+ popupPlacement: {
194
+ type: PropType<"top" | "bottom-right">;
195
+ default: string;
196
+ validator: (v: string) => boolean;
197
+ };
198
+ popupOffset: {
199
+ type: NumberConstructor;
200
+ default: number;
201
+ };
202
+ fitToCountries: {
203
+ type: BooleanConstructor;
204
+ default: boolean;
205
+ };
206
+ fitPadding: {
207
+ type: NumberConstructor;
208
+ default: number;
209
+ };
210
+ initialDelay: {
211
+ type: NumberConstructor;
212
+ default: number;
213
+ };
214
+ panDuration: {
215
+ type: NumberConstructor;
216
+ default: number;
217
+ };
218
+ holdPerStep: {
219
+ type: NumberConstructor;
220
+ default: number;
221
+ };
222
+ popupHideBefore: {
223
+ type: NumberConstructor;
224
+ default: number;
225
+ };
226
+ holdAll: {
227
+ type: NumberConstructor;
228
+ default: number;
229
+ };
230
+ fadeDuration: {
231
+ type: NumberConstructor;
232
+ default: number;
233
+ };
234
+ }>> & Readonly<{}>, {
235
+ height: number;
236
+ width: number;
237
+ aspectRatio: number;
238
+ loop: boolean;
239
+ autoplay: boolean;
240
+ allowDragging: boolean;
241
+ initialDelay: number;
242
+ panDuration: number;
243
+ holdPerStep: number;
244
+ popupHideBefore: number;
245
+ holdAll: number;
246
+ fadeDuration: number;
247
+ countries: SimpleMapCountry[];
248
+ showZoomControls: boolean;
249
+ zoomFactor: number;
250
+ minZoom: number;
251
+ maxZoom: number;
252
+ zoomStep: number;
253
+ highlightColor: string;
254
+ baseColor: string;
255
+ loanCountTiers: [number, number, number, number];
256
+ oceanColor: string;
257
+ popupPlacement: "top" | "bottom-right";
258
+ popupOffset: number;
259
+ fitToCountries: boolean;
260
+ fitPadding: number;
261
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
262
+ rootRef: HTMLDivElement;
263
+ }, HTMLDivElement>;
264
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
265
+ export default _default;
266
+ type __VLS_WithTemplateSlots<T, S> = T & {
267
+ new (): {
268
+ $slots: S;
269
+ };
270
+ };