@getmicdrop/venue-calendar 4.3.53 → 4.3.54

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.
Files changed (100) hide show
  1. package/dist/{ArrowLeftIcon-BLnCtSTd.js → ArrowLeftIcon-DjqiKzR8.js} +1 -1
  2. package/dist/{Badge-LGtxYPTv.js → Badge-BsWJrQII.js} +9 -9
  3. package/dist/{BlockPlaceholder-BhPJo2P8.js → BlockPlaceholder-CgZr2Euq.js} +2 -2
  4. package/dist/{Button-D8b2gDS8.js → Button-AZ8OLQqj.js} +16 -15
  5. package/dist/{Button-DZ_ZJIeL.js → Button-B8GiiO44.js} +589 -803
  6. package/dist/Calendar-CS_RqyU_.js +486 -0
  7. package/dist/{CalendarFoundryView-CEEJ8nkK.js → CalendarFoundryView-D6cytJxm.js} +5787 -7311
  8. package/dist/{CalendarIcon-CLbs06CG.js → CalendarIcon-D9Z9YFz6.js} +1 -1
  9. package/dist/{CartView-BN-EnU8O.js → CartView-DTXoQTOC.js} +262 -261
  10. package/dist/{ChartBlock-CQuNi0uN.js → ChartBlock-CaxNJtrg.js} +3 -3
  11. package/dist/{Checkout-dBGyhMQD.js → Checkout-B8ZkBxF_.js} +24 -24
  12. package/dist/{Checkout-BLfHdJ4t.js → Checkout-QIxYrkeK.js} +26 -26
  13. package/dist/{CheckoutTimer-DnHjYAv-.js → CheckoutTimer-CyN-mQCP.js} +3 -3
  14. package/dist/{ChevronDownIcon-BIGPSika.js → ChevronDownIcon-D9I-5bmz.js} +1 -1
  15. package/dist/ChevronDownOutline-D7YDiKBF.js +13 -0
  16. package/dist/{ClockIcon-D5mFK2c-.js → ClockIcon-C7nkbmvv.js} +1 -1
  17. package/dist/{CloseIcon-Bf4yqVV0.js → CloseIcon-DPdjPdoi.js} +1 -1
  18. package/dist/{CollectionView-H_aMs6Zm.js → CollectionView-CkKwCXQj.js} +11 -11
  19. package/dist/{CropImage-BFJ61OWR.js → CropImage-9r61-nLv.js} +47 -46
  20. package/dist/{EmptyState-Dak003WV.js → EmptyState-DxahojFY.js} +6 -6
  21. package/dist/{Event-BYW026V7.js → Event-BfWRG4dm.js} +499 -497
  22. package/dist/EventPage-dCTHvk7P.js +1201 -0
  23. package/dist/ExclamationCircleOutline-D3XbhOwM.js +13 -0
  24. package/dist/{Heading-BFFV1cuP.js → Heading-CZMbiuFu.js} +4 -4
  25. package/dist/Input-CDw-j5fQ.js +292 -0
  26. package/dist/{MailIcon-BO5Ou19Y.js → MailIcon-C__hyCKr.js} +1 -1
  27. package/dist/{Modal-JNeuI7zx.js → Modal-D6NKikBr.js} +2 -2
  28. package/dist/ModalFooter-ngqovl_z.js +377 -0
  29. package/dist/{ModalHeader-BNxKfIP7.js → ModalHeader-CI7Ev4MQ.js} +2 -2
  30. package/dist/{PasswordInput-DaJbFgg5.js → PasswordInput-D3Pwparw.js} +2 -2
  31. package/dist/PhoneInput-oGG1WJii.js +1568 -0
  32. package/dist/{RecommendationsRail-DBadchEC.js → RecommendationsRail-DPxl9JCm.js} +9 -9
  33. package/dist/{ScarcityBadge-Bi5eRig2.js → ScarcityBadge-BXn6HM_K.js} +24 -24
  34. package/dist/{SeriesPage-DnArOhpy.js → SeriesPage-B7z1yoAK.js} +7 -7
  35. package/dist/{Spinner-UI821bAt.js → Spinner-6UtYyNcF.js} +3 -3
  36. package/dist/{Success-BKfN0O0W.js → Success-BzuOliUV.js} +19 -19
  37. package/dist/{TagIcon-BWLYSGkG.js → TagIcon-DwWcRiXS.js} +1 -1
  38. package/dist/{Textarea-CdxxGwCO.js → Textarea-CyfWw1Zf.js} +1 -1
  39. package/dist/{ViewTicketsEmbed-saRT7Ac-.js → ViewTicketsEmbed-BE8iTUF9.js} +28 -28
  40. package/dist/{WarningCircleIcon-CyE_Th8p.js → WarningCircleIcon-C2fJjhKf.js} +18 -28
  41. package/dist/{WarningTriIcon-D1jwyRhA.js → WarningTriIcon-OqM9Rfwq.js} +1 -1
  42. package/dist/{action-test-id-DYsZDRVM.js → action-test-id-DJZiaKrZ.js} +3 -3
  43. package/dist/{api-CAGahqGT.js → api-BsBSvoNj.js} +5 -5
  44. package/dist/{copyToClipboard-NTWYm45i.js → copyToClipboard-CL9BmJA4.js} +1 -1
  45. package/dist/createErrorGate.svelte-DwTTmYou.js +83 -0
  46. package/dist/{defaultLabels-CAOGfi3n.js → defaultLabels-BaVkGLw4.js} +14 -14
  47. package/dist/{defaults-CPjpHdep.js → defaults-BHXY6s4i.js} +2 -2
  48. package/dist/{event-transform-tDqIHrb0.js → event-transform-oLpmof1H.js} +4 -4
  49. package/dist/{event-BoPSP9Wq.js → event-xgg-eiTq.js} +1 -1
  50. package/dist/{eventStatusStream-Cw6cAXYK.js → eventStatusStream-BIxriEut.js} +2 -2
  51. package/dist/floatingPosition-DXLeLxPY.js +846 -0
  52. package/dist/{href-DUImPiNg.js → href-DO3HKeJp.js} +3 -3
  53. package/dist/{i18n-urZE8FDd.js → i18n-8EWq-WHv.js} +2 -2
  54. package/dist/{i18n-DvVKV8xP.js → i18n-JpkI3lvS.js} +5 -5
  55. package/dist/{imageOptimizer-Bz54wwZL.js → imageOptimizer-Bb09jR0m.js} +56 -54
  56. package/dist/{keyboard-WUqlYI2l.js → keyboard-Crrnn87b.js} +1 -1
  57. package/dist/{order-totals-2arQgl1W.js → order-totals-5X0jD77w.js} +3 -3
  58. package/dist/{orders-DKH_Ff_F.js → orders--luy9Lyn.js} +19 -19
  59. package/dist/{createErrorGate.svelte-B1UBm7Je.js → phoneUtils-CS66SHie.js} +607 -686
  60. package/dist/{pixels-CoTj8WW9.js → pixels-FefBmhJt.js} +3 -3
  61. package/dist/portal-BZBgqs8B.js +98 -0
  62. package/dist/{promo-77n6yQJ5.js → promo-BNwWtZjP.js} +1 -1
  63. package/dist/{scarcity-CSQqP7r6.js → scarcity-CR1Pa81F.js} +2 -2
  64. package/dist/{serverTotals-CygpqxZO.js → serverTotals-DeOPPRj6.js} +1 -1
  65. package/dist/{showcase-state-options-BSIYaeAC.js → showcase-state-options-BGmvUaQ_.js} +1 -1
  66. package/dist/sizing-CFDo_qh_.js +216 -0
  67. package/dist/{to-event-card-props-CcTZVm_k.js → to-event-card-props-DLOxO2oP.js} +10 -10
  68. package/dist/{utils-CPYwV5uR.js → utils-BFaSYuNA.js} +3 -3
  69. package/dist/venue-calendar.es.js +50 -50
  70. package/dist/venue-calendar.iife.js +2 -2
  71. package/dist/venue-calendar.umd.js +50 -50
  72. package/package.json +2 -2
  73. package/dist/Calendar-D1d210pe.js +0 -1327
  74. package/dist/EventPage-DqTynzsn.js +0 -1199
  75. package/dist/Input-BlLlXJhw.js +0 -301
  76. package/dist/ModalFooter-CZYeaLby.js +0 -471
  77. /package/dist/locales/{4.3.53 → 4.3.54}/flow/de.js +0 -0
  78. /package/dist/locales/{4.3.53 → 4.3.54}/flow/es.js +0 -0
  79. /package/dist/locales/{4.3.53 → 4.3.54}/flow/fr.js +0 -0
  80. /package/dist/locales/{4.3.53 → 4.3.54}/flow/id.js +0 -0
  81. /package/dist/locales/{4.3.53 → 4.3.54}/flow/it.js +0 -0
  82. /package/dist/locales/{4.3.53 → 4.3.54}/flow/ja.js +0 -0
  83. /package/dist/locales/{4.3.53 → 4.3.54}/flow/ko.js +0 -0
  84. /package/dist/locales/{4.3.53 → 4.3.54}/flow/nl.js +0 -0
  85. /package/dist/locales/{4.3.53 → 4.3.54}/flow/pl.js +0 -0
  86. /package/dist/locales/{4.3.53 → 4.3.54}/flow/pt-br.js +0 -0
  87. /package/dist/locales/{4.3.53 → 4.3.54}/flow/tr.js +0 -0
  88. /package/dist/locales/{4.3.53 → 4.3.54}/flow/zh.js +0 -0
  89. /package/dist/locales/{4.3.53 → 4.3.54}/main/de.js +0 -0
  90. /package/dist/locales/{4.3.53 → 4.3.54}/main/es.js +0 -0
  91. /package/dist/locales/{4.3.53 → 4.3.54}/main/fr.js +0 -0
  92. /package/dist/locales/{4.3.53 → 4.3.54}/main/id.js +0 -0
  93. /package/dist/locales/{4.3.53 → 4.3.54}/main/it.js +0 -0
  94. /package/dist/locales/{4.3.53 → 4.3.54}/main/ja.js +0 -0
  95. /package/dist/locales/{4.3.53 → 4.3.54}/main/ko.js +0 -0
  96. /package/dist/locales/{4.3.53 → 4.3.54}/main/nl.js +0 -0
  97. /package/dist/locales/{4.3.53 → 4.3.54}/main/pl.js +0 -0
  98. /package/dist/locales/{4.3.53 → 4.3.54}/main/pt-br.js +0 -0
  99. /package/dist/locales/{4.3.53 → 4.3.54}/main/tr.js +0 -0
  100. /package/dist/locales/{4.3.53 → 4.3.54}/main/zh.js +0 -0
@@ -1,301 +0,0 @@
1
- import { C as e, _ as t, b as n, f as r, h as i, v as a } from "./Button-DZ_ZJIeL.js";
2
- import { b as o } from "./scarcity-CSQqP7r6.js";
3
- import { d as s, n as c, r as l } from "./z-index-Bo0dqmiq.js";
4
- import { t as ee } from "./RequiredIndicator-CYcnRFsA.js";
5
- import "svelte/internal/disclose-version";
6
- import * as u from "svelte/internal/client";
7
- import { onDestroy as d } from "svelte";
8
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/EyeOutline.svelte
9
- var f = u.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z\"></path><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 12a3 3 0 11-6 0 3 3 0 016 0z\"></path></svg>");
10
- function te(e, t) {
11
- let n = u.prop(t, "size", 3, "24"), r = u.prop(t, "color", 3, "currentColor"), i = u.prop(t, "class", 3, "");
12
- var a = f();
13
- u.template_effect(() => {
14
- u.set_class(a, 0, u.clsx(i())), u.set_attribute(a, "width", n()), u.set_attribute(a, "height", n()), u.set_attribute(a, "stroke", r());
15
- }), u.append(e, a);
16
- }
17
- //#endregion
18
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/EyeSlashOutline.svelte
19
- var p = u.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88\"></path></svg>");
20
- function m(e, t) {
21
- let n = u.prop(t, "size", 3, "24"), r = u.prop(t, "color", 3, "currentColor"), i = u.prop(t, "class", 3, "");
22
- var a = p();
23
- u.template_effect(() => {
24
- u.set_class(a, 0, u.clsx(i())), u.set_attribute(a, "width", n()), u.set_attribute(a, "height", n()), u.set_attribute(a, "stroke", r());
25
- }), u.append(e, a);
26
- }
27
- //#endregion
28
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/CloseCircleOutline.svelte
29
- var h = u.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"></path></svg>");
30
- function ne(e, t) {
31
- let n = u.prop(t, "size", 3, "24"), r = u.prop(t, "color", 3, "currentColor"), i = u.prop(t, "class", 3, "");
32
- var a = h();
33
- u.template_effect(() => {
34
- u.set_class(a, 0, u.clsx(i())), u.set_attribute(a, "width", n()), u.set_attribute(a, "height", n()), u.set_attribute(a, "stroke", r());
35
- }), u.append(e, a);
36
- }
37
- //#endregion
38
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ExclamationCircleOutline.svelte
39
- var re = u.from_svg("<svg aria-hidden=\"true\" fill=\"none\" stroke-width=\"1.5\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z\"></path></svg>");
40
- function ie(e, t) {
41
- let n = u.prop(t, "size", 3, "24"), r = u.prop(t, "color", 3, "currentColor"), i = u.prop(t, "class", 3, "");
42
- var a = re();
43
- u.template_effect(() => {
44
- u.set_class(a, 0, u.clsx(i())), u.set_attribute(a, "width", n()), u.set_attribute(a, "height", n()), u.set_attribute(a, "stroke", r());
45
- }), u.append(e, a);
46
- }
47
- //#endregion
48
- //#region node_modules/@getmicdrop/svelte-components/dist/utils/phoneShape.js
49
- function g(e) {
50
- if (!e) return "";
51
- if (e.startsWith("+")) return e;
52
- let t = e.replace(/\D/g, "");
53
- return t.length === 10 ? `+1${t}` : t.length === 11 && t.startsWith("1") ? `+${t}` : e;
54
- }
55
- var _ = "310", ae = 7, v = 10;
56
- function oe(e) {
57
- let t = String(e ?? "").replace(/\D/g, "").slice(0, v);
58
- if (!t) return "";
59
- if (t[0] === "1") {
60
- let e = t.slice(1);
61
- return e ? e[0] === "0" || e[0] === "1" ? t : `1 ${y(e)}` : "1";
62
- }
63
- return t[0] === "0" ? t : y(t);
64
- }
65
- function y(e) {
66
- return e.startsWith(_) && e.length <= ae ? e.length === 3 ? _ : `${_}-${e.slice(3)}` : e.length <= 2 ? e : e.length === 3 ? `(${e})` : e.length <= 6 ? `(${e.slice(0, 3)}) ${e.slice(3)}` : `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6)}`;
67
- }
68
- //#endregion
69
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Input/Input.svelte
70
- var se = /* @__PURE__ */ new Set(/* @__PURE__ */ "$$slots.$$events.$$legacy.required.disabled.optional.icon.buttonIcon.buttonText.maxlength.minlength.type.placeholder.label.id.name.class.size.textareaSize.errorText.color.helperText.helperIcon.hintText.hintIcon.contentFloat.readonly.controlled.onButtonClick.onbuttonclick.value.autocomplete.autofocus.showPasswordToggle.animateFocus.statusText.statusType.buttonDisabled.inputmode.instantSearch.debounceMs.minSearchChars.showClearButton.onsearch.onfocus.onblur.onkeydown.oninputchange.leftIcon.rightIcon.prefix.labels.data-testid".split(".")), b = u.from_html("<span> </span>"), ce = u.from_html("<div class=\"flex justify-start items-center gap-1\"><label> <!></label> <!> <!></div>"), le = u.from_html("<textarea rows=\"4\"></textarea>"), ue = u.from_html("<div><input/> <button type=\"button\" class=\"flex items-center justify-center px-3 tone-muted focus:outline-none\" tabindex=\"-1\"><!></button></div>"), de = u.from_html("<div class=\"absolute left-3 inset-y-0 flex items-center tone-muted z-sticky pointer-events-none\"><!></div>"), fe = u.from_html("<div class=\"absolute right-3 inset-y-0 flex items-center tone-muted z-sticky pointer-events-none\"><!></div>"), pe = u.from_html("<button type=\"button\" class=\"absolute right-2 top-1/2 -translate-y-1/2 flex items-center justify-center p-1 tone-muted\" tabindex=\"-1\"><!></button>"), me = u.from_html("<img class=\"w-5 h-5\"/>"), he = u.from_html("<span class=\"type-label\"> </span>"), ge = u.from_html("<button type=\"button\"><!> <!></button>"), _e = u.from_html("<img class=\"absolute inset-y-0 right-0 w-5 h-5 mr-3 top-1/2 transform -translate-y-1/2\"/>"), ve = u.from_html("<div class=\"relative flex items-center w-full\"><!> <!> <input/> <!> <!></div>"), ye = u.from_html("<div class=\"flex items-start gap-1.5 mt-2\" role=\"alert\" aria-live=\"assertive\"><!> <p> </p></div>"), be = u.from_html("<img class=\"w-4 h-4 mr-2\"/>"), xe = u.from_html("<div><!> <span> </span></div>"), Se = u.from_html("<div><!> <div class=\"relative w-full\"><!> <!></div></div>");
71
- function x(f, p) {
72
- let h = u.props_id();
73
- u.push(p, !0);
74
- let re = {
75
- hidePassword: "Hide password",
76
- showPassword: "Show password",
77
- clearInput: "Clear input",
78
- buttonIconAlt: "Button Icon",
79
- inputIconAlt: "Input icon",
80
- helperIconAlt: "Helper icon",
81
- optional: "(optional)"
82
- }, g = u.prop(p, "required", 3, !1), _ = u.prop(p, "disabled", 3, !1), ae = u.prop(p, "optional", 3, !1), v = u.prop(p, "icon", 3, null), y = u.prop(p, "buttonIcon", 3, null), x = u.prop(p, "buttonText", 3, null), S = u.prop(p, "maxlength", 3, null), C = u.prop(p, "minlength", 3, null), w = u.prop(p, "type", 3, "text"), T = u.prop(p, "placeholder", 3, ""), E = u.prop(p, "label", 3, ""), Ce = u.prop(p, "id", 3, h), D = u.prop(p, "name", 3, ""), we = u.prop(p, "class", 3, ""), Te = u.prop(p, "size", 3, "md"), Ee = u.prop(p, "textareaSize", 3, ""), O = u.prop(p, "errorText", 3, ""), De = u.prop(p, "color", 3, "base"), k = u.prop(p, "helperText", 3, ""), Oe = u.prop(p, "helperIcon", 3, ""), A = u.prop(p, "hintText", 3, ""), ke = u.prop(p, "hintIcon", 3, ""), Ae = u.prop(p, "contentFloat", 3, "left"), j = u.prop(p, "readonly", 3, !1), je = u.prop(p, "controlled", 3, !1), Me = u.prop(p, "onButtonClick", 3, null), Ne = u.prop(p, "onbuttonclick", 3, null), M = u.prop(p, "value", 15, ""), Pe = u.prop(p, "autocomplete", 3, null), Fe = u.prop(p, "autofocus", 3, !1), N = u.prop(p, "showPasswordToggle", 3, !0), Ie = u.prop(p, "animateFocus", 3, !0), P = u.prop(p, "statusText", 3, ""), F = u.prop(p, "statusType", 3, ""), Le = u.prop(p, "buttonDisabled", 3, !1), Re = u.prop(p, "inputmode", 3, null), I = u.prop(p, "instantSearch", 3, !1), ze = u.prop(p, "debounceMs", 3, 250), Be = u.prop(p, "minSearchChars", 3, 2), L = u.prop(p, "showClearButton", 3, !1), R = u.prop(p, "prefix", 3, ""), Ve = u.prop(p, "labels", 19, () => ({})), He = u.rest_props(p, se), z = u.derived(() => Ce() || h);
83
- Me() && !Ne() && n("Input: prop \"onButtonClick\" is deprecated. Use \"onbuttonclick\" instead.");
84
- let Ue = u.derived(() => Ne() ?? Me()), B = u.derived(() => e(re, Ve())), V = u.state(""), H = u.state(null), U, We = u.derived(() => Re() || Ke(w())), Ge = u.derived(() => Pe() ?? null);
85
- function Ke(e) {
86
- switch (e) {
87
- case "phoneNumber":
88
- case "creditCardNumber": return "tel";
89
- case "email": return "email";
90
- default: return null;
91
- }
92
- }
93
- u.user_effect(() => {
94
- M() !== u.get(V) && u.set(V, M(), !0);
95
- });
96
- function qe() {
97
- u.get(H) && u.get(H).value !== u.get(V) && (u.set(V, u.get(H).value, !0), M(u.get(V)));
98
- }
99
- let W = u.state(!1), G = u.derived(() => De() === "red" || !!O()), K = u.derived(() => `${u.get(z)}-error`), Je = u.derived(() => `${u.get(z)}-prefix`), Ye = u.derived(() => [R() ? u.get(Je) : "", O() ? u.get(K) : ""].filter(Boolean).join(" ") || void 0), Xe = u.derived(() => N() && u.get(W) ? "text" : w()), q = u.derived(() => Ie() && !_() && !j()), Ze = u.derived(() => r[Te()] || r.md), Qe = () => {
100
- u.set(W, !u.get(W));
101
- }, J = (e) => {
102
- let t = e.target, n = t.value;
103
- if (w() === "creditCardNumber") {
104
- let e = n.replaceAll(/\D/g, "");
105
- n = o(e), t.value = n;
106
- }
107
- if (w() === "phoneNumber" && (n = oe(n.replaceAll(/\D/g, "").slice(0, 10)), t.value = n), w() === "username") {
108
- let e = n.trim(), r = e.match(/(?:https?:\/\/)?(?:www\.)?(?:instagram\.com|twitter\.com|x\.com|facebook\.com|fb\.com|tiktok\.com|linkedin\.com)\/(?:@)?([A-Za-z0-9._]+)\/?/i);
109
- r && (e = r[1]), e = e.replace(/^@+/, ""), e = e.replaceAll(/[^A-Za-z0-9._]/g, ""), n = e, t.value = n;
110
- }
111
- if (u.set(V, n, !0), M(n), p.oninputchange?.(n), I()) {
112
- if (clearTimeout(U), n.length === 0) {
113
- p.onsearch?.({ query: "" });
114
- return;
115
- }
116
- n.length >= Be() && (U = setTimeout(() => {
117
- p.onsearch?.({ query: n });
118
- }, ze()));
119
- }
120
- };
121
- function $e() {
122
- u.set(V, ""), M(""), clearTimeout(U), I() && p.onsearch?.({ query: "" }), u.get(H) && u.get(H).focus();
123
- }
124
- function et(e) {
125
- p.onkeydown?.(e), !e.defaultPrevented && I() && (e.key === "Enter" && (clearTimeout(U), p.onsearch?.({ query: String(u.get(V) ?? "") })), e.key === "Escape" && $e());
126
- }
127
- d(() => {
128
- clearTimeout(U);
129
- });
130
- let Y = () => {
131
- p.onblur?.();
132
- }, X = () => {
133
- p.onfocus?.();
134
- }, Z = () => {
135
- switch (Ae()) {
136
- case "center": return "text-center";
137
- case "right": return "text-right";
138
- default: return "text-left";
139
- }
140
- }, tt = () => {
141
- switch (Ee()) {
142
- case "sm": return "h-24";
143
- case "md": return "h-36";
144
- case "lg": return "h-44";
145
- default: return "";
146
- }
147
- }, nt = () => {
148
- typeof u.get(Ue) == "function" && u.get(Ue)(String(u.get(V) ?? ""));
149
- };
150
- var Q = Se();
151
- u.attribute_effect(Q, () => ({
152
- class: `flex flex-col gap-1 ${we() ?? ""}`,
153
- ...He
154
- }));
155
- var rt = u.child(Q), it = (e) => {
156
- var t = ce(), n = u.child(t), r = u.child(n, !0), o = u.sibling(r);
157
- ee(o, { get required() {
158
- return g();
159
- } }), u.reset(n);
160
- var s = u.sibling(n, 2), c = (e) => {
161
- var t = b(), n = u.child(t);
162
- u.reset(t), u.template_effect(() => {
163
- u.set_class(t, 1, `type-label ${F() === "success" ? "text-accent-success" : F() === "error" ? "text-accent-danger" : ""}`), u.set_text(n, `(${P() ?? ""})`);
164
- }), u.append(e, t);
165
- };
166
- u.if(s, (e) => {
167
- P() && e(c);
168
- });
169
- var l = u.sibling(s, 2), d = (e) => {
170
- var t = b(), n = u.child(t, !0);
171
- u.reset(t), u.template_effect(() => {
172
- u.set_class(t, 1, u.clsx(a.smMuted)), u.set_text(n, u.get(B).optional);
173
- }), u.append(e, t);
174
- };
175
- u.if(l, (e) => {
176
- ae() && e(d);
177
- }), u.reset(t), u.template_effect(() => {
178
- u.set_attribute(n, "for", u.get(z)), u.set_class(n, 1, `${a.caption} tone-secondary ${i.tight} sm:${i.none} ${u.get(G) ? "text-status-error-text" : ""}`), u.set_text(r, E());
179
- }), u.append(e, t);
180
- };
181
- u.if(rt, (e) => {
182
- E() && e(it);
183
- });
184
- var at = u.sibling(rt, 2), $ = u.child(at), ot = (e) => {
185
- var n = le();
186
- u.remove_textarea_child(n), n.required = !1, u.template_effect((e, r) => {
187
- u.set_attribute(n, "id", u.get(z)), u.set_attribute(n, "name", D()), u.set_attribute(n, "placeholder", T()), u.set_value(n, u.get(V)), u.set_attribute(n, "maxlength", S()), u.set_attribute(n, "minlength", C()), u.set_class(n, 1, `${a.sm ?? ""} w-full px-3 py-2 bg-bg-secondary border rounded-lg ${t.emphasis ?? ""} placeholder-muted-foreground transition-all focus:outline-none focus:ring-4 focus:ring-focus-ring resize-y ${u.get(G) ? "border-status-error-border" : "border-stroke-primary hover:border-interactive-border focus:border-interactive-border"} ${e ?? ""} ${r ?? ""} ${u.get(q) ? "focus:scale-grow" : ""}`), n.disabled = _(), n.readOnly = j(), u.set_attribute(n, "aria-required", g()), u.set_attribute(n, "aria-invalid", u.get(G)), u.set_attribute(n, "aria-describedby", O() ? u.get(K) : void 0), u.set_attribute(n, "data-testid", p["data-testid"]);
188
- }, [() => Z(), () => tt()]), u.delegated("input", n, J), u.event("blur", n, Y), u.event("focus", n, X), u.append(e, n);
189
- }, st = (e) => {
190
- var n = ue(), r = u.child(n);
191
- u.remove_input_defaults(r), r.required = !1, u.autofocus(r, Fe()), u.bind_this(r, (e) => u.set(H, e), () => u.get(H));
192
- var i = u.sibling(r, 2), o = u.child(i), s = (e) => {
193
- m(e, { class: "w-5 h-5" });
194
- }, c = (e) => {
195
- te(e, { class: "w-5 h-5" });
196
- };
197
- u.if(o, (e) => {
198
- u.get(W) ? e(s) : e(c, -1);
199
- }), u.reset(i), u.reset(n), u.template_effect((e) => {
200
- u.set_class(n, 1, `flex items-center w-full bg-bg-secondary border rounded-lg transition-all outline-none focus-within:ring-4 focus-within:ring-focus-ring ${u.get(G) ? "border-status-error-border" : "border-stroke-primary hover:border-interactive-border focus-within:border-interactive-border"} ${u.get(q) ? "focus-within:scale-grow" : ""} ${_() ? "opacity-50 cursor-not-allowed" : ""}`), u.set_attribute(r, "id", u.get(z)), u.set_attribute(r, "type", u.get(Xe)), u.set_attribute(r, "name", D()), u.set_attribute(r, "placeholder", T()), u.set_value(r, u.get(V)), u.set_attribute(r, "maxlength", S()), u.set_attribute(r, "minlength", C()), u.set_class(r, 1, `password-input-inner ${a.sm ?? ""} flex-1 w-full ${u.get(Ze) ?? ""} bg-transparent border-0 ${t.emphasis ?? ""} placeholder-muted-foreground focus:outline-none focus:ring-0 ${e ?? ""}`), r.disabled = _(), r.readOnly = j(), u.set_attribute(r, "aria-required", g()), u.set_attribute(r, "aria-invalid", u.get(G)), u.set_attribute(r, "aria-describedby", O() ? u.get(K) : void 0), u.set_attribute(r, "data-testid", p["data-testid"]), u.set_attribute(r, "autocomplete", u.get(Ge)), u.set_attribute(r, "inputmode", u.get(We)), u.set_attribute(i, "aria-label", u.get(W) ? u.get(B).hidePassword : u.get(B).showPassword);
201
- }, [() => Z()]), u.delegated("input", r, J), u.delegated("change", r, qe), u.event("blur", r, Y), u.event("focus", r, X), u.delegated("click", i, Qe), u.append(e, n);
202
- }, ct = (e) => {
203
- var n = ve(), r = u.child(n), i = (e) => {
204
- var t = b(), n = u.child(t, !0);
205
- u.reset(t), u.template_effect(() => {
206
- u.set_attribute(t, "id", u.get(Je)), u.set_attribute(t, "data-testid", p["data-testid"] ? `${p["data-testid"]}-prefix` : void 0), u.set_class(t, 1, `${a.body ?? ""} shrink-0 self-stretch flex items-center px-3 bg-bg-tertiary tone-muted border border-r-0 rounded-l-lg select-none ${u.get(G) ? "border-status-error-border" : "border-stroke-primary"} ${_() ? "opacity-50" : ""}`), u.set_text(n, R());
207
- }), u.append(e, t);
208
- };
209
- u.if(r, (e) => {
210
- R() && e(i);
211
- });
212
- var o = u.sibling(r, 2), s = (e) => {
213
- var t = de(), n = u.child(t);
214
- u.snippet(n, () => p.leftIcon), u.reset(t), u.append(e, t);
215
- };
216
- u.if(o, (e) => {
217
- p.leftIcon && e(s);
218
- });
219
- var c = u.sibling(o, 2);
220
- u.remove_input_defaults(c), c.required = !1, u.autofocus(c, Fe()), u.bind_this(c, (e) => u.set(H, e), () => u.get(H));
221
- var l = u.sibling(c, 2), ee = (e) => {
222
- var t = fe(), n = u.child(t);
223
- u.snippet(n, () => p.rightIcon), u.reset(t), u.append(e, t);
224
- }, d = (e) => {
225
- var t = pe();
226
- ne(u.child(t), { class: "w-4 h-4" }), u.reset(t), u.template_effect(() => u.set_attribute(t, "aria-label", u.get(B).clearInput)), u.delegated("click", t, $e), u.append(e, t);
227
- }, f = (e) => {
228
- var t = ge(), n = u.child(t), r = (e) => {
229
- var t = me();
230
- u.template_effect(() => {
231
- u.set_attribute(t, "src", y()), u.set_attribute(t, "alt", u.get(B).buttonIconAlt);
232
- }), u.append(e, t);
233
- };
234
- u.if(n, (e) => {
235
- y() && e(r);
236
- });
237
- var i = u.sibling(n, 2), a = (e) => {
238
- var t = he(), n = u.child(t, !0);
239
- u.reset(t), u.template_effect(() => u.set_text(n, x())), u.append(e, t);
240
- };
241
- u.if(i, (e) => {
242
- x() && e(a);
243
- }), u.reset(t), u.template_effect(() => {
244
- t.disabled = Le(), u.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 ${k() || A() || O() ? "mb-7" : ""}`);
245
- }), u.delegated("click", t, nt), u.append(e, t);
246
- };
247
- u.if(l, (e) => {
248
- p.rightIcon ? e(ee) : L() && u.get(V) ? e(d, 1) : je() && (y() || x()) && e(f, 2);
249
- });
250
- var te = u.sibling(l, 2), m = (e) => {
251
- var t = _e();
252
- u.template_effect(() => {
253
- u.set_attribute(t, "src", v()), u.set_attribute(t, "alt", u.get(B).inputIconAlt);
254
- }), u.append(e, t);
255
- };
256
- u.if(te, (e) => {
257
- v() && w() !== "textarea" && !p.rightIcon && !(L() && u.get(V)) && e(m);
258
- }), u.reset(n), u.template_effect((e) => {
259
- u.set_attribute(c, "id", u.get(z)), u.set_attribute(c, "type", u.get(Xe)), u.set_attribute(c, "name", D()), u.set_attribute(c, "placeholder", T()), u.set_value(c, u.get(V)), u.set_attribute(c, "maxlength", S()), u.set_attribute(c, "minlength", C()), u.set_class(c, 1, `${a.body ?? ""} w-full ${R() ? "min-w-0 " : ""}${u.get(Ze) ?? ""} bg-bg-secondary border ${R() ? "rounded-r-lg" : "rounded-lg"} ${t.emphasis ?? ""} placeholder-muted-foreground transition-all focus:outline-none focus:ring-4 focus:ring-focus-ring ${u.get(G) ? "border-status-error-border" : "border-stroke-primary hover:border-interactive-border focus:border-interactive-border"} ${v() || p.rightIcon || L() && u.get(V) ? "pr-10" : ""} ${p.leftIcon ? "pl-10" : ""} ${e ?? ""} ${u.get(q) && !R() ? "focus:scale-grow" : ""} ${_() ? "opacity-50 cursor-not-allowed" : ""}`), c.disabled = _(), c.readOnly = j(), u.set_attribute(c, "aria-required", g()), u.set_attribute(c, "aria-invalid", u.get(G)), u.set_attribute(c, "aria-describedby", u.get(Ye)), u.set_attribute(c, "data-testid", p["data-testid"]), u.set_attribute(c, "autocomplete", u.get(Ge)), u.set_attribute(c, "inputmode", u.get(We));
260
- }, [() => Z()]), u.delegated("input", c, J), u.delegated("change", c, qe), u.event("blur", c, Y), u.event("focus", c, X), u.delegated("keydown", c, et), u.append(e, n);
261
- };
262
- u.if($, (e) => {
263
- w() === "textarea" ? e(ot) : w() === "password" && N() ? e(st, 1) : e(ct, -1);
264
- });
265
- var lt = u.sibling($, 2), ut = (e) => {
266
- var t = ye(), n = u.child(t);
267
- ie(n, { class: "w-4 h-4 shrink-0 text-accent-danger mt-0.5" });
268
- var r = u.sibling(n, 2), i = u.child(r, !0);
269
- u.reset(r), u.reset(t), u.template_effect(() => {
270
- u.set_attribute(t, "id", u.get(K)), u.set_class(r, 1, u.clsx(a.error)), u.set_text(i, O());
271
- }), u.transition(3, t, () => s, () => ({
272
- duration: c.normal,
273
- easing: l.out
274
- })), u.append(e, t);
275
- }, dt = (e) => {
276
- var t = xe(), n = u.child(t), r = (e) => {
277
- var t = be();
278
- u.template_effect(() => {
279
- u.set_attribute(t, "src", Oe() || ke()), u.set_attribute(t, "alt", u.get(B).helperIconAlt);
280
- }), u.append(e, t);
281
- };
282
- u.if(n, (e) => {
283
- (Oe() || ke()) && e(r);
284
- });
285
- var i = u.sibling(n, 2), o = u.child(i, !0);
286
- u.reset(i), u.reset(t), u.template_effect(() => {
287
- u.set_class(t, 1, `mt-2 flex items-center ${a.xsMuted} opacity-65`), u.set_text(o, k() || A());
288
- }), u.append(e, t);
289
- };
290
- u.if(lt, (e) => {
291
- O() ? e(ut) : (k() || A()) && e(dt, 1);
292
- }), u.reset(at), u.reset(Q), u.append(f, Q), u.pop();
293
- }
294
- u.delegate([
295
- "input",
296
- "change",
297
- "click",
298
- "keydown"
299
- ]);
300
- //#endregion
301
- export { ne as i, g as n, ie as r, x as t };