@kiva/kv-components 6.57.6 → 6.58.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 +1 @@
1
- @media (min-width: 45.875rem){.cart-modal[data-v-2070d628] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
1
+ @media (min-width: 45.875rem){.cart-modal[data-v-85b67e19] div.container{right:var(--modal-right)!important;top:var(--modal-top)!important}}
@@ -103,20 +103,20 @@ const Q = {
103
103
  ],
104
104
  setup(b, { emit: i }) {
105
105
  const {
106
- modalVisible: a,
106
+ modalVisible: r,
107
107
  addedLoan: l,
108
108
  userData: m,
109
109
  hasEverLoggedIn: A,
110
110
  myKivaExperimentEnabled: p,
111
111
  oneLoanAwayCategory: w,
112
112
  oneLoanAwayFilteredUrl: v,
113
- milestonesProgress: q
113
+ milestonesProgress: P
114
114
  } = N(b), f = E(0), k = E(0), Z = C(() => {
115
115
  var t;
116
116
  return ((t = l.value) == null ? void 0 : t.basketSize) ?? 0;
117
- }), H = C(() => {
118
- const t = `${window.innerWidth - k.value - 200}`, o = `${f.value}`;
119
- return { right: t, top: o };
117
+ }), q = C(() => {
118
+ const t = window.innerWidth - k.value - 200, o = `${t > 0 ? t : 0}`, n = `${f.value}`;
119
+ return { right: o, top: n };
120
120
  }), u = C(() => {
121
121
  var t;
122
122
  return (t = l.value) == null ? void 0 : t.name;
@@ -124,13 +124,13 @@ const Q = {
124
124
  var t;
125
125
  return !((t = m.value) != null && t.my);
126
126
  }), g = C(() => {
127
- var t, o, r;
128
- return p.value && (_.value && !A.value || !_.value && !((r = (o = (t = m.value) == null ? void 0 : t.my) == null ? void 0 : o.loans) != null && r.totalCount)) && Z.value === 1;
129
- }), x = C(() => w.value && v.value && !g.value), j = C(() => Object.values(q.value).reduce((t, o) => t + (o > 0 ? o : 0), 0)), P = C(() => {
130
- var o, r, s;
127
+ var t, o, n;
128
+ return p.value && (_.value && !A.value || !_.value && !((n = (o = (t = m.value) == null ? void 0 : t.my) == null ? void 0 : o.loans) != null && n.totalCount)) && Z.value === 1;
129
+ }), x = C(() => w.value && v.value && !g.value), j = C(() => Object.values(P.value).reduce((t, o) => t + (o > 0 ? o : 0), 0)), H = C(() => {
130
+ var o, n, s;
131
131
  if (g.value) {
132
- const n = `Supporting ${u.value} helps`;
133
- return ((o = l.value) == null ? void 0 : o.borrowerCount) > 1 || (r = l.value) != null && r.themes.includes("Social Enterprise") ? `${n} them invest in themselves.` : ((s = l.value) == null ? void 0 : s.gender) === "male" ? `${n} him invest in himself.` : `${n} her invest in herself.`;
132
+ const a = `Supporting ${u.value} helps`;
133
+ return ((o = l.value) == null ? void 0 : o.borrowerCount) > 1 || (n = l.value) != null && n.themes.includes("Social Enterprise") ? `${a} them invest in themselves.` : ((s = l.value) == null ? void 0 : s.gender) === "male" ? `${a} him invest in himself.` : `${a} her invest in herself.`;
134
134
  }
135
135
  if (x.value)
136
136
  return "You’re close to your next achievement!";
@@ -143,24 +143,24 @@ const Q = {
143
143
  o && V(o), i("reset-modal");
144
144
  }, M = () => {
145
145
  const t = document.getElementsByTagName("header")[0], o = (t == null ? void 0 : t.getBoundingClientRect()) ?? null;
146
- let r = [...document.querySelectorAll('[data-testid="header-basket"]')], s = r.find((L) => L == null ? void 0 : L.clientHeight);
147
- s || (r = [...document.querySelectorAll('[data-testid="header-about"]')], s = r.find((L) => L == null ? void 0 : L.clientHeight));
148
- const n = (s == null ? void 0 : s.getBoundingClientRect()) ?? null;
149
- n && (n == null ? void 0 : n.right) !== k.value && (k.value = n == null ? void 0 : n.right), o && (o == null ? void 0 : o.bottom) !== f.value && (f.value = o == null ? void 0 : o.bottom);
146
+ let n = [...document.querySelectorAll('[data-testid="header-basket"]')], s = n.find((L) => L == null ? void 0 : L.clientHeight);
147
+ s || (n = [...document.querySelectorAll('[data-testid="header-about"]')], s = n.find((L) => L == null ? void 0 : L.clientHeight));
148
+ const a = (s == null ? void 0 : s.getBoundingClientRect()) ?? null;
149
+ a && (a == null ? void 0 : a.right) !== k.value && (k.value = a == null ? void 0 : a.right), o && (o == null ? void 0 : o.bottom) !== f.value && (f.value = o == null ? void 0 : o.bottom);
150
150
  }, c = G(M, 50);
151
- return F(a, () => {
152
- a.value && M();
151
+ return F(r, () => {
152
+ r.value && M();
153
153
  }, { immediate: !0 }), O(() => {
154
154
  M(), window.addEventListener("scroll", c), window.addEventListener("resize", c);
155
155
  }), z(() => {
156
156
  window.removeEventListener("scroll", c), window.removeEventListener("resize", c);
157
157
  }), {
158
- modalPosition: H,
158
+ modalPosition: q,
159
159
  basketCount: Z,
160
160
  isFirstLoan: g,
161
161
  borrowerName: u,
162
162
  showOneAway: x,
163
- pillMsg: P,
163
+ pillMsg: H,
164
164
  closeCartModal: K
165
165
  };
166
166
  }
@@ -187,27 +187,27 @@ const Q = {
187
187
  key: 2,
188
188
  class: "tw-text-h5"
189
189
  };
190
- function o1(b, i, a, l, m, A) {
190
+ function o1(b, i, r, l, m, A) {
191
191
  const p = B("KvCartPill"), w = B("KvCartModal");
192
- return a.modalVisible ? (d(), D(w, {
192
+ return r.modalVisible ? (d(), D(w, {
193
193
  key: 0,
194
194
  style: R({
195
195
  "--modal-right": `${l.modalPosition.right}px`,
196
196
  "--modal-top": `${l.modalPosition.top}px`
197
197
  }),
198
198
  class: "cart-modal !tw-top-0",
199
- visible: a.modalVisible,
200
- "photo-path": a.photoPath,
199
+ visible: r.modalVisible,
200
+ "photo-path": r.photoPath,
201
201
  "basket-count": l.basketCount,
202
- "category-name": a.oneLoanAwayCategory,
202
+ "category-name": r.oneLoanAwayCategory,
203
203
  onCartModalClosed: l.closeCartModal
204
204
  }, {
205
205
  content: S(() => [
206
- a.showModalContent || l.isFirstLoan ? (d(), h("div", X, [
206
+ r.showModalContent || l.isFirstLoan ? (d(), h("div", X, [
207
207
  T(p, {
208
208
  class: "!tw-w-full tw-justify-center",
209
209
  "borrower-name": l.borrowerName,
210
- "milestones-number": a.milestonesNumber,
210
+ "milestones-number": r.milestonesNumber,
211
211
  "is-close-next-milestone": l.showOneAway,
212
212
  "custom-message": l.pillMsg
213
213
  }, {
@@ -380,7 +380,7 @@ function o1(b, i, a, l, m, A) {
380
380
  fill: "#757575"
381
381
  }, null, -1)
382
382
  ]))),
383
- l.showOneAway ? (d(), h("div", t1, U(a.oneAwayText), 1)) : y("", !0)
383
+ l.showOneAway ? (d(), h("div", t1, U(r.oneAwayText), 1)) : y("", !0)
384
384
  ], 2)
385
385
  ]),
386
386
  _: 1
@@ -390,7 +390,7 @@ function o1(b, i, a, l, m, A) {
390
390
  _: 1
391
391
  }, 8, ["style", "visible", "photo-path", "basket-count", "category-name", "onCartModalClosed"])) : y("", !0);
392
392
  }
393
- const C1 = /* @__PURE__ */ J(Q, [["render", o1], ["__scopeId", "data-v-2070d628"]]);
393
+ const C1 = /* @__PURE__ */ J(Q, [["render", o1], ["__scopeId", "data-v-85b67e19"]]);
394
394
  export {
395
395
  C1 as default
396
396
  };
@@ -1 +1 @@
1
- .kv-datepicker__loading{padding:20px;text-align:center;color:var(--text-secondary)}.kv-datepicker .dp__input{font-family:inherit;font-weight:inherit;height:3rem;background-color:rgb(var(--bg-primary))}.kv-datepicker .dp__input:focus-within,.kv-datepicker .dp__input:focus-visible{border-color:rgb(var(--bg-action));border-width:2px;outline:none}.kv-datepicker .dp__theme_light{--dp-primary-color: rgb(var(--bg-primary-inverse));--dp-secondary-color: rgb(var(--bg-tertiary));--dp-icon-color: rgb(var(--bg-action));--dp-hover-icon-color: rgb(var(--bg-action));--dp-border-radius: .25rem;--dp-border-color-focus: rgb(var(--bg-action-highlight));--dp-font-family: inherit, "Postgrotesk", sans-serif;--dp-primary-text-color: rgb(var(--text-primary-inverse));--dp-border-color: rgb(var(--bg-tertiary));--dp-hover-color: rgb(var(--bg-tertiary));--dp-background-color: rgb(var(--bg-primary));--dp-text-color: rgb(var(--text-primary));--dp-menu-border-color: rgb(var(--bg-primary-inverse));--dp-disabled-color: rgb(var(--bg-primary));--dp-disabled-color-text: rgb(var(--text-secondary));--dp-success-color: rgb(var(--bg-action));--dp-danger-color: rgb(var(--bg-danger));--dp-highlight-color: rgb(var(--bg-action));--dp-cell-border-radius: .25rem;--dp-loader: rgb(var(--bg-action));--dp-range-between-dates-background-color: rgb(var(--bg-action));--dp-range-between-dates-text-color: rgb(var(--bg-primary));--dp-range-between-border-color: rgb(var(--bg-action))}
1
+ .kv-datepicker__loading{padding:20px;text-align:center;color:var(--text-secondary)}.kv-datepicker .dp__input{font-family:inherit;font-weight:inherit;height:3rem}.kv-datepicker .dp__input:focus-within,.kv-datepicker .dp__input:focus-visible{border-color:rgb(var(--bg-action));border-width:2px;outline:none}.kv-datepicker .dp__disabled{color:rgb(var(--text-tertiary))}.kv-datepicker .dp__theme_light{--dp-primary-color: rgb(var(--bg-primary-inverse));--dp-secondary-color: rgb(var(--bg-tertiary));--dp-icon-color: rgb(var(--bg-action));--dp-hover-icon-color: rgb(var(--bg-action));--dp-border-radius: .25rem;--dp-border-color-focus: rgb(var(--bg-action-highlight));--dp-font-family: inherit, "Postgrotesk", sans-serif;--dp-primary-text-color: rgb(var(--text-primary-inverse));--dp-border-color: rgb(var(--bg-tertiary));--dp-hover-color: rgb(var(--bg-tertiary));--dp-background-color: rgb(var(--bg-primary));--dp-text-color: rgb(var(--text-primary));--dp-menu-border-color: rgb(var(--bg-primary-inverse));--dp-disabled-color: rgb(var(--bg-tertiary), 25%);--dp-disabled-color-text: rgb(var(--bg-tertiary));--dp-success-color: rgb(var(--bg-action));--dp-danger-color: rgb(var(--bg-danger));--dp-highlight-color: rgb(var(--bg-action));--dp-cell-border-radius: .25rem;--dp-loader: rgb(var(--bg-action));--dp-range-between-dates-background-color: rgb(var(--bg-action));--dp-range-between-dates-text-color: rgb(var(--bg-primary));--dp-range-between-border-color: rgb(var(--bg-action))}
@@ -1,4 +1,4 @@
1
- import { toRefs as L, ref as u, nextTick as C, computed as E, watch as K, onMounted as M, onBeforeUnmount as N, resolveComponent as P, openBlock as b, createBlock as R, Transition as V, withCtx as j, withDirectives as q, createElementVNode as i, withModifiers as x, createElementBlock as g, createCommentVNode as y, normalizeClass as S, renderSlot as p, toDisplayString as z, createVNode as D, vShow as I } from "vue";
1
+ import { toRefs as L, ref as u, nextTick as C, computed as E, watch as K, onMounted as M, onBeforeUnmount as N, resolveComponent as P, openBlock as b, createBlock as R, Transition as V, withCtx as j, withDirectives as q, createElementVNode as i, withModifiers as k, createElementBlock as g, createCommentVNode as y, normalizeClass as S, renderSlot as p, toDisplayString as z, createVNode as D, vShow as I } from "vue";
2
2
  import { mdiClose as O } from "@mdi/js";
3
3
  import { useFocusTrap as T } from "@vueuse/integrations/useFocusTrap";
4
4
  import { hideOthers as U } from "../vendor/aria-hidden/dist/es2015/index.js";
@@ -60,7 +60,7 @@ const X = {
60
60
  const {
61
61
  visible: t,
62
62
  variant: l,
63
- preventClose: k
63
+ preventClose: x
64
64
  } = L(n), c = u(null), a = u(null), r = u(null), w = u(null), v = u(null);
65
65
  C(() => {
66
66
  const {
@@ -83,10 +83,10 @@ const X = {
83
83
  c.value && a.value && ((s = v.value) == null || s.call(v), a.value.scrollTop = 0, H(a.value)), A(), m && (m(), m = null), document.removeEventListener("keyup", f), e("lightbox-closed", { type: o });
84
84
  };
85
85
  f = (o) => {
86
- o && o.key === "Escape" && !k.value && d();
86
+ o && o.key === "Escape" && !x.value && d();
87
87
  };
88
88
  const _ = () => {
89
- k.value || d("background-click");
89
+ x.value || d("background-click");
90
90
  }, h = () => {
91
91
  t.value && (document.addEventListener("keyup", f), C(() => {
92
92
  var o;
@@ -112,7 +112,7 @@ const X = {
112
112
  controlsRef: r
113
113
  };
114
114
  }
115
- }, Y = ["aria-label", "aria-describedby", "role"], Z = { class: "tw-flex tw-p-2.5 md:tw-px-4 md:tw-pt-4 md:tw-pb-3.5" }, F = { class: "tw-flex-grow" }, $ = { class: "tw-text-h3 tw-flex-1" }, tt = {
115
+ }, Y = ["aria-label", "aria-describedby", "role"], Z = { class: "tw-flex tw-p-2.5 md:tw-px-4 md:tw-pt-4 md:tw-pb-3.5" }, F = { class: "tw-flex-grow" }, $ = { class: "tw-flex-1" }, tt = {
116
116
  id: "kvLightboxBody",
117
117
  ref: "kvLightboxBody",
118
118
  class: "tw-flex-1 tw-px-2.5 md:tw-px-4 tw-pb-2.5 md:tw-pb-4 tw-overflow-auto"
@@ -121,7 +121,7 @@ const X = {
121
121
  ref: "controlsRef",
122
122
  class: "tw-flex-shrink-0 tw-flex tw-justify-end tw-gap-x-2.5 tw-p-2.5 md:tw-px-4 md:tw-pb-4 md:tw-pt-1"
123
123
  };
124
- function lt(n, e, t, l, k, c) {
124
+ function lt(n, e, t, l, x, c) {
125
125
  const a = P("kv-material-icon");
126
126
  return b(), R(V, {
127
127
  "enter-active-class": "tw-transition-opacity tw-duration-300",
@@ -134,13 +134,13 @@ function lt(n, e, t, l, k, c) {
134
134
  default: j(() => [
135
135
  q(i("div", {
136
136
  class: "tw-z-modal tw-fixed tw-inset-0 tw-bg-black tw-bg-opacity-[75%]",
137
- onClick: e[3] || (e[3] = x((...r) => l.onScreenClick && l.onScreenClick(...r), ["stop", "prevent"]))
137
+ onClick: e[3] || (e[3] = k((...r) => l.onScreenClick && l.onScreenClick(...r), ["stop", "prevent"]))
138
138
  }, [
139
139
  i("div", null, [
140
140
  t.blurBackground ? (b(), g("div", {
141
141
  key: 0,
142
142
  class: "tw-fixed tw-inset-0 tw-w-full tw-h-full tw-backdrop-blur-sm",
143
- onClick: e[0] || (e[0] = x((...r) => l.onScreenClick && l.onScreenClick(...r), ["stop", "prevent"]))
143
+ onClick: e[0] || (e[0] = k((...r) => l.onScreenClick && l.onScreenClick(...r), ["stop", "prevent"]))
144
144
  })) : y("", !0),
145
145
  i("div", {
146
146
  class: S(["tw-flex tw-absolute tw-inset-0", {
@@ -164,7 +164,7 @@ function lt(n, e, t, l, k, c) {
164
164
  "aria-label": t.title ? t.title : null,
165
165
  "aria-describedby": t.variant === "alert" ? "kvLightboxBody" : null,
166
166
  role: l.role,
167
- onClick: e[2] || (e[2] = x(() => {
167
+ onClick: e[2] || (e[2] = k(() => {
168
168
  }, ["stop"]))
169
169
  }, [
170
170
  i("div", Z, [
@@ -176,7 +176,7 @@ function lt(n, e, t, l, k, c) {
176
176
  t.preventClose ? y("", !0) : (b(), g("button", {
177
177
  key: 0,
178
178
  class: "tw-grid tw-content-center tw-justify-center tw-ml-auto tw-w-6 tw-h-6 tw--m-2 hover:tw-text-action-highlight",
179
- onClick: e[1] || (e[1] = x((r) => l.hide("close-x"), ["stop"]))
179
+ onClick: e[1] || (e[1] = k((r) => l.hide("close-x"), ["stop"]))
180
180
  }, [
181
181
  D(a, {
182
182
  class: "tw-w-3 tw-h-3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "6.57.6",
3
+ "version": "6.58.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": "24c9aa1fe01dc29c3aaccd0d1f9f16e3755d2094"
117
+ "gitHead": "3c67ddaea821beb6c6de444767ab3efe9a60ca3b"
118
118
  }