@cal.macconnachie/web-components 2.6.0 → 2.6.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.d.ts CHANGED
@@ -295,8 +295,9 @@ export declare class BaseList extends BaseElement {
295
295
  private isPulling;
296
296
  private pullDistance;
297
297
  private startY;
298
+ private startScrollTop;
298
299
  private pullThreshold;
299
- private listElement?;
300
+ private pullActivationDistance;
300
301
  static styles: CSSResult;
301
302
  connectedCallback(): void;
302
303
  disconnectedCallback(): void;
package/dist/index.js CHANGED
@@ -65,7 +65,7 @@ const { is: ds, defineProperty: hs, getOwnPropertyDescriptor: ps, getOwnProperty
65
65
  return t;
66
66
  } }, It = (r, e) => !ds(r, e), sr = { attribute: !0, type: String, converter: ht, reflect: !1, useDefault: !1, hasChanged: It };
67
67
  Symbol.metadata ??= Symbol("metadata"), ft.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
- let Ce = class extends HTMLElement {
68
+ let Ae = class extends HTMLElement {
69
69
  static addInitializer(e) {
70
70
  this._$Ei(), (this.l ??= []).push(e);
71
71
  }
@@ -246,7 +246,7 @@ let Ce = class extends HTMLElement {
246
246
  firstUpdated(e) {
247
247
  }
248
248
  };
249
- Ce.elementStyles = [], Ce.shadowRootOptions = { mode: "open" }, Ce[He("elementProperties")] = /* @__PURE__ */ new Map(), Ce[He("finalized")] = /* @__PURE__ */ new Map(), bs?.({ ReactiveElement: Ce }), (ft.reactiveElementVersions ??= []).push("2.1.1");
249
+ Ae.elementStyles = [], Ae.shadowRootOptions = { mode: "open" }, Ae[He("elementProperties")] = /* @__PURE__ */ new Map(), Ae[He("finalized")] = /* @__PURE__ */ new Map(), bs?.({ ReactiveElement: Ae }), (ft.reactiveElementVersions ??= []).push("2.1.1");
250
250
  const Lt = globalThis, pt = Lt.trustedTypes, ir = pt ? pt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Or = "$lit$", he = `lit$${Math.random().toFixed(9).slice(2)}$`, Pr = "?" + he, vs = `<${Pr}>`, xe = document, je = () => xe.createComment(""), Ve = (r) => r === null || typeof r != "object" && typeof r != "function", Bt = Array.isArray, ys = (r) => Bt(r) || typeof r?.[Symbol.iterator] == "function", St = `[
251
251
  \f\r]`, Ne = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, or = /-->/g, ar = />/g, me = RegExp(`>|${St}(?:([^\\s"'>=/]+)(${St}*=${St}*(?:[^
252
252
  \f\r"'\`<>=]|("|')|))|$)`, "g"), nr = /'/g, lr = /"/g, Rr = /^(?:script|style|textarea|title)$/i, ws = (r) => (e, ...t) => ({ _$litType$: r, strings: e, values: t }), f = ws(1), ne = Symbol.for("lit-noChange"), k = Symbol.for("lit-nothing"), cr = /* @__PURE__ */ new WeakMap(), ve = xe.createTreeWalker(xe, 129);
@@ -303,11 +303,11 @@ class Ye {
303
303
  return i.innerHTML = e, i;
304
304
  }
305
305
  }
306
- function Ae(r, e, t = r, i) {
306
+ function Ce(r, e, t = r, i) {
307
307
  if (e === ne) return e;
308
308
  let s = i !== void 0 ? t._$Co?.[i] : t._$Cl;
309
309
  const o = Ve(e) ? void 0 : e._$litDirective$;
310
- return s?.constructor !== o && (s?._$AO?.(!1), o === void 0 ? s = void 0 : (s = new o(r), s._$AT(r, t, i)), i !== void 0 ? (t._$Co ??= [])[i] = s : t._$Cl = s), s !== void 0 && (e = Ae(r, s._$AS(r, e.values), s, i)), e;
310
+ return s?.constructor !== o && (s?._$AO?.(!1), o === void 0 ? s = void 0 : (s = new o(r), s._$AT(r, t, i)), i !== void 0 ? (t._$Co ??= [])[i] = s : t._$Cl = s), s !== void 0 && (e = Ce(r, s._$AS(r, e.values), s, i)), e;
311
311
  }
312
312
  let $s = class {
313
313
  constructor(e, t) {
@@ -326,7 +326,7 @@ let $s = class {
326
326
  for (; l !== void 0; ) {
327
327
  if (a === l.index) {
328
328
  let h;
329
- l.type === 2 ? h = new Te(o, o.nextSibling, this, e) : l.type === 1 ? h = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (h = new Cs(o, this, e)), this._$AV.push(h), l = i[++n];
329
+ l.type === 2 ? h = new Te(o, o.nextSibling, this, e) : l.type === 1 ? h = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (h = new As(o, this, e)), this._$AV.push(h), l = i[++n];
330
330
  }
331
331
  a !== l?.index && (o = ve.nextNode(), a++);
332
332
  }
@@ -356,7 +356,7 @@ class Te {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(e, t = this) {
359
- e = Ae(this, e, t), Ve(e) ? e === k || e == null || e === "" ? (this._$AH !== k && this._$AR(), this._$AH = k) : e !== this._$AH && e !== ne && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ys(e) ? this.k(e) : this._(e);
359
+ e = Ce(this, e, t), Ve(e) ? e === k || e == null || e === "" ? (this._$AH !== k && this._$AR(), this._$AH = k) : e !== this._$AH && e !== ne && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ys(e) ? this.k(e) : this._(e);
360
360
  }
361
361
  O(e) {
362
362
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -409,11 +409,11 @@ class gt {
409
409
  _$AI(e, t = this, i, s) {
410
410
  const o = this.strings;
411
411
  let a = !1;
412
- if (o === void 0) e = Ae(this, e, t, 0), a = !Ve(e) || e !== this._$AH && e !== ne, a && (this._$AH = e);
412
+ if (o === void 0) e = Ce(this, e, t, 0), a = !Ve(e) || e !== this._$AH && e !== ne, a && (this._$AH = e);
413
413
  else {
414
414
  const n = e;
415
415
  let l, h;
416
- for (e = o[0], l = 0; l < o.length - 1; l++) h = Ae(this, n[i + l], t, l), h === ne && (h = this._$AH[l]), a ||= !Ve(h) || h !== this._$AH[l], h === k ? e = k : e !== k && (e += (h ?? "") + o[l + 1]), this._$AH[l] = h;
416
+ for (e = o[0], l = 0; l < o.length - 1; l++) h = Ce(this, n[i + l], t, l), h === ne && (h = this._$AH[l]), a ||= !Ve(h) || h !== this._$AH[l], h === k ? e = k : e !== k && (e += (h ?? "") + o[l + 1]), this._$AH[l] = h;
417
417
  }
418
418
  a && !s && this.j(e);
419
419
  }
@@ -442,7 +442,7 @@ class _s extends gt {
442
442
  super(e, t, i, s, o), this.type = 5;
443
443
  }
444
444
  _$AI(e, t = this) {
445
- if ((e = Ae(this, e, t, 0) ?? k) === ne) return;
445
+ if ((e = Ce(this, e, t, 0) ?? k) === ne) return;
446
446
  const i = this._$AH, s = e === k && i !== k || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== k && (i === k || s);
447
447
  s && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
448
448
  }
@@ -450,7 +450,7 @@ class _s extends gt {
450
450
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
451
451
  }
452
452
  }
453
- class Cs {
453
+ class As {
454
454
  constructor(e, t, i) {
455
455
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
456
456
  }
@@ -458,10 +458,10 @@ class Cs {
458
458
  return this._$AM._$AU;
459
459
  }
460
460
  _$AI(e) {
461
- Ae(this, e);
461
+ Ce(this, e);
462
462
  }
463
463
  }
464
- const As = { I: Te }, Es = Lt.litHtmlPolyfillSupport;
464
+ const Cs = { I: Te }, Es = Lt.litHtmlPolyfillSupport;
465
465
  Es?.(Ye, Te), (Lt.litHtmlVersions ??= []).push("3.3.1");
466
466
  const Ts = (r, e, t) => {
467
467
  const i = t?.renderBefore ?? e;
@@ -473,7 +473,7 @@ const Ts = (r, e, t) => {
473
473
  return s._$AI(r), s;
474
474
  };
475
475
  const Nt = globalThis;
476
- let Fe = class extends Ce {
476
+ let Fe = class extends Ae {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
479
  }
@@ -555,7 +555,7 @@ class Ht {
555
555
  return this.render(...t);
556
556
  }
557
557
  }
558
- const { I: zs } = As, dr = () => document.createComment(""), Ue = (r, e, t) => {
558
+ const { I: zs } = Cs, dr = () => document.createComment(""), Ue = (r, e, t) => {
559
559
  const i = r._$AA.parentNode, s = e === void 0 ? r._$AB : e._$AA;
560
560
  if (t === void 0) {
561
561
  const o = i.insertBefore(dr(), s), a = i.insertBefore(dr(), s);
@@ -856,10 +856,10 @@ const R = ({
856
856
  clientId: i,
857
857
  redirectUri: qs(s)
858
858
  }, a = (x) => {
859
- const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", C = new Uint8Array(x);
860
- return crypto.getRandomValues(C), Array.from(C).map((T) => _[T % _.length]).join("");
859
+ const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", A = new Uint8Array(x);
860
+ return crypto.getRandomValues(A), Array.from(A).map((T) => _[T % _.length]).join("");
861
861
  }, n = async (x) => {
862
- const C = new TextEncoder().encode(x), T = await crypto.subtle.digest("SHA-256", C);
862
+ const A = new TextEncoder().encode(x), T = await crypto.subtle.digest("SHA-256", A);
863
863
  return btoa(String.fromCharCode(...new Uint8Array(T))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
864
864
  }, l = async () => {
865
865
  const x = a(128), _ = await n(x);
@@ -868,7 +868,7 @@ const R = ({
868
868
  const x = a(32);
869
869
  return sessionStorage.setItem("oauth_state", x), x;
870
870
  }, c = async () => {
871
- const { codeChallenge: x } = await l(), _ = h(), C = new URLSearchParams({
871
+ const { codeChallenge: x } = await l(), _ = h(), A = new URLSearchParams({
872
872
  response_type: "code",
873
873
  client_id: o.clientId,
874
874
  redirect_uri: o.redirectUri,
@@ -879,12 +879,12 @@ const R = ({
879
879
  code_challenge: x,
880
880
  prompt: "select_account"
881
881
  });
882
- return `${o.domain}/oauth2/authorize?${C.toString()}`;
882
+ return `${o.domain}/oauth2/authorize?${A.toString()}`;
883
883
  }, p = async () => {
884
884
  const x = await c();
885
885
  window.location.href = x;
886
886
  }, b = async () => {
887
- const { codeChallenge: x } = await l(), _ = h(), C = new URLSearchParams({
887
+ const { codeChallenge: x } = await l(), _ = h(), A = new URLSearchParams({
888
888
  response_type: "code",
889
889
  client_id: o.clientId,
890
890
  redirect_uri: o.redirectUri,
@@ -894,7 +894,7 @@ const R = ({
894
894
  code_challenge_method: "S256",
895
895
  code_challenge: x
896
896
  });
897
- return `${o.domain}/oauth2/authorize?${C.toString()}`;
897
+ return `${o.domain}/oauth2/authorize?${A.toString()}`;
898
898
  }, w = async () => {
899
899
  const x = await b();
900
900
  window.location.href = x;
@@ -914,7 +914,7 @@ const R = ({
914
914
  const _ = v();
915
915
  if (!_)
916
916
  throw new Error("PKCE code verifier not found. Please restart the authentication flow.");
917
- const C = new URLSearchParams({
917
+ const A = new URLSearchParams({
918
918
  grant_type: "authorization_code",
919
919
  client_id: o.clientId,
920
920
  code: x,
@@ -925,7 +925,7 @@ const R = ({
925
925
  headers: {
926
926
  "Content-Type": "application/x-www-form-urlencoded"
927
927
  },
928
- body: C.toString()
928
+ body: A.toString()
929
929
  });
930
930
  if (!T.ok) {
931
931
  const N = await T.text();
@@ -952,9 +952,9 @@ const js = [
952
952
  "expires_in"
953
953
  ], Vs = () => R({
954
954
  name: "auth-form",
955
- element: A
955
+ element: C
956
956
  });
957
- class A extends M {
957
+ class C extends M {
958
958
  constructor() {
959
959
  super(...arguments), this.initialMode = "signin", this.logoUrl = "", this.oauthDomain = "", this.oauthRegion = "", this.oauthUserPoolId = "", this.oauthClientId = "", this.oauthRedirectUri = "", this.oauthSpaDomain = "", this.disableSignup = !1, this.mockMode = !1, this.mode = "signin", this.resetStep = "none", this.signupStep = "form", this.isLoading = !1, this.isLoggedIn = !1, this.email = "", this.password = "", this.givenName = "", this.familyName = "", this.newPassword = "", this.confirmPassword = "", this.notice = "", this.error = "", this.errors = {}, this.userEmail = null, this.otpDigits = ["", "", "", "", "", ""], this.signupOtpDigits = ["", "", "", "", "", ""], this.hasHandledOAuthCallback = !1, this.handleAuthRefreshFailed = () => {
960
960
  this.isLoggedIn = !1, this.userEmail = null;
@@ -2072,88 +2072,88 @@ class A extends M {
2072
2072
  }
2073
2073
  E([
2074
2074
  u({ type: String, attribute: "initial-mode" })
2075
- ], A.prototype, "initialMode");
2075
+ ], C.prototype, "initialMode");
2076
2076
  E([
2077
2077
  u({ type: String, attribute: "logo-url" })
2078
- ], A.prototype, "logoUrl");
2078
+ ], C.prototype, "logoUrl");
2079
2079
  E([
2080
2080
  u({ type: String, attribute: "oauth-domain" })
2081
- ], A.prototype, "oauthDomain");
2081
+ ], C.prototype, "oauthDomain");
2082
2082
  E([
2083
2083
  u({ type: String, attribute: "oauth-region" })
2084
- ], A.prototype, "oauthRegion");
2084
+ ], C.prototype, "oauthRegion");
2085
2085
  E([
2086
2086
  u({ type: String, attribute: "oauth-user-pool-id" })
2087
- ], A.prototype, "oauthUserPoolId");
2087
+ ], C.prototype, "oauthUserPoolId");
2088
2088
  E([
2089
2089
  u({ type: String, attribute: "oauth-client-id" })
2090
- ], A.prototype, "oauthClientId");
2090
+ ], C.prototype, "oauthClientId");
2091
2091
  E([
2092
2092
  u({ type: String, attribute: "oauth-redirect-uri" })
2093
- ], A.prototype, "oauthRedirectUri");
2093
+ ], C.prototype, "oauthRedirectUri");
2094
2094
  E([
2095
2095
  u({ type: String, attribute: "oauth-spa-domain" })
2096
- ], A.prototype, "oauthSpaDomain");
2096
+ ], C.prototype, "oauthSpaDomain");
2097
2097
  E([
2098
2098
  u({ type: Boolean, attribute: "disable-signup" })
2099
- ], A.prototype, "disableSignup");
2099
+ ], C.prototype, "disableSignup");
2100
2100
  E([
2101
2101
  u({ type: Boolean, attribute: "mock-mode" })
2102
- ], A.prototype, "mockMode");
2102
+ ], C.prototype, "mockMode");
2103
2103
  E([
2104
2104
  y()
2105
- ], A.prototype, "mode");
2105
+ ], C.prototype, "mode");
2106
2106
  E([
2107
2107
  y()
2108
- ], A.prototype, "resetStep");
2108
+ ], C.prototype, "resetStep");
2109
2109
  E([
2110
2110
  y()
2111
- ], A.prototype, "signupStep");
2111
+ ], C.prototype, "signupStep");
2112
2112
  E([
2113
2113
  y()
2114
- ], A.prototype, "isLoading");
2114
+ ], C.prototype, "isLoading");
2115
2115
  E([
2116
2116
  y()
2117
- ], A.prototype, "isLoggedIn");
2117
+ ], C.prototype, "isLoggedIn");
2118
2118
  E([
2119
2119
  y()
2120
- ], A.prototype, "email");
2120
+ ], C.prototype, "email");
2121
2121
  E([
2122
2122
  y()
2123
- ], A.prototype, "password");
2123
+ ], C.prototype, "password");
2124
2124
  E([
2125
2125
  y()
2126
- ], A.prototype, "givenName");
2126
+ ], C.prototype, "givenName");
2127
2127
  E([
2128
2128
  y()
2129
- ], A.prototype, "familyName");
2129
+ ], C.prototype, "familyName");
2130
2130
  E([
2131
2131
  y()
2132
- ], A.prototype, "newPassword");
2132
+ ], C.prototype, "newPassword");
2133
2133
  E([
2134
2134
  y()
2135
- ], A.prototype, "confirmPassword");
2135
+ ], C.prototype, "confirmPassword");
2136
2136
  E([
2137
2137
  y()
2138
- ], A.prototype, "notice");
2138
+ ], C.prototype, "notice");
2139
2139
  E([
2140
2140
  y()
2141
- ], A.prototype, "error");
2141
+ ], C.prototype, "error");
2142
2142
  E([
2143
2143
  y()
2144
- ], A.prototype, "errors");
2144
+ ], C.prototype, "errors");
2145
2145
  E([
2146
2146
  y()
2147
- ], A.prototype, "userEmail");
2147
+ ], C.prototype, "userEmail");
2148
2148
  E([
2149
2149
  y()
2150
- ], A.prototype, "otpDigits");
2150
+ ], C.prototype, "otpDigits");
2151
2151
  E([
2152
2152
  y()
2153
- ], A.prototype, "signupOtpDigits");
2153
+ ], C.prototype, "signupOtpDigits");
2154
2154
  E([
2155
2155
  V("#email-input")
2156
- ], A.prototype, "emailInput");
2156
+ ], C.prototype, "emailInput");
2157
2157
  const S = qt(class extends Ht {
2158
2158
  constructor(r) {
2159
2159
  if (super(r), r.type !== Ut.ATTRIBUTE || r.name !== "class" || r.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
@@ -4666,10 +4666,10 @@ class j extends M {
4666
4666
  if (i > c && Math.abs(e) > 30)
4667
4667
  e > 0 ? b ? i > p && g && e > 50 || l < w * 0.8 ? h = -1 : h = Math.max(0, this.currentDetentIndex - 1) : h = Math.max(0, this.currentDetentIndex - 1) : h = Math.min(s.length - 1, this.currentDetentIndex + 1);
4668
4668
  else {
4669
- let _ = 0, C = Math.abs(l - s[0]);
4669
+ let _ = 0, A = Math.abs(l - s[0]);
4670
4670
  for (let T = 1; T < s.length; T++) {
4671
4671
  const N = Math.abs(l - s[T]);
4672
- N < C && (C = N, _ = T);
4672
+ N < A && (A = N, _ = T);
4673
4673
  }
4674
4674
  h = _, b && (g && l < w * 0.7 || l < w - 5) && (h = -1);
4675
4675
  }
@@ -5355,12 +5355,12 @@ class Tt extends Ht {
5355
5355
  }
5356
5356
  Tt.directiveName = "unsafeHTML", Tt.resultType = 1;
5357
5357
  const Ir = qt(Tt);
5358
- var Ci = Object.defineProperty, mt = (r, e, t, i) => {
5358
+ var Ai = Object.defineProperty, mt = (r, e, t, i) => {
5359
5359
  for (var s = void 0, o = r.length - 1, a; o >= 0; o--)
5360
5360
  (a = r[o]) && (s = a(e, t, s) || s);
5361
- return s && Ci(e, t, s), s;
5361
+ return s && Ai(e, t, s), s;
5362
5362
  };
5363
- const Ai = /* @__PURE__ */ Object.assign({
5363
+ const Ci = /* @__PURE__ */ Object.assign({
5364
5364
  "../../public/icons/arrow.svg": ii,
5365
5365
  "../../public/icons/calendar-day.svg": oi,
5366
5366
  "../../public/icons/calendar-month.svg": ai,
@@ -5427,7 +5427,7 @@ class Oe extends M {
5427
5427
  }
5428
5428
  try {
5429
5429
  const e = `../../public/icons/${this.name}.svg`;
5430
- let t = Ai[e];
5430
+ let t = Ci[e];
5431
5431
  if (!t)
5432
5432
  throw new Error(`Icon "${this.name}" not found`);
5433
5433
  t = t.replace(/<\?xml[^?]*\?>/g, ""), t = t.replace(/<style[\s\S]*?<\/style>/gi, ""), t = t.replace(/\s+style="[^"]*"/gi, ""), t = t.replace(/<defs>\s*<\/defs>/gi, ""), t = t.replace(/\s+fill="[^"]*"/gi, ""), t = t.trim(), this.svgContent = t;
@@ -5735,17 +5735,21 @@ const Pi = () => R({
5735
5735
  });
5736
5736
  class ue extends M {
5737
5737
  constructor() {
5738
- super(...arguments), this.size = "md", this.variant = "default", this.interactive = !1, this.role = "list", this.isPulling = !1, this.pullDistance = 0, this.startY = 0, this.pullThreshold = 80, this.handleTouchStart = (e) => {
5739
- this.listElement && this.listElement.scrollTop === 0 && (this.startY = e.touches[0].clientY);
5738
+ super(...arguments), this.size = "md", this.variant = "default", this.interactive = !1, this.role = "list", this.isPulling = !1, this.pullDistance = 0, this.startY = 0, this.startScrollTop = 0, this.pullThreshold = 80, this.pullActivationDistance = 20, this.handleTouchStart = (e) => {
5739
+ this.scrollTop === 0 && (this.startY = e.touches[0].clientY, this.startScrollTop = this.scrollTop);
5740
5740
  }, this.handleTouchMove = (e) => {
5741
- if (!this.listElement || this.startY === 0) return;
5741
+ if (this.startY === 0) return;
5742
5742
  const i = e.touches[0].clientY - this.startY;
5743
- i > 0 && this.listElement.scrollTop === 0 && (e.preventDefault(), this.isPulling = !0, this.pullDistance = Math.min(i * 0.5, this.pullThreshold * 1.5));
5743
+ i > this.pullActivationDistance && this.scrollTop === 0 && this.startScrollTop === 0 ? (e.preventDefault(), this.isPulling = !0, this.pullDistance = Math.min(i * 0.5, this.pullThreshold * 1.5)) : (i <= 0 || this.scrollTop > 0) && (this.startY = 0, this.startScrollTop = 0, this.isPulling = !1, this.pullDistance = 0);
5744
5744
  }, this.handleTouchEnd = () => {
5745
- this.isPulling && (this.pullDistance >= this.pullThreshold && this.dispatchEvent(new CustomEvent("list-pulled", {
5745
+ if (!this.isPulling) {
5746
+ this.startY = 0, this.startScrollTop = 0;
5747
+ return;
5748
+ }
5749
+ this.pullDistance >= this.pullThreshold && this.dispatchEvent(new CustomEvent("list-pulled", {
5746
5750
  bubbles: !0,
5747
5751
  composed: !0
5748
- })), this.isPulling = !1, this.pullDistance = 0, this.startY = 0);
5752
+ })), this.isPulling = !1, this.pullDistance = 0, this.startY = 0, this.startScrollTop = 0;
5749
5753
  };
5750
5754
  }
5751
5755
  static {
@@ -5754,6 +5758,7 @@ class ue extends M {
5754
5758
  display: block;
5755
5759
  width: 100%;
5756
5760
  position: relative;
5761
+ overflow-y: auto;
5757
5762
  -ms-overflow-style: none;
5758
5763
  scrollbar-width: none;
5759
5764
  }
@@ -5764,13 +5769,9 @@ class ue extends M {
5764
5769
 
5765
5770
  .base-list-wrapper {
5766
5771
  position: relative;
5772
+ width: 100%;
5767
5773
  overflow: hidden;
5768
- -ms-overflow-style: none;
5769
- scrollbar-width: none;
5770
- }
5771
-
5772
- .base-list-wrapper::-webkit-scrollbar {
5773
- display: none;
5774
+ height: 100%;
5774
5775
  }
5775
5776
 
5776
5777
  .pull-indicator {
@@ -5795,11 +5796,6 @@ class ue extends M {
5795
5796
  .pull-indicator__icon {
5796
5797
  font-size: 24px;
5797
5798
  color: var(--color-text-muted);
5798
- transition: transform var(--transition-normal);
5799
- }
5800
-
5801
- .pull-indicator--threshold .pull-indicator__icon {
5802
- transform: rotate(180deg);
5803
5799
  }
5804
5800
 
5805
5801
  .base-list {
@@ -5808,12 +5804,6 @@ class ue extends M {
5808
5804
  width: 100%;
5809
5805
  background-color: inherit;
5810
5806
  transition: transform var(--transition-normal);
5811
- -ms-overflow-style: none;
5812
- scrollbar-width: none;
5813
- }
5814
-
5815
- .base-list::-webkit-scrollbar {
5816
- display: none;
5817
5807
  }
5818
5808
 
5819
5809
  .base-list--pulling {
@@ -5870,18 +5860,16 @@ class ue extends M {
5870
5860
  `;
5871
5861
  }
5872
5862
  connectedCallback() {
5873
- super.connectedCallback(), this.pullActionIcon && this.updateComplete.then(() => {
5874
- this.listElement = this.shadowRoot?.querySelector(".base-list"), this.setupPullListeners();
5875
- });
5863
+ super.connectedCallback(), this.pullActionIcon && this.setupPullListeners();
5876
5864
  }
5877
5865
  disconnectedCallback() {
5878
5866
  super.disconnectedCallback(), this.removePullListeners();
5879
5867
  }
5880
5868
  setupPullListeners() {
5881
- this.listElement && (this.listElement.addEventListener("touchstart", this.handleTouchStart, { passive: !1 }), this.listElement.addEventListener("touchmove", this.handleTouchMove, { passive: !1 }), this.listElement.addEventListener("touchend", this.handleTouchEnd));
5869
+ this.addEventListener("touchstart", this.handleTouchStart, { passive: !0 }), this.addEventListener("touchmove", this.handleTouchMove, { passive: !1 }), this.addEventListener("touchend", this.handleTouchEnd, { passive: !0 });
5882
5870
  }
5883
5871
  removePullListeners() {
5884
- this.listElement && (this.listElement.removeEventListener("touchstart", this.handleTouchStart), this.listElement.removeEventListener("touchmove", this.handleTouchMove), this.listElement.removeEventListener("touchend", this.handleTouchEnd));
5872
+ this.removeEventListener("touchstart", this.handleTouchStart), this.removeEventListener("touchmove", this.handleTouchMove), this.removeEventListener("touchend", this.handleTouchEnd);
5885
5873
  }
5886
5874
  render() {
5887
5875
  const e = {
@@ -5892,14 +5880,13 @@ class ue extends M {
5892
5880
  "base-list--pulling": this.isPulling
5893
5881
  }, t = {
5894
5882
  "pull-indicator": !0,
5895
- "pull-indicator--active": this.isPulling,
5896
- "pull-indicator--threshold": this.pullDistance >= this.pullThreshold
5897
- }, i = this.isPulling ? `transform: translateY(${this.pullDistance}px)` : "", s = this.isPulling ? `transform: translateY(${Math.max(-100 + this.pullDistance / this.pullThreshold * 100, -100)}%)` : "";
5883
+ "pull-indicator--active": this.isPulling
5884
+ }, i = this.isPulling ? `transform: translateY(${this.pullDistance}px)` : "", s = Math.min(this.pullDistance / this.pullThreshold * 180, 180), o = this.isPulling ? `transform: translateY(${Math.max(-100 + this.pullDistance / this.pullThreshold * 100, -100)}%)` : "", a = `transform: rotate(${s}deg)`;
5898
5885
  return f`
5899
5886
  <div class="base-list-wrapper">
5900
5887
  ${this.pullActionIcon ? f`
5901
- <div class=${S(t)} style=${s}>
5902
- <span class="pull-indicator__icon">${this.pullActionIcon}</span>
5888
+ <div class=${S(t)} style=${o}>
5889
+ <span class="pull-indicator__icon" style=${a}>${this.pullActionIcon}</span>
5903
5890
  </div>
5904
5891
  ` : ""}
5905
5892
  <div class=${S(e)} role=${this.role} style=${i}>
@@ -9475,8 +9462,8 @@ const po = (r, e, t, { allOwnKeys: i } = {}) => (et(e, (s, o) => {
9475
9462
  });
9476
9463
  };
9477
9464
  return Ie(r) ? i(r) : i(String(r).split(e)), t;
9478
- }, Co = () => {
9479
- }, Ao = (r, e) => r != null && Number.isFinite(r = +r) ? r : e;
9465
+ }, Ao = () => {
9466
+ }, Co = (r, e) => r != null && Number.isFinite(r = +r) ? r : e;
9480
9467
  function Eo(r) {
9481
9468
  return !!(r && W(r.append) && r[Nr] === "FormData" && r[bt]);
9482
9469
  }
@@ -9553,8 +9540,8 @@ const To = (r) => {
9553
9540
  freezeMethods: So,
9554
9541
  toObjectSet: _o,
9555
9542
  toCamelCase: $o,
9556
- noop: Co,
9557
- toFiniteNumber: Ao,
9543
+ noop: Ao,
9544
+ toFiniteNumber: Co,
9558
9545
  findKey: Hr,
9559
9546
  global: ye,
9560
9547
  isContextDefined: Fr,
@@ -9665,11 +9652,11 @@ function wt(r, e, t) {
9665
9652
  if (d.endsWith(v, "{}"))
9666
9653
  v = i ? v : v.slice(0, -2), g = JSON.stringify(g);
9667
9654
  else if (d.isArray(g) && Mo(g) || (d.isFileList(g) || d.endsWith(v, "[]")) && (x = d.toArray(g)))
9668
- return v = Wr(v), x.forEach(function(C, T) {
9669
- !(d.isUndefined(C) || C === null) && e.append(
9655
+ return v = Wr(v), x.forEach(function(A, T) {
9656
+ !(d.isUndefined(A) || A === null) && e.append(
9670
9657
  // eslint-disable-next-line no-nested-ternary
9671
9658
  a === !0 ? fr([v], T, o) : a === null ? v : v + "[]",
9672
- h(C)
9659
+ h(A)
9673
9660
  );
9674
9661
  }), !1;
9675
9662
  }
@@ -9978,7 +9965,7 @@ function Qo(r) {
9978
9965
  return e;
9979
9966
  }
9980
9967
  const Go = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
9981
- function Ct(r, e, t, i, s) {
9968
+ function At(r, e, t, i, s) {
9982
9969
  if (d.isFunction(i))
9983
9970
  return i.call(this, e, t);
9984
9971
  if (s && (e = t), !!d.isString(e)) {
@@ -10052,7 +10039,7 @@ class K {
10052
10039
  has(e, t) {
10053
10040
  if (e = qe(e), e) {
10054
10041
  const i = d.findKey(this, e);
10055
- return !!(i && this[i] !== void 0 && (!t || Ct(this, this[i], i, t)));
10042
+ return !!(i && this[i] !== void 0 && (!t || At(this, this[i], i, t)));
10056
10043
  }
10057
10044
  return !1;
10058
10045
  }
@@ -10062,7 +10049,7 @@ class K {
10062
10049
  function o(a) {
10063
10050
  if (a = qe(a), a) {
10064
10051
  const n = d.findKey(i, a);
10065
- n && (!t || Ct(i, i[n], n, t)) && (delete i[n], s = !0);
10052
+ n && (!t || At(i, i[n], n, t)) && (delete i[n], s = !0);
10066
10053
  }
10067
10054
  }
10068
10055
  return d.isArray(e) ? e.forEach(o) : o(e), s;
@@ -10072,7 +10059,7 @@ class K {
10072
10059
  let i = t.length, s = !1;
10073
10060
  for (; i--; ) {
10074
10061
  const o = t[i];
10075
- (!e || Ct(this, this[o], o, e, !0)) && (delete this[o], s = !0);
10062
+ (!e || At(this, this[o], o, e, !0)) && (delete this[o], s = !0);
10076
10063
  }
10077
10064
  return s;
10078
10065
  }
@@ -10139,7 +10126,7 @@ d.reduceDescriptors(K.prototype, ({ value: r }, e) => {
10139
10126
  };
10140
10127
  });
10141
10128
  d.freezeMethods(K);
10142
- function At(r, e) {
10129
+ function Ct(r, e) {
10143
10130
  const t = this || tt, i = e || t, s = K.from(i.headers);
10144
10131
  let o = i.data;
10145
10132
  return d.forEach(r, function(n) {
@@ -10365,13 +10352,13 @@ const rs = (r) => {
10365
10352
  function x() {
10366
10353
  if (!m)
10367
10354
  return;
10368
- const C = K.from(
10355
+ const A = K.from(
10369
10356
  "getAllResponseHeaders" in m && m.getAllResponseHeaders()
10370
10357
  ), N = {
10371
10358
  data: !n || n === "text" || n === "json" ? m.responseText : m.response,
10372
10359
  status: m.status,
10373
10360
  statusText: m.statusText,
10374
- headers: C,
10361
+ headers: A,
10375
10362
  config: r,
10376
10363
  request: m
10377
10364
  };
@@ -10399,8 +10386,8 @@ const rs = (r) => {
10399
10386
  )), m = null;
10400
10387
  }, o === void 0 && a.setContentType(null), "setRequestHeader" in m && d.forEach(a.toJSON(), function(T, N) {
10401
10388
  m.setRequestHeader(N, T);
10402
- }), d.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), n && n !== "json" && (m.responseType = s.responseType), h && ([b, g] = ut(h, !0), m.addEventListener("progress", b)), l && m.upload && ([p, w] = ut(l), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (c = (C) => {
10403
- m && (i(!C || C.type ? new Le(null, r, m) : C), m.abort(), m = null);
10389
+ }), d.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), n && n !== "json" && (m.responseType = s.responseType), h && ([b, g] = ut(h, !0), m.addEventListener("progress", b)), l && m.upload && ([p, w] = ut(l), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (c = (A) => {
10390
+ m && (i(!A || A.type ? new Le(null, r, m) : A), m.abort(), m = null);
10404
10391
  }, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
10405
10392
  const _ = ra(s.url);
10406
10393
  if (_ && H.protocols.indexOf(_) === -1) {
@@ -10553,7 +10540,7 @@ const rs = (r) => {
10553
10540
  method: m,
10554
10541
  data: x,
10555
10542
  signal: _,
10556
- cancelToken: C,
10543
+ cancelToken: A,
10557
10544
  timeout: T,
10558
10545
  onDownloadProgress: N,
10559
10546
  onUploadProgress: fe,
@@ -10563,7 +10550,7 @@ const rs = (r) => {
10563
10550
  fetchOptions: Wt
10564
10551
  } = rs(g), Kt = e || fetch;
10565
10552
  Q = Q ? (Q + "").toLowerCase() : "text";
10566
- let st = ha([_, C && C.toAbortSignal()], T), Be = null;
10553
+ let st = ha([_, A && A.toAbortSignal()], T), Be = null;
10567
10554
  const ge = st && st.unsubscribe && (() => {
10568
10555
  st.unsubscribe();
10569
10556
  });
@@ -10662,7 +10649,7 @@ d.forEach(Yt, (r, e) => {
10662
10649
  Object.defineProperty(r, "adapterName", { value: e });
10663
10650
  }
10664
10651
  });
10665
- const Cr = (r) => `- ${r}`, va = (r) => d.isFunction(r) || r === null || r === !1;
10652
+ const Ar = (r) => `- ${r}`, va = (r) => d.isFunction(r) || r === null || r === !1;
10666
10653
  function ya(r, e) {
10667
10654
  r = d.isArray(r) ? r : [r];
10668
10655
  const { length: t } = r;
@@ -10682,8 +10669,8 @@ function ya(r, e) {
10682
10669
  ([l, h]) => `adapter ${l} ` + (h === !1 ? "is not supported by the environment" : "is not available in the build")
10683
10670
  );
10684
10671
  let n = t ? a.length > 1 ? `since :
10685
- ` + a.map(Cr).join(`
10686
- `) : " " + Cr(a[0]) : "as no adapter specified";
10672
+ ` + a.map(Ar).join(`
10673
+ `) : " " + Ar(a[0]) : "as no adapter specified";
10687
10674
  throw new $(
10688
10675
  "There is no suitable adapter to dispatch the request " + n,
10689
10676
  "ERR_NOT_SUPPORT"
@@ -10707,18 +10694,18 @@ function Et(r) {
10707
10694
  if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
10708
10695
  throw new Le(null, r);
10709
10696
  }
10710
- function Ar(r) {
10711
- return Et(r), r.headers = K.from(r.headers), r.data = At.call(
10697
+ function Cr(r) {
10698
+ return Et(r), r.headers = K.from(r.headers), r.data = Ct.call(
10712
10699
  r,
10713
10700
  r.transformRequest
10714
10701
  ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), is.getAdapter(r.adapter || tt.adapter, r)(r).then(function(i) {
10715
- return Et(r), i.data = At.call(
10702
+ return Et(r), i.data = Ct.call(
10716
10703
  r,
10717
10704
  r.transformResponse,
10718
10705
  i
10719
10706
  ), i.headers = K.from(i.headers), i;
10720
10707
  }, function(i) {
10721
- return Gr(i) || (Et(r), i && i.response && (i.response.data = At.call(
10708
+ return Gr(i) || (Et(r), i && i.response && (i.response.data = Ct.call(
10722
10709
  r,
10723
10710
  r.transformResponse,
10724
10711
  i.response
@@ -10838,7 +10825,7 @@ class we {
10838
10825
  });
10839
10826
  let c, p = 0, b;
10840
10827
  if (!l) {
10841
- const g = [Ar.bind(this), void 0];
10828
+ const g = [Cr.bind(this), void 0];
10842
10829
  for (g.unshift(...n), g.push(...h), b = g.length, c = Promise.resolve(t); p < b; )
10843
10830
  c = c.then(g[p++], g[p++]);
10844
10831
  return c;
@@ -10855,7 +10842,7 @@ class we {
10855
10842
  }
10856
10843
  }
10857
10844
  try {
10858
- c = Ar.call(this, w);
10845
+ c = Cr.call(this, w);
10859
10846
  } catch (g) {
10860
10847
  return Promise.reject(g);
10861
10848
  }
@@ -11080,7 +11067,7 @@ class Tr extends Error {
11080
11067
  super(e), this.name = "AuthRefreshError";
11081
11068
  }
11082
11069
  }
11083
- const Aa = ({ baseUrl: r, useToasts: e = !0 }) => {
11070
+ const Ca = ({ baseUrl: r, useToasts: e = !0 }) => {
11084
11071
  const t = z.create({
11085
11072
  baseURL: r,
11086
11073
  headers: {
@@ -11186,7 +11173,7 @@ function Ea() {
11186
11173
  Vs(), Zs(), Ks(), Xs(), ti(), si(), Ei(), Di(), Pi(), zi(), Ii(), Bi(), Ui(), Hi(), Gs(), Lr(), Vi(), Zi();
11187
11174
  }
11188
11175
  export {
11189
- A as AuthForm,
11176
+ C as AuthForm,
11190
11177
  Tr as AuthRefreshError,
11191
11178
  pe as BaseButton,
11192
11179
  De as BaseCard,
@@ -11205,7 +11192,7 @@ export {
11205
11192
  Re as BaseToast,
11206
11193
  ze as QuantitySelect,
11207
11194
  Me as ThemeToggle,
11208
- Aa as createApiClient,
11195
+ Ca as createApiClient,
11209
11196
  Ea as registerAll,
11210
11197
  Vs as registerAuthForm,
11211
11198
  Zs as registerBaseButton,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cal.macconnachie/web-components",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Web components hosted on a CDN",
5
5
  "keywords": [
6
6
  "web-components",