@kiva/kv-components 6.65.0 → 6.66.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.
@@ -1,11 +1,11 @@
1
- import { toRefs as Q, ref as c, reactive as X, computed as j, watch as g, onMounted as Y, onBeforeUnmount as Z, onUnmounted as $, resolveComponent as ee, openBlock as p, createElementBlock as k, normalizeClass as b, withModifiers as te, createElementVNode as w, normalizeStyle as H, createVNode as z, createCommentVNode as x, toDisplayString as ne, renderSlot as D, nextTick as oe } from "vue";
2
- import { mdiArrowLeft as ie, mdiClose as le, mdiOpenInNew as se } from "@mdi/js";
3
- import ae from "./KvMaterialIcon.js";
4
- import de from "../_virtual/_plugin-vue_export-helper.js";
5
- const re = {
1
+ import { toRefs as X, ref as d, reactive as Y, computed as j, watch as g, onMounted as Z, onBeforeUnmount as $, onUnmounted as ee, resolveComponent as te, openBlock as p, createElementBlock as k, normalizeClass as b, withModifiers as ne, createElementVNode as w, normalizeStyle as H, createVNode as z, createCommentVNode as x, toDisplayString as oe, renderSlot as F, nextTick as ie } from "vue";
2
+ import { mdiArrowLeft as le, mdiClose as ae, mdiOpenInNew as se } from "@mdi/js";
3
+ import de from "./KvMaterialIcon.js";
4
+ import re from "../_virtual/_plugin-vue_export-helper.js";
5
+ const ce = {
6
6
  name: "KvSideSheet",
7
7
  components: {
8
- KvMaterialIcon: ae
8
+ KvMaterialIcon: de
9
9
  },
10
10
  props: {
11
11
  /**
@@ -86,18 +86,18 @@ const re = {
86
86
  setup(n, { emit: o, slots: i }) {
87
87
  const {
88
88
  visible: t,
89
- kvTrackFunction: I,
90
- trackEventCategory: M,
89
+ kvTrackFunction: M,
90
+ trackEventCategory: I,
91
91
  widthDimensions: l,
92
- hideHeadlineBgOnMobile: d,
93
- isAnimated: F
94
- } = Q(n), r = c(!F.value), a = c({}), O = c(null), m = c(null), y = c(null), _ = c(null), N = c(null), S = c(null), B = c(null), v = X({
92
+ hideHeadlineBgOnMobile: r,
93
+ isAnimated: V
94
+ } = X(n), c = d(!V.value), s = d({}), O = d(null), m = d(null), y = d(null), _ = d(null), N = d(null), S = d(null), B = d(null), W = d("100vh"), v = Y({
95
95
  headline: 0,
96
96
  controls: 0
97
- }), V = j(() => {
98
- const e = _.value - (d.value ? 0 : v.headline) - v.controls;
97
+ }), G = j(() => {
98
+ const e = _.value - (r.value ? 0 : v.headline) - v.controls;
99
99
  return Math.max(e, 0);
100
- }), W = j(() => {
100
+ }), A = j(() => {
101
101
  if (typeof l.value == "string")
102
102
  return l.value;
103
103
  const e = {
@@ -106,56 +106,56 @@ const re = {
106
106
  lg: 1024,
107
107
  xl: 1280,
108
108
  "2xl": 1536
109
- }, s = N.value || (typeof window < "u" ? window.innerWidth : 0), f = Object.keys(l.value).filter((u) => u !== "default").sort((u, R) => e[R] - e[u]).find((u) => s >= e[u]);
109
+ }, a = N.value || (typeof window < "u" ? window.innerWidth : 0), f = Object.keys(l.value).filter((u) => u !== "default").sort((u, R) => e[R] - e[u]).find((u) => a >= e[u]);
110
110
  return f ? l.value[f] : l.value.default || "100%";
111
- }), G = (e, s) => {
111
+ }), q = (e, a) => {
112
112
  let f;
113
113
  return (...u) => {
114
- clearTimeout(f), f = setTimeout(() => e(...u), s);
114
+ clearTimeout(f), f = setTimeout(() => e(...u), a);
115
115
  };
116
116
  }, C = () => {
117
117
  _.value = typeof window < "u" ? window.innerHeight : 0, N.value = typeof window < "u" ? window.innerWidth : 0, setTimeout(() => {
118
- oe(() => {
118
+ ie(() => {
119
119
  var e;
120
120
  if (y.value) {
121
- const s = y.value.getBoundingClientRect();
122
- v.headline = s.height;
121
+ const a = y.value.getBoundingClientRect();
122
+ v.headline = a.height;
123
123
  } else
124
124
  v.headline = 0;
125
125
  if ((e = i.controls) != null && e.call(i) && m.value) {
126
- const s = m.value.getBoundingClientRect();
127
- v.controls = s.height;
126
+ const a = m.value.getBoundingClientRect();
127
+ v.controls = a.height;
128
128
  } else
129
129
  v.controls = 0;
130
130
  });
131
131
  }, 300);
132
- }, E = G(C, 100), T = () => {
132
+ }, E = q(C, 100), T = () => {
133
133
  const e = "tw-overflow-hidden";
134
- r.value ? document.body.classList.add(e) : document.body.classList.remove(e);
135
- }, A = () => {
136
- r.value = !1, T(), I.value(M.value, "click", "side-sheet-closed"), setTimeout(() => {
134
+ c.value ? document.body.classList.add(e) : document.body.classList.remove(e);
135
+ }, K = () => {
136
+ c.value = !1, T(), M.value(I.value, "click", "side-sheet-closed"), setTimeout(() => {
137
137
  o("side-sheet-closed");
138
138
  }, 300), document.removeEventListener("keyup", L);
139
- }, q = () => {
139
+ }, J = () => {
140
140
  o("go-to-link");
141
141
  }, L = (e) => {
142
- (e == null ? void 0 : e.key) === "Escape" && A();
143
- }, J = j(() => ({
144
- width: W.value
145
- })), K = () => {
142
+ (e == null ? void 0 : e.key) === "Escape" && K();
143
+ }, P = j(() => ({
144
+ width: A.value
145
+ })), U = () => {
146
146
  if (typeof l.value == "object" && O.value) {
147
147
  const e = "side-sheet-styles";
148
- let s = document.getElementById(e);
149
- s || (s = document.createElement("style"), s.id = e, document.head.appendChild(s));
148
+ let a = document.getElementById(e);
149
+ a || (a = document.createElement("style"), a.id = e, document.head.appendChild(a));
150
150
  const f = {
151
151
  sm: "640px",
152
152
  md: "768px",
153
153
  lg: "1024px",
154
154
  xl: "1280px",
155
155
  "2xl": "1536px"
156
- }, R = Object.keys(l.value).filter((h) => h !== "default").sort((h, P) => {
157
- const U = ["sm", "md", "lg", "xl", "2xl"];
158
- return U.indexOf(h) - U.indexOf(P);
156
+ }, R = Object.keys(l.value).filter((h) => h !== "default").sort((h, Q) => {
157
+ const D = ["sm", "md", "lg", "xl", "2xl"];
158
+ return D.indexOf(h) - D.indexOf(Q);
159
159
  }).map((h) => `
160
160
  @media (min-width: ${f[h]}) {
161
161
  #side-sheet-${n.trackEventCategory || "default"} {
@@ -163,13 +163,13 @@ const re = {
163
163
  }
164
164
  }
165
165
  `).join("");
166
- s.textContent = R, O.value.id = `side-sheet-${n.trackEventCategory || "default"}`;
166
+ a.textContent = R, O.value.id = `side-sheet-${n.trackEventCategory || "default"}`;
167
167
  }
168
168
  };
169
169
  return g(t, (e) => {
170
- typeof window < "u" && (e ? (document.addEventListener("keyup", L), a.value = {}, setTimeout(() => {
171
- r.value = !0, T(), C();
172
- }, 10)) : (r.value = !1, T(), document.removeEventListener("keyup", L), a.value = {}));
170
+ typeof window < "u" && (e ? (document.addEventListener("keyup", L), s.value = {}, setTimeout(() => {
171
+ c.value = !0, T(), C();
172
+ }, 10)) : (c.value = !1, T(), document.removeEventListener("keyup", L), s.value = {}));
173
173
  }, { immediate: !0 }), g(() => {
174
174
  var e;
175
175
  return (e = i.controls) == null ? void 0 : e.call(i);
@@ -177,57 +177,58 @@ const re = {
177
177
  setTimeout(() => {
178
178
  C();
179
179
  }, 100);
180
- }, { deep: !0 }), g(W, (e) => {
181
- r.value && t.value && a.value && Object.keys(a.value).length > 0 && (a.value = {
182
- ...a.value,
180
+ }, { deep: !0 }), g(A, (e) => {
181
+ c.value && t.value && s.value && Object.keys(s.value).length > 0 && (s.value = {
182
+ ...s.value,
183
183
  width: e,
184
184
  transition: "none"
185
185
  // No animation for resize
186
186
  }, setTimeout(() => {
187
- a.value && Object.keys(a.value).length > 0 && (a.value = {
188
- ...a.value,
187
+ s.value && Object.keys(s.value).length > 0 && (s.value = {
188
+ ...s.value,
189
189
  transition: "all 0.3s ease-in-out"
190
190
  });
191
191
  }, 50));
192
192
  }), g(l, () => {
193
- r.value && K();
194
- }, { immediate: !0 }), g(r, (e) => {
195
- e && K();
196
- }), Y(() => {
197
- setTimeout(() => {
193
+ c.value && U();
194
+ }, { immediate: !0 }), g(c, (e) => {
195
+ e && U();
196
+ }), Z(() => {
197
+ W.value = "auto", setTimeout(() => {
198
198
  C();
199
199
  }, 100), m.value && (S.value = new ResizeObserver(E), S.value.observe(m.value)), y.value && (B.value = new ResizeObserver(E), B.value.observe(y.value)), window.addEventListener("resize", E);
200
- }), Z(() => {
201
- r.value && document.body.classList.remove("tw-overflow-hidden");
202
200
  }), $(() => {
201
+ c.value && document.body.classList.remove("tw-overflow-hidden");
202
+ }), ee(() => {
203
203
  S.value && S.value.disconnect(), B.value && B.value.disconnect(), window.removeEventListener("resize", E);
204
204
  const e = document.getElementById("side-sheet-styles");
205
205
  e && e.remove();
206
206
  }), {
207
- closeSideSheet: A,
208
- contentHeight: V,
207
+ closeSideSheet: K,
208
+ contentHeight: G,
209
209
  controlsRef: m,
210
210
  headlineRef: y,
211
211
  sideSheetRef: O,
212
- sideSheetStyles: J,
213
- goToLink: q,
214
- mdiArrowLeft: ie,
215
- mdiClose: le,
212
+ sideSheetStyles: P,
213
+ goToLink: J,
214
+ mdiArrowLeft: le,
215
+ mdiClose: ae,
216
216
  mdiOpenInNew: se,
217
- modalStyles: a,
218
- open: r
217
+ modalStyles: s,
218
+ open: c,
219
+ loadingContentMinHeight: W
219
220
  };
220
221
  }
221
- }, ce = { class: "tw-flex tw-gap-1.5" }, ue = { key: 1 }, we = { class: "tw-flex tw-gap-1.5" };
222
- function fe(n, o, i, t, I, M) {
223
- const l = ee("kv-material-icon");
222
+ }, ue = { class: "tw-flex tw-gap-1.5" }, we = { key: 1 }, fe = { class: "tw-flex tw-gap-1.5" };
223
+ function ve(n, o, i, t, M, I) {
224
+ const l = te("kv-material-icon");
224
225
  return i.visible ? (p(), k("div", {
225
226
  key: 0,
226
227
  class: b(["tw-block lg:tw-mt-0 tw-fixed tw-inset-0 tw-bg-black tw-transition-all md:tw-duration-150 tw-z-modal", {
227
228
  "tw-bg-opacity-0 tw-delay-300": !t.open,
228
229
  "tw-bg-opacity-low": t.open
229
230
  }]),
230
- onClick: o[3] || (o[3] = te((...d) => t.closeSideSheet && t.closeSideSheet(...d), ["self"]))
231
+ onClick: o[3] || (o[3] = ne((...r) => t.closeSideSheet && t.closeSideSheet(...r), ["self"]))
231
232
  }, [
232
233
  w("div", {
233
234
  ref: "sideSheetRef",
@@ -250,24 +251,24 @@ function fe(n, o, i, t, I, M) {
250
251
  "tw-border-b": i.showHeadlineBorder
251
252
  }])
252
253
  }, [
253
- w("div", ce, [
254
+ w("div", ue, [
254
255
  i.showBackButton ? (p(), k("button", {
255
256
  key: 0,
256
257
  class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
257
- onClick: o[0] || (o[0] = (...d) => t.closeSideSheet && t.closeSideSheet(...d))
258
+ onClick: o[0] || (o[0] = (...r) => t.closeSideSheet && t.closeSideSheet(...r))
258
259
  }, [
259
260
  z(l, {
260
261
  class: "tw-w-3 tw-h-3",
261
262
  icon: t.mdiArrowLeft
262
263
  }, null, 8, ["icon"])
263
264
  ])) : x("", !0),
264
- i.headline ? (p(), k("h3", ue, ne(i.headline), 1)) : x("", !0)
265
+ i.headline ? (p(), k("h3", we, oe(i.headline), 1)) : x("", !0)
265
266
  ]),
266
- w("div", we, [
267
+ w("div", fe, [
267
268
  i.showGoToLink ? (p(), k("button", {
268
269
  key: 0,
269
270
  class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
270
- onClick: o[1] || (o[1] = (...d) => t.goToLink && t.goToLink(...d))
271
+ onClick: o[1] || (o[1] = (...r) => t.goToLink && t.goToLink(...r))
271
272
  }, [
272
273
  z(l, {
273
274
  class: "tw-w-3 tw-h-3",
@@ -276,7 +277,7 @@ function fe(n, o, i, t, I, M) {
276
277
  ])) : x("", !0),
277
278
  w("button", {
278
279
  class: "hover:tw-text-action-highlight tw-flex tw-items-center tw-justify-center",
279
- onClick: o[2] || (o[2] = (...d) => t.closeSideSheet && t.closeSideSheet(...d))
280
+ onClick: o[2] || (o[2] = (...r) => t.closeSideSheet && t.closeSideSheet(...r))
280
281
  }, [
281
282
  z(l, {
282
283
  class: "tw-w-3 tw-h-3",
@@ -288,7 +289,10 @@ function fe(n, o, i, t, I, M) {
288
289
  w("div", {
289
290
  id: "sidesheet-content",
290
291
  class: "tw-overflow-y-auto tw-overscroll-y-contain",
291
- style: H({ height: t.contentHeight + "px" })
292
+ style: H([
293
+ { "min-height": t.loadingContentMinHeight },
294
+ { height: t.contentHeight + "px" }
295
+ ])
292
296
  }, [
293
297
  w("div", {
294
298
  class: b(["tw-px-2 tw-transition-opacity tw-duration-200", {
@@ -296,7 +300,7 @@ function fe(n, o, i, t, I, M) {
296
300
  "tw-opacity-full": t.open
297
301
  }])
298
302
  }, [
299
- D(n.$slots, "default")
303
+ F(n.$slots, "default")
300
304
  ], 2)
301
305
  ], 4),
302
306
  n.$slots.controls ? (p(), k("div", {
@@ -308,13 +312,13 @@ function fe(n, o, i, t, I, M) {
308
312
  }]),
309
313
  style: { "z-index": "999" }
310
314
  }, [
311
- D(n.$slots, "controls")
315
+ F(n.$slots, "controls")
312
316
  ], 2)) : x("", !0)
313
317
  ], 4)
314
318
  ], 6)
315
319
  ], 2)) : x("", !0);
316
320
  }
317
- const ge = /* @__PURE__ */ de(re, [["render", fe]]);
321
+ const pe = /* @__PURE__ */ re(ce, [["render", ve]]);
318
322
  export {
319
- ge as default
323
+ pe as default
320
324
  };
@@ -1 +1 @@
1
- .header-link[data-v-3a913e07]{cursor:pointer;padding-top:1rem;padding-bottom:1rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-3a913e07]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-3a913e07] .avatar div:first-child{display:flex}
1
+ .header-link[data-v-2a224640]{cursor:pointer;padding-top:1rem;padding-bottom:1rem;--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1));text-decoration-line:none}.header-link[data-v-2a224640]:hover{--tw-text-opacity: 1;color:rgba(var(--text-action),var(--tw-text-opacity, 1));text-decoration-line:none}[data-v-2a224640] .avatar div:first-child{display:flex}
@@ -10,7 +10,7 @@ import { throttle as ce } from "../../utils/throttle.js";
10
10
  import { isLegacyPlaceholderAvatar as we } from "../../utils/imageUtils.js";
11
11
  import "./KvHeaderLinkBar.css";
12
12
  import fe from "../../_virtual/_plugin-vue_export-helper.js";
13
- const Me = h(() => import("./KvHeaderMobileMenu.js")), R = h(() => import("./KvHeaderMyKivaMenu.js")), ke = h(() => import("./LendMenu/KvLendMenu.js")), he = h(() => import("./KvHeaderTakeActionMenu.js")), ge = h(() => import("./KvHeaderAboutMenu.js")), F = 120, k = "avatar-menu", x = "menuButton", W = { top: "-3.75rem", width: "100%" }, A = "lendButton", be = {
13
+ const Me = h(() => import("./KvHeaderMobileMenu.js")), R = h(() => import("./KvHeaderMyKivaMenu.js")), ke = h(() => import("./LendMenu/KvLendMenu.js")), he = h(() => import("./KvHeaderTakeActionMenu.js")), ge = h(() => import("./KvHeaderAboutMenu.js")), F = 150, k = "avatar-menu", x = "menuButton", W = { top: "-3.75rem", width: "100%" }, A = "lendButton", be = {
14
14
  components: {
15
15
  KvMaterialIcon: ue,
16
16
  KvIconBag: me,
@@ -285,7 +285,7 @@ function Ie(i, n, a, e, N, E) {
285
285
  ])
286
286
  ], 32);
287
287
  }
288
- const Pe = /* @__PURE__ */ fe(be, [["render", Ie], ["__scopeId", "data-v-3a913e07"]]);
288
+ const Pe = /* @__PURE__ */ fe(be, [["render", Ie], ["__scopeId", "data-v-2a224640"]]);
289
289
  export {
290
290
  Pe as default
291
291
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.65.0",
3
+ "version": "6.66.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -114,5 +114,5 @@
114
114
  "embla-carousel-fade",
115
115
  "popper.js"
116
116
  ],
117
- "gitHead": "7eaf279276abe20afa6d5f9de928938039dbc5e3"
117
+ "gitHead": "151b1d58b96a8e43a0e3096651504d57890e91ab"
118
118
  }