@getmicdrop/venue-calendar 4.3.102 → 4.3.104
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/{CalendarFoundryView-Cg1ujlFh.js → CalendarFoundryView-ChyqXDQ3.js} +2988 -2892
- package/dist/{CartView-CKipFgsW.js → CartView-CuVvBQnp.js} +1 -1
- package/dist/{Checkout-Dk2RtnG_.js → Checkout-2U6Xpy0Q.js} +2 -2
- package/dist/{Checkout-DEdXCYJd.js → Checkout-DEf1wHzJ.js} +1 -1
- package/dist/{CollectionView-B8UPI4kV.js → CollectionView-DnJ1z8ca.js} +2 -2
- package/dist/{Event-DfLoC6EH.js → Event-CxiPBZ9-.js} +1 -1
- package/dist/{EventPage-CoZo5tQV.js → EventPage-CWkYtMle.js} +2 -2
- package/dist/Input-xj8FOiHB.js +373 -0
- package/dist/{PasswordInput-DKC0I0aj.js → PasswordInput-B_473cLh.js} +4 -1
- package/dist/{PhoneInput-Bocgfs4B.js → PhoneInput-mQkaGqwZ.js} +219 -203
- package/dist/{SeriesPage-Dimz6hR9.js → SeriesPage-Bgvypgpt.js} +1 -1
- package/dist/Textarea-Cymhixzd.js +72 -0
- package/dist/{ViewTicketsEmbed-CrPWLrcK.js → ViewTicketsEmbed-xI99PvQN.js} +1 -1
- package/dist/{RequiredIndicator-CYcnRFsA.js → controlAria-CGb-KeRn.js} +14 -1
- package/dist/venue-calendar.es.js +12 -12
- package/dist/venue-calendar.iife.js +34 -34
- package/dist/venue-calendar.umd.js +54 -54
- package/package.json +2 -2
- package/dist/Input-DpmD_9St.js +0 -313
- package/dist/Textarea-DFTB_Y5u.js +0 -63
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/de.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/es.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/id.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/it.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/de.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/es.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/fr.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/id.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/it.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/ja.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/ko.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/nl.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/pl.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/tr.js +0 -0
- /package/dist/locales/{4.3.102 → 4.3.104}/main/zh.js +0 -0
|
@@ -4,13 +4,13 @@ import { t as s } from "./ExclamationCircleOutline-D3XbhOwM.js";
|
|
|
4
4
|
import { f as c, i as l, n as u, r as d } from "./z-index-CeYVHpUz.js";
|
|
5
5
|
import { t as f } from "./portal-BZBgqs8B.js";
|
|
6
6
|
import { t as p } from "./floatingPosition-Dka8Z2M5.js";
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
7
|
+
import { n as m, t as h } from "./controlAria-CGb-KeRn.js";
|
|
8
|
+
import { a as g, c as _, i as v, l as y, n as b, o as x, r as S, s as C, t as w, u as T } from "./phoneUtils-CS66SHie.js";
|
|
9
9
|
import "svelte/internal/disclose-version";
|
|
10
|
-
import * as
|
|
11
|
-
import { onMount as ee, tick as
|
|
10
|
+
import * as E from "svelte/internal/client";
|
|
11
|
+
import { onMount as ee, tick as D, untrack as O } from "svelte";
|
|
12
12
|
//#region node_modules/@getmicdrop/svelte-components/dist/recipes/inputs/phoneInput/countryData.js
|
|
13
|
-
var
|
|
13
|
+
var k = [
|
|
14
14
|
{
|
|
15
15
|
code: "US",
|
|
16
16
|
name: "United States",
|
|
@@ -1210,126 +1210,126 @@ var O = [
|
|
|
1210
1210
|
flag: "🇿🇼"
|
|
1211
1211
|
}
|
|
1212
1212
|
];
|
|
1213
|
-
function
|
|
1214
|
-
return
|
|
1213
|
+
function A(e) {
|
|
1214
|
+
return k.find((t) => t.code === e);
|
|
1215
1215
|
}
|
|
1216
1216
|
//#endregion
|
|
1217
1217
|
//#region node_modules/@getmicdrop/svelte-components/dist/recipes/inputs/phoneInput/CountrySelector.svelte
|
|
1218
|
-
var
|
|
1219
|
-
function
|
|
1220
|
-
|
|
1218
|
+
var j = E.from_html("<li role=\"option\"><span class=\"type-subheading\"> </span> <span class=\"flex-1\"> </span> <span> </span></li>"), M = E.from_html("<div> </div>"), te = E.from_html("<div class=\"flex flex-col w-72 bg-card border border-stroke-primary rounded-lg shadow-lg overflow-hidden\" role=\"listbox\" tabindex=\"-1\"><div class=\"p-2 border-b border-border\"><input type=\"text\" class=\"w-full px-3 py-2 type-body bg-bg-secondary border border-stroke-primary rounded-lg tone-primary focus:outline-hidden focus:ring-2 focus:ring-focus-ring placeholder-muted-foreground\" data-purpose=\"ui-only\"/></div> <div class=\"flex-1 min-h-0 overflow-y-auto py-1\"></div></div>"), N = E.from_html("<div class=\"relative shrink-0\"><button type=\"button\" aria-haspopup=\"listbox\"><span class=\"type-subheading\"> </span> <span> </span> <!></button> <!></div>");
|
|
1219
|
+
function P(e, t) {
|
|
1220
|
+
E.push(t, !0);
|
|
1221
1221
|
let n = {
|
|
1222
1222
|
searchPlaceholder: "Search...",
|
|
1223
1223
|
noResults: "No countries found",
|
|
1224
1224
|
countrySelector: "Select country"
|
|
1225
|
-
}, s =
|
|
1226
|
-
if (!
|
|
1227
|
-
let e =
|
|
1228
|
-
return
|
|
1225
|
+
}, s = E.prop(t, "country", 31, () => E.proxy(k.find((e) => e.code === "US"))), c = E.prop(t, "disabled", 3, !1), u = E.prop(t, "size", 3, "md"), d = E.prop(t, "labels", 19, () => ({})), m = E.derived(() => a(n, d())), h = E.state(!1), g = E.state(""), _ = E.state(null), v = E.state(null), y = E.state(null), b = E.state(-1), x = Math.random().toString(36).substring(2, 9), S = E.derived(() => {
|
|
1226
|
+
if (!E.get(g)) return k;
|
|
1227
|
+
let e = E.get(g).toLowerCase();
|
|
1228
|
+
return k.filter((t) => t.name.toLowerCase().includes(e) || t.dialCode.includes(e) || t.code.toLowerCase().includes(e));
|
|
1229
1229
|
}), C = {
|
|
1230
1230
|
sm: "h-9 px-2 type-body gap-1",
|
|
1231
1231
|
md: "h-10 px-2.5 type-body gap-1.5",
|
|
1232
1232
|
lg: "h-12 px-3 type-bodyLarge gap-2"
|
|
1233
|
-
}, w =
|
|
1234
|
-
async function
|
|
1235
|
-
c() || (
|
|
1233
|
+
}, w = E.derived(() => C[u()] || C.md);
|
|
1234
|
+
async function T() {
|
|
1235
|
+
c() || (E.set(h, !E.get(h)), E.get(h) && (E.set(g, ""), E.set(b, -1), window.dispatchEvent(new CustomEvent("select-opened", { detail: { instanceId: x } })), await D(), E.get(y)?.focus()));
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1238
|
-
e.detail.instanceId !== x &&
|
|
1237
|
+
function O(e) {
|
|
1238
|
+
e.detail.instanceId !== x && E.get(h) && A();
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1241
|
-
|
|
1240
|
+
function A() {
|
|
1241
|
+
E.set(h, !1), E.set(g, ""), E.set(b, -1);
|
|
1242
1242
|
}
|
|
1243
1243
|
function P(e) {
|
|
1244
|
-
s(e),
|
|
1244
|
+
s(e), A(), E.get(_)?.focus(), t.onselect?.(e);
|
|
1245
1245
|
}
|
|
1246
1246
|
function F(e) {
|
|
1247
1247
|
if (!c()) switch (e.key) {
|
|
1248
1248
|
case "Enter":
|
|
1249
|
-
e.preventDefault(),
|
|
1249
|
+
e.preventDefault(), E.get(h) && E.get(b) >= 0 && E.get(b) < E.get(S).length ? P(E.get(S)[E.get(b)]) : E.get(h) || T();
|
|
1250
1250
|
break;
|
|
1251
1251
|
case "ArrowDown":
|
|
1252
|
-
e.preventDefault(),
|
|
1252
|
+
e.preventDefault(), E.get(h) ? (E.set(b, Math.min(E.get(b) + 1, E.get(S).length - 1), !0), I()) : T();
|
|
1253
1253
|
break;
|
|
1254
1254
|
case "ArrowUp":
|
|
1255
|
-
e.preventDefault(),
|
|
1255
|
+
e.preventDefault(), E.get(h) && (E.set(b, Math.max(E.get(b) - 1, 0), !0), I());
|
|
1256
1256
|
break;
|
|
1257
1257
|
case "Escape":
|
|
1258
|
-
if (!
|
|
1259
|
-
e.preventDefault(),
|
|
1258
|
+
if (!E.get(h)) break;
|
|
1259
|
+
e.preventDefault(), A(), E.get(_)?.focus();
|
|
1260
1260
|
break;
|
|
1261
|
-
case "Tab":
|
|
1261
|
+
case "Tab": A();
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
1264
|
function I() {
|
|
1265
|
-
|
|
1266
|
-
(
|
|
1265
|
+
D().then(() => {
|
|
1266
|
+
(E.get(v)?.querySelector(`[data-index="${E.get(b)}"]`))?.scrollIntoView({ block: "nearest" });
|
|
1267
1267
|
});
|
|
1268
1268
|
}
|
|
1269
1269
|
function L(e) {
|
|
1270
|
-
if (!
|
|
1271
|
-
let t = e.target, n =
|
|
1272
|
-
n && r &&
|
|
1270
|
+
if (!E.get(h)) return;
|
|
1271
|
+
let t = e.target, n = E.get(_) && !E.get(_).contains(t), r = !E.get(v) || !E.get(v).contains(t);
|
|
1272
|
+
n && r && A();
|
|
1273
1273
|
}
|
|
1274
|
-
ee(() => (document.addEventListener("click", L, !0), window.addEventListener("select-opened",
|
|
1275
|
-
document.removeEventListener("click", L, !0), window.removeEventListener("select-opened",
|
|
1274
|
+
ee(() => (document.addEventListener("click", L, !0), window.addEventListener("select-opened", O), () => {
|
|
1275
|
+
document.removeEventListener("click", L, !0), window.removeEventListener("select-opened", O);
|
|
1276
1276
|
}));
|
|
1277
|
-
var R =
|
|
1278
|
-
|
|
1279
|
-
var
|
|
1280
|
-
|
|
1281
|
-
var
|
|
1282
|
-
{
|
|
1283
|
-
let e =
|
|
1284
|
-
o(
|
|
1285
|
-
return `w-3 h-3 shrink-0 ${
|
|
1277
|
+
var R = N(), z = E.child(R), B = E.child(z), V = E.child(B, !0);
|
|
1278
|
+
E.reset(B);
|
|
1279
|
+
var H = E.sibling(B, 2), U = E.child(H, !0);
|
|
1280
|
+
E.reset(H);
|
|
1281
|
+
var ne = E.sibling(H, 2);
|
|
1282
|
+
{
|
|
1283
|
+
let e = E.derived(() => r.iconMuted), t = E.derived(() => E.get(h) ? "rotate-180" : "");
|
|
1284
|
+
o(ne, { get class() {
|
|
1285
|
+
return `w-3 h-3 shrink-0 ${E.get(e) ?? ""} transition-transform duration-fast ${E.get(t) ?? ""}`;
|
|
1286
1286
|
} });
|
|
1287
1287
|
}
|
|
1288
|
-
|
|
1289
|
-
var
|
|
1290
|
-
var t = te(), n =
|
|
1291
|
-
|
|
1292
|
-
var o =
|
|
1293
|
-
|
|
1294
|
-
var a =
|
|
1295
|
-
|
|
1296
|
-
var l =
|
|
1297
|
-
|
|
1298
|
-
var d =
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
}),
|
|
1288
|
+
E.reset(z), E.bind_this(z, (e) => E.set(_, e), () => E.get(_));
|
|
1289
|
+
var re = E.sibling(z, 2), ie = (e) => {
|
|
1290
|
+
var t = te(), n = E.child(t), a = E.child(n);
|
|
1291
|
+
E.remove_input_defaults(a), E.bind_this(a, (e) => E.set(y, e), () => E.get(y)), E.reset(n);
|
|
1292
|
+
var o = E.sibling(n, 2);
|
|
1293
|
+
E.each(o, 23, () => E.get(S), (e) => e.code, (e, t, n) => {
|
|
1294
|
+
var a = j(), o = E.child(a), c = E.child(o, !0);
|
|
1295
|
+
E.reset(o);
|
|
1296
|
+
var l = E.sibling(o, 2), u = E.child(l, !0);
|
|
1297
|
+
E.reset(l);
|
|
1298
|
+
var d = E.sibling(l, 2), f = E.child(d, !0);
|
|
1299
|
+
E.reset(d), E.reset(a), E.template_effect(() => {
|
|
1300
|
+
E.set_class(a, 1, `flex items-center gap-3 px-3 py-2 cursor-pointer ${r.sm} tone-primary transition-colors ${E.get(t).code === s().code ? `bg-menu-selected ${i.emphasis}` : E.get(n) === E.get(b) ? "bg-muted" : "hover:bg-muted"}`), E.set_attribute(a, "aria-selected", E.get(t).code === s().code), E.set_attribute(a, "data-index", E.get(n)), E.set_text(c, E.get(t).flag), E.set_text(u, E.get(t).name), E.set_class(d, 1, E.clsx(r.textMuted)), E.set_text(f, E.get(t).dialCode);
|
|
1301
|
+
}), E.delegated("click", a, () => P(E.get(t))), E.event("mouseenter", a, () => E.set(b, E.get(n), !0)), E.append(e, a);
|
|
1302
1302
|
}, (e) => {
|
|
1303
|
-
var t =
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
}),
|
|
1307
|
-
}),
|
|
1308
|
-
reference:
|
|
1303
|
+
var t = M(), n = E.child(t, !0);
|
|
1304
|
+
E.reset(t), E.template_effect(() => {
|
|
1305
|
+
E.set_class(t, 1, `px-3 py-4 text-center ${r.textMuted}`), E.set_text(n, E.get(m).noResults);
|
|
1306
|
+
}), E.append(e, t);
|
|
1307
|
+
}), E.reset(o), E.reset(t), E.bind_this(t, (e) => E.set(v, e), () => E.get(v)), E.action(t, (e, t) => p?.(e, t), () => ({
|
|
1308
|
+
reference: E.get(_),
|
|
1309
1309
|
maxHeight: 320,
|
|
1310
1310
|
layer: "modalContent"
|
|
1311
|
-
})),
|
|
1312
|
-
|
|
1313
|
-
}),
|
|
1311
|
+
})), E.action(t, (e) => f?.(e)), E.template_effect(() => {
|
|
1312
|
+
E.set_attribute(t, "aria-label", E.get(m).countrySelector), E.set_attribute(a, "placeholder", E.get(m).searchPlaceholder), E.set_attribute(a, "aria-label", E.get(m).searchPlaceholder);
|
|
1313
|
+
}), E.delegated("keydown", a, F), E.bind_value(a, () => E.get(g), (e) => E.set(g, e)), E.transition(3, t, () => l, () => ({ origin: "top left" })), E.append(e, t);
|
|
1314
1314
|
};
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
}),
|
|
1318
|
-
|
|
1319
|
-
}),
|
|
1315
|
+
E.if(re, (e) => {
|
|
1316
|
+
E.get(h) && e(ie);
|
|
1317
|
+
}), E.reset(R), E.template_effect(() => {
|
|
1318
|
+
E.set_class(z, 1, `flex items-center ${E.get(w) ?? ""} bg-bg-secondary border border-r-0 rounded-l-lg cursor-pointer transition-colors text-left focus:outline-hidden border-stroke-primary hover:border-interactive-border ${c() ? "opacity-50 cursor-not-allowed" : ""}`), z.disabled = c(), E.set_attribute(z, "aria-expanded", E.get(h)), E.set_attribute(z, "aria-label", E.get(m).countrySelector), E.set_text(V, s().flag), E.set_class(H, 1, `${r.sm} whitespace-nowrap`), E.set_text(U, s().dialCode);
|
|
1319
|
+
}), E.delegated("click", z, T), E.delegated("keydown", z, F), E.append(e, R), E.pop();
|
|
1320
1320
|
}
|
|
1321
|
-
|
|
1321
|
+
E.delegate(["click", "keydown"]);
|
|
1322
1322
|
//#endregion
|
|
1323
1323
|
//#region node_modules/libphonenumber-js/es6/validatePhoneNumberLength.js
|
|
1324
|
-
function
|
|
1324
|
+
function F(e) {
|
|
1325
1325
|
"@babel/helpers - typeof";
|
|
1326
|
-
return
|
|
1326
|
+
return F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1327
1327
|
return typeof e;
|
|
1328
1328
|
} : function(e) {
|
|
1329
1329
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1330
|
-
},
|
|
1330
|
+
}, F(e);
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1332
|
+
function I(e, t) {
|
|
1333
1333
|
var n = Object.keys(e);
|
|
1334
1334
|
if (Object.getOwnPropertySymbols) {
|
|
1335
1335
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1339,230 +1339,246 @@ function F(e, t) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
return n;
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function L(e) {
|
|
1343
1343
|
for (var t = 1; t < arguments.length; t++) {
|
|
1344
1344
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
1345
|
-
t % 2 ?
|
|
1346
|
-
|
|
1347
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1345
|
+
t % 2 ? I(Object(n), !0).forEach(function(t) {
|
|
1346
|
+
R(e, t, n[t]);
|
|
1347
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : I(Object(n)).forEach(function(t) {
|
|
1348
1348
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1349
1349
|
});
|
|
1350
1350
|
}
|
|
1351
1351
|
return e;
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1354
|
-
return (t =
|
|
1353
|
+
function R(e, t, n) {
|
|
1354
|
+
return (t = z(t)) in e ? Object.defineProperty(e, t, {
|
|
1355
1355
|
value: n,
|
|
1356
1356
|
enumerable: !0,
|
|
1357
1357
|
configurable: !0,
|
|
1358
1358
|
writable: !0
|
|
1359
1359
|
}) : e[t] = n, e;
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1362
|
-
var t =
|
|
1363
|
-
return
|
|
1361
|
+
function z(e) {
|
|
1362
|
+
var t = B(e, "string");
|
|
1363
|
+
return F(t) == "symbol" ? t : t + "";
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1366
|
-
if (
|
|
1365
|
+
function B(e, t) {
|
|
1366
|
+
if (F(e) != "object" || !e) return e;
|
|
1367
1367
|
var n = e[Symbol.toPrimitive];
|
|
1368
1368
|
if (n !== void 0) {
|
|
1369
1369
|
var r = n.call(e, t || "default");
|
|
1370
|
-
if (
|
|
1370
|
+
if (F(r) != "object") return r;
|
|
1371
1371
|
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
1372
1372
|
}
|
|
1373
1373
|
return (t === "string" ? String : Number)(e);
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1376
|
-
var e =
|
|
1377
|
-
n =
|
|
1375
|
+
function V() {
|
|
1376
|
+
var e = g(arguments), t = e.text, n = e.options, r = e.metadata;
|
|
1377
|
+
n = L(L({}, n), {}, { extract: !1 });
|
|
1378
1378
|
try {
|
|
1379
|
-
var i =
|
|
1379
|
+
var i = x(t, n, r), a = new y(r);
|
|
1380
1380
|
a.selectNumberingPlan(i.country || i.countryCallingCode);
|
|
1381
|
-
var o =
|
|
1381
|
+
var o = _(i.nationalNumber, void 0, a);
|
|
1382
1382
|
if (o !== "IS_POSSIBLE") return o;
|
|
1383
1383
|
} catch (e) {
|
|
1384
1384
|
/* istanbul ignore else */
|
|
1385
|
-
if (e instanceof
|
|
1385
|
+
if (e instanceof C) return e.message;
|
|
1386
1386
|
throw e;
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
//#endregion
|
|
1390
1390
|
//#region node_modules/libphonenumber-js/min/exports/validatePhoneNumberLength.js
|
|
1391
|
-
function
|
|
1392
|
-
return
|
|
1391
|
+
function H() {
|
|
1392
|
+
return T(V, arguments);
|
|
1393
1393
|
}
|
|
1394
1394
|
//#endregion
|
|
1395
1395
|
//#region node_modules/@getmicdrop/svelte-components/dist/recipes/inputs/PhoneInput.svelte
|
|
1396
|
-
var
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1396
|
+
var U = E.from_html("<span> </span>"), ne = E.from_html("<div class=\"flex justify-start items-center gap-1\"><label> <!></label> <!> <!></div>"), re = E.from_html("<button type=\"button\"><span class=\"type-label\"> </span></button>"), ie = E.from_html("<div class=\"flex items-start gap-1.5 mt-2\" role=\"alert\" aria-live=\"assertive\"><!> <p> </p></div>"), ae = E.from_html("<div><span> </span></div>"), oe = E.from_html("<div class=\"flex flex-col gap-2\"><!> <div class=\"relative w-full\"><div class=\"flex items-stretch w-full\"><!> <div class=\"relative flex-1 flex items-center\"><input/> <!></div></div> <!></div></div>");
|
|
1397
|
+
function W(o, l) {
|
|
1398
|
+
E.push(l, !0);
|
|
1399
1399
|
let f = {
|
|
1400
1400
|
searchPlaceholder: "Search...",
|
|
1401
1401
|
noResults: "No countries found",
|
|
1402
1402
|
countrySelector: "Select country",
|
|
1403
1403
|
optional: "(optional)"
|
|
1404
|
-
}, p =
|
|
1405
|
-
|
|
1406
|
-
let
|
|
1407
|
-
|
|
1404
|
+
}, p = E.prop(l, "value", 15, ""), g = E.prop(l, "label", 3, ""), _ = E.prop(l, "id", 3, ""), y = E.prop(l, "name", 3, ""), x = E.prop(l, "placeholder", 3, ""), C = E.prop(l, "required", 3, !1), T = E.prop(l, "disabled", 3, !1), ee = E.prop(l, "optional", 3, !1), D = E.prop(l, "size", 3, "md"), j = E.prop(l, "errorText", 3, ""), M = E.prop(l, "helperText", 3, ""), te = E.prop(l, "color", 3, "base"), N = E.prop(l, "controlled", 3, !1), F = E.prop(l, "buttonText", 3, null), I = E.prop(l, "buttonDisabled", 3, !1), L = E.prop(l, "onButtonClick", 3, null), R = E.prop(l, "onbuttonclick", 3, null), z = E.prop(l, "defaultCountry", 3, "US"), B = E.prop(l, "labels", 19, () => ({})), V = E.prop(l, "animateFocus", 3, !0), W = E.prop(l, "statusText", 3, ""), se = E.prop(l, "statusType", 3, ""), ce = E.prop(l, "autocomplete", 3, "tel"), G = E.prop(l, "skipPasswordManagers", 3, !1);
|
|
1405
|
+
L() && !R() && n("PhoneInput: prop \"onButtonClick\" is deprecated. Use \"onbuttonclick\" instead.");
|
|
1406
|
+
let le = E.derived(() => R() ?? L()), K = E.derived(() => a(f, B())), ue = E.derived(() => G() ? "off" : ce()), q = E.state(E.proxy(A(z()) || k.find((e) => e.code === "US"))), J = E.state(""), Y = E.state(""), X = E.state(null), Z = E.state(!1), de = E.derived(() => te() === "red" || !!j()), fe = E.derived(() => e[D()] || e.md), pe = E.derived(() => V() && !T());
|
|
1407
|
+
E.user_effect(() => {
|
|
1408
1408
|
let e = p();
|
|
1409
|
-
(!
|
|
1409
|
+
(!E.get(Z) || e !== Q) && (me(e), E.set(Z, !0));
|
|
1410
1410
|
});
|
|
1411
|
-
let
|
|
1412
|
-
function
|
|
1411
|
+
let Q = "";
|
|
1412
|
+
function me(e) {
|
|
1413
1413
|
if (!e) {
|
|
1414
|
-
|
|
1414
|
+
E.set(J, ""), E.set(Y, "");
|
|
1415
1415
|
return;
|
|
1416
1416
|
}
|
|
1417
|
-
let t =
|
|
1417
|
+
let t = S(e);
|
|
1418
1418
|
if (t) {
|
|
1419
|
-
let e =
|
|
1420
|
-
e &&
|
|
1421
|
-
} else
|
|
1419
|
+
let e = A(t.countryCode);
|
|
1420
|
+
e && E.set(q, e, !0), E.set(J, t.nationalNumber, !0), E.set(Y, w(t.countryCode, t.nationalNumber), !0);
|
|
1421
|
+
} else E.set(J, e.replace(/\D/g, ""), !0), E.set(Y, E.get(J), !0);
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1424
|
-
let t = e.target, n = e.inputType ?? "", r =
|
|
1425
|
-
i && i === r && (n === "deleteContentBackward" && a > 0 ? (i = i.slice(0, a - 1) + i.slice(a), --a) : n === "deleteContentForward" && a < i.length && (i = i.slice(0, a) + i.slice(a + 1))), n === "insertText" && i.length === r.length + 1 &&
|
|
1426
|
-
let o =
|
|
1427
|
-
|
|
1428
|
-
let s =
|
|
1429
|
-
if (i === r && s ===
|
|
1430
|
-
|
|
1431
|
-
let c = s ?
|
|
1423
|
+
function he(e) {
|
|
1424
|
+
let t = e.target, n = e.inputType ?? "", r = E.get(J), i = t.value.replaceAll(/\D/g, ""), a = t.value.slice(0, t.selectionStart ?? t.value.length).replaceAll(/\D/g, "").length;
|
|
1425
|
+
i && i === r && (n === "deleteContentBackward" && a > 0 ? (i = i.slice(0, a - 1) + i.slice(a), --a) : n === "deleteContentForward" && a < i.length && (i = i.slice(0, a) + i.slice(a + 1))), n === "insertText" && i.length === r.length + 1 && H(i, E.get(q).code) === "TOO_LONG" && (i = r, a = Math.max(a - 1, 0)), E.set(J, i, !0);
|
|
1426
|
+
let o = w(E.get(q).code, i);
|
|
1427
|
+
E.set(Y, o, !0), t.value = o, t.matches(":focus") && ge(t, o, a);
|
|
1428
|
+
let s = v(E.get(q).code, i);
|
|
1429
|
+
if (i === r && s === Q) return;
|
|
1430
|
+
Q = s, p(s);
|
|
1431
|
+
let c = s ? b(s) : !1;
|
|
1432
1432
|
l.onchange?.({
|
|
1433
1433
|
value: s,
|
|
1434
|
-
country:
|
|
1434
|
+
country: E.get(q).code,
|
|
1435
1435
|
isValid: c
|
|
1436
1436
|
});
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1438
|
+
function ge(e, t, n) {
|
|
1439
1439
|
let r = 0, i = 0;
|
|
1440
1440
|
for (; i < n && r < t.length;) /\d/.test(t[r]) && i++, r++;
|
|
1441
1441
|
e.setSelectionRange(r, r);
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1444
|
-
|
|
1445
|
-
let e =
|
|
1446
|
-
|
|
1447
|
-
let t = e ?
|
|
1443
|
+
function _e() {
|
|
1444
|
+
E.set(Y, w(E.get(q).code, E.get(J)), !0);
|
|
1445
|
+
let e = v(E.get(q).code, E.get(J));
|
|
1446
|
+
Q = e, p(e);
|
|
1447
|
+
let t = e ? b(e) : !1;
|
|
1448
1448
|
l.onchange?.({
|
|
1449
1449
|
value: e,
|
|
1450
|
-
country:
|
|
1450
|
+
country: E.get(q).code,
|
|
1451
1451
|
isValid: t
|
|
1452
1452
|
});
|
|
1453
1453
|
}
|
|
1454
|
-
let
|
|
1455
|
-
|
|
1456
|
-
let e =
|
|
1457
|
-
|
|
1458
|
-
if (!
|
|
1459
|
-
|
|
1454
|
+
let ve;
|
|
1455
|
+
E.user_effect(() => {
|
|
1456
|
+
let e = E.get(q).code, t = E.get(J);
|
|
1457
|
+
O(() => {
|
|
1458
|
+
if (!E.get(Z) || !t) {
|
|
1459
|
+
ve = e;
|
|
1460
1460
|
return;
|
|
1461
1461
|
}
|
|
1462
|
-
let n = e !==
|
|
1463
|
-
|
|
1462
|
+
let n = e !== ve;
|
|
1463
|
+
ve = e, n || v(e, t) !== Q ? _e() : E.set(Y, w(e, t), !0);
|
|
1464
1464
|
});
|
|
1465
1465
|
});
|
|
1466
1466
|
function ye() {
|
|
1467
|
-
typeof
|
|
1467
|
+
typeof E.get(le) == "function" && E.get(le)(p());
|
|
1468
1468
|
}
|
|
1469
1469
|
function be() {
|
|
1470
|
-
|
|
1470
|
+
E.get(X)?.focus();
|
|
1471
1471
|
}
|
|
1472
1472
|
function xe() {
|
|
1473
|
-
|
|
1473
|
+
E.set(J, ""), E.set(Y, ""), p(""), Q = "";
|
|
1474
1474
|
}
|
|
1475
1475
|
var Se = {
|
|
1476
1476
|
focus: be,
|
|
1477
1477
|
clear: xe
|
|
1478
|
-
},
|
|
1479
|
-
var n =
|
|
1478
|
+
}, Ce = oe(), we = E.child(Ce), Te = (e) => {
|
|
1479
|
+
var n = ne(), i = E.child(n), a = E.child(i, !0), o = E.sibling(a);
|
|
1480
1480
|
m(o, { get required() {
|
|
1481
|
-
return
|
|
1482
|
-
} }),
|
|
1483
|
-
var s =
|
|
1484
|
-
var t =
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
}),
|
|
1481
|
+
return C();
|
|
1482
|
+
} }), E.reset(i);
|
|
1483
|
+
var s = E.sibling(i, 2), c = (e) => {
|
|
1484
|
+
var t = U(), n = E.child(t);
|
|
1485
|
+
E.reset(t), E.template_effect(() => {
|
|
1486
|
+
E.set_class(t, 1, `type-label ${se() === "success" ? "text-accent-success" : se() === "error" ? "text-accent-danger" : ""}`), E.set_text(n, `(${W() ?? ""})`);
|
|
1487
|
+
}), E.append(e, t);
|
|
1488
1488
|
};
|
|
1489
|
-
|
|
1490
|
-
|
|
1489
|
+
E.if(s, (e) => {
|
|
1490
|
+
W() && e(c);
|
|
1491
1491
|
});
|
|
1492
|
-
var l =
|
|
1493
|
-
var t =
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
}),
|
|
1492
|
+
var l = E.sibling(s, 2), u = (e) => {
|
|
1493
|
+
var t = U(), n = E.child(t, !0);
|
|
1494
|
+
E.reset(t), E.template_effect(() => {
|
|
1495
|
+
E.set_class(t, 1, E.clsx(r.smMuted)), E.set_text(n, E.get(K).optional);
|
|
1496
|
+
}), E.append(e, t);
|
|
1497
1497
|
};
|
|
1498
|
-
|
|
1498
|
+
E.if(l, (e) => {
|
|
1499
1499
|
ee() && e(u);
|
|
1500
|
-
}),
|
|
1501
|
-
|
|
1502
|
-
}),
|
|
1500
|
+
}), E.reset(n), E.template_effect(() => {
|
|
1501
|
+
E.set_attribute(i, "for", _()), E.set_class(i, 1, `${r.label} ${t.tight} sm:${t.none}`), E.set_text(a, g());
|
|
1502
|
+
}), E.append(e, n);
|
|
1503
1503
|
};
|
|
1504
|
-
|
|
1505
|
-
|
|
1504
|
+
E.if(we, (e) => {
|
|
1505
|
+
g() && e(Te);
|
|
1506
1506
|
});
|
|
1507
|
-
var
|
|
1507
|
+
var Ee = E.sibling(we, 2), De = E.child(Ee), Oe = E.child(De);
|
|
1508
1508
|
{
|
|
1509
|
-
let e =
|
|
1510
|
-
searchPlaceholder:
|
|
1511
|
-
noResults:
|
|
1512
|
-
countrySelector:
|
|
1509
|
+
let e = E.derived(() => ({
|
|
1510
|
+
searchPlaceholder: E.get(K).searchPlaceholder,
|
|
1511
|
+
noResults: E.get(K).noResults,
|
|
1512
|
+
countrySelector: E.get(K).countrySelector
|
|
1513
1513
|
}));
|
|
1514
|
-
|
|
1515
|
-
onselect: () =>
|
|
1514
|
+
P(Oe, {
|
|
1515
|
+
onselect: () => E.get(X)?.focus(),
|
|
1516
1516
|
get disabled() {
|
|
1517
|
-
return
|
|
1517
|
+
return T();
|
|
1518
1518
|
},
|
|
1519
1519
|
get size() {
|
|
1520
|
-
return
|
|
1520
|
+
return D();
|
|
1521
1521
|
},
|
|
1522
1522
|
get labels() {
|
|
1523
|
-
return
|
|
1523
|
+
return E.get(e);
|
|
1524
1524
|
},
|
|
1525
1525
|
get country() {
|
|
1526
|
-
return
|
|
1526
|
+
return E.get(q);
|
|
1527
1527
|
},
|
|
1528
1528
|
set country(e) {
|
|
1529
|
-
|
|
1529
|
+
E.set(q, e, !0);
|
|
1530
1530
|
}
|
|
1531
1531
|
});
|
|
1532
1532
|
}
|
|
1533
|
-
var
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1533
|
+
var ke = E.sibling(Oe, 2), $ = E.child(ke);
|
|
1534
|
+
E.attribute_effect($, (e) => ({
|
|
1535
|
+
id: _(),
|
|
1536
|
+
type: "tel",
|
|
1537
|
+
name: y(),
|
|
1538
|
+
placeholder: x(),
|
|
1539
|
+
value: E.get(Y),
|
|
1540
|
+
oninput: he,
|
|
1541
|
+
inputmode: "tel",
|
|
1542
|
+
autocomplete: E.get(ue),
|
|
1543
|
+
"data-1p-ignore": G() ? "" : void 0,
|
|
1544
|
+
"data-lpignore": G() ? "true" : void 0,
|
|
1545
|
+
"data-bwignore": G() ? "true" : void 0,
|
|
1546
|
+
"data-form-type": G() ? "other" : void 0,
|
|
1547
|
+
class: `${r.body ?? ""} w-full ${E.get(fe) ?? ""} bg-bg-secondary border border-l-0 rounded-r-lg ${i.emphasis ?? ""} placeholder-muted-foreground transition-all focus:outline-hidden focus:ring-4 focus:ring-focus-ring ${E.get(de) ? "border-status-error-border" : "border-stroke-primary hover:border-interactive-border focus:border-interactive-border"} ${N() && F() ? "pr-20" : ""} ${E.get(pe) ? "focus:scale-grow" : ""} ${T() ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
1548
|
+
required: !1,
|
|
1549
|
+
disabled: T(),
|
|
1550
|
+
...e,
|
|
1551
|
+
"data-testid": l["data-testid"]
|
|
1552
|
+
}), [() => h({ required: C() }, l.wiring)], void 0, void 0, void 0, !0), E.bind_this($, (e) => E.set(X, e), () => E.get(X));
|
|
1553
|
+
var Ae = E.sibling($, 2), je = (e) => {
|
|
1554
|
+
var t = re(), n = E.child(t), r = E.child(n, !0);
|
|
1555
|
+
E.reset(n), E.reset(t), E.template_effect(() => {
|
|
1556
|
+
t.disabled = I(), E.set_attribute(t, "data-testid", l.buttonTestId), E.set_class(t, 1, `absolute inset-y-0 right-0 gap-1 flex items-center justify-center px-4 text-brand-primary hover:text-brand-primary disabled:opacity-50 disabled:cursor-not-allowed ${M() || j() ? "mb-7" : ""}`), E.set_text(r, F());
|
|
1557
|
+
}), E.delegated("click", t, ye), E.append(e, t);
|
|
1540
1558
|
};
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
}),
|
|
1544
|
-
var
|
|
1545
|
-
var t =
|
|
1559
|
+
E.if(Ae, (e) => {
|
|
1560
|
+
N() && F() && e(je);
|
|
1561
|
+
}), E.reset(ke), E.reset(De);
|
|
1562
|
+
var Me = E.sibling(De, 2), Ne = (e) => {
|
|
1563
|
+
var t = ie(), n = E.child(t);
|
|
1546
1564
|
s(n, { class: "w-4 h-4 shrink-0 text-accent-danger mt-0.5" });
|
|
1547
|
-
var i =
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
}),
|
|
1565
|
+
var i = E.sibling(n, 2), a = E.child(i, !0);
|
|
1566
|
+
E.reset(i), E.reset(t), E.template_effect(() => {
|
|
1567
|
+
E.set_class(i, 1, E.clsx(r.error)), E.set_text(a, j());
|
|
1568
|
+
}), E.transition(3, t, () => c, () => ({
|
|
1551
1569
|
duration: u.normal,
|
|
1552
1570
|
easing: d.out
|
|
1553
|
-
})),
|
|
1554
|
-
},
|
|
1555
|
-
var t =
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
}),
|
|
1571
|
+
})), E.append(e, t);
|
|
1572
|
+
}, Pe = (e) => {
|
|
1573
|
+
var t = ae(), n = E.child(t), i = E.child(n, !0);
|
|
1574
|
+
E.reset(n), E.reset(t), E.template_effect(() => {
|
|
1575
|
+
E.set_class(t, 1, `mt-2 flex items-center ${r.xsMuted} opacity-65`), E.set_text(i, M());
|
|
1576
|
+
}), E.append(e, t);
|
|
1559
1577
|
};
|
|
1560
|
-
return
|
|
1561
|
-
|
|
1562
|
-
}),
|
|
1563
|
-
T.set_attribute($, "id", g()), T.set_attribute($, "name", v()), T.set_attribute($, "placeholder", b()), T.set_value($, T.get(q)), T.set_attribute($, "autocomplete", T.get(de)), T.set_attribute($, "data-1p-ignore", U() ? "" : void 0), T.set_attribute($, "data-lpignore", U() ? "true" : void 0), T.set_attribute($, "data-bwignore", U() ? "true" : void 0), T.set_attribute($, "data-form-type", U() ? "other" : void 0), T.set_class($, 1, `${r.body ?? ""} w-full ${T.get(pe) ?? ""} bg-bg-secondary border border-l-0 rounded-r-lg ${i.emphasis ?? ""} placeholder-muted-foreground transition-all focus:outline-hidden focus:ring-4 focus:ring-focus-ring ${T.get(fe) ? "border-status-error-border" : "border-stroke-primary hover:border-interactive-border focus:border-interactive-border"} ${M() && P() ? "pr-20" : ""} ${T.get(me) ? "focus:scale-grow" : ""} ${w() ? "opacity-50 cursor-not-allowed" : ""}`), $.disabled = w(), T.set_attribute($, "aria-required", S()), T.set_attribute($, "data-testid", l["data-testid"]);
|
|
1564
|
-
}), T.delegated("input", $, ge), T.append(o, Q), T.pop(Se);
|
|
1578
|
+
return E.if(Me, (e) => {
|
|
1579
|
+
j() ? e(Ne) : M() && e(Pe, 1);
|
|
1580
|
+
}), E.reset(Ee), E.reset(Ce), E.append(o, Ce), E.pop(Se);
|
|
1565
1581
|
}
|
|
1566
|
-
|
|
1582
|
+
E.delegate(["click"]);
|
|
1567
1583
|
//#endregion
|
|
1568
|
-
export {
|
|
1584
|
+
export { W as default };
|