gather-vue 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +64 -0
  2. package/dist/.htaccess +1 -0
  3. package/dist/App-B7KWoHRH.js +160 -0
  4. package/dist/App-B7KWoHRH.js.gz +0 -0
  5. package/dist/App-C03tW0-W.js +405 -0
  6. package/dist/App-C03tW0-W.js.gz +0 -0
  7. package/dist/BannerExample-CRj1iMwh.js +77 -0
  8. package/dist/BannerExample-CRj1iMwh.js.gz +0 -0
  9. package/dist/BannerExample-DLN6d9M0.js +84 -0
  10. package/dist/BannerExample-DLN6d9M0.js.gz +0 -0
  11. package/dist/CallToAction-BbJ-zDFa.js +3493 -0
  12. package/dist/CallToAction-BbJ-zDFa.js.gz +0 -0
  13. package/dist/CallToAction-jAi8aaI-.js +35 -0
  14. package/dist/CallToAction-jAi8aaI-.js.gz +0 -0
  15. package/dist/Card-B1Pdd5BL.js +202 -0
  16. package/dist/Card-B1Pdd5BL.js.gz +0 -0
  17. package/dist/Card-qMo1jrfb.js +699 -0
  18. package/dist/Card-qMo1jrfb.js.gz +0 -0
  19. package/dist/CloseCardButton-CL_3xkAF.js +71 -0
  20. package/dist/CloseCardButton-CL_3xkAF.js.gz +0 -0
  21. package/dist/Editor-DXSZFkEM.js +149 -0
  22. package/dist/Editor-DXSZFkEM.js.gz +0 -0
  23. package/dist/EmailExistsView-CX1ijN0R.js +72 -0
  24. package/dist/EmailExistsView-CX1ijN0R.js.gz +0 -0
  25. package/dist/EmailInvitation-BVFicmrK.js +22 -0
  26. package/dist/EmailView-DdaSnKFq.js +84 -0
  27. package/dist/EmailView-DdaSnKFq.js.gz +0 -0
  28. package/dist/FriendBannerExample-C8QmPZyP.js +76 -0
  29. package/dist/FriendBannerExample-C8QmPZyP.js.gz +0 -0
  30. package/dist/FriendConfirmation-B-RemAoP.js +22 -0
  31. package/dist/FriendForm-CunLFX_H.js +255 -0
  32. package/dist/FriendForm-CunLFX_H.js.gz +0 -0
  33. package/dist/FriendOptIn-bp4udUYv.js +27 -0
  34. package/dist/FriendPending-cFjgyL8g.js +22 -0
  35. package/dist/FriendPitch-BhSs2eLR.js +19 -0
  36. package/dist/FriendPitch-CAS1c3Co.js +33 -0
  37. package/dist/FriendSuccess-uxEdomAY.js +22 -0
  38. package/dist/Invitations-hprUCIvW.js +27 -0
  39. package/dist/InviteRoot-Dima8d2G.js +252 -0
  40. package/dist/InviteRoot-Dima8d2G.js.gz +0 -0
  41. package/dist/LaunchButton-BQw42WVn.js +18 -0
  42. package/dist/MazBtn.1qp5aQ4N-DU0ii1Xr.js +103 -0
  43. package/dist/MazBtn.1qp5aQ4N-DU0ii1Xr.js.gz +0 -0
  44. package/dist/MazCheckbox.UAnkvAoS-pse3PCQf.js +149 -0
  45. package/dist/MazCheckbox.UAnkvAoS-pse3PCQf.js.gz +0 -0
  46. package/dist/MazIcon.B5hPzeLk-C20gse35.js +103 -0
  47. package/dist/MazIcon.B5hPzeLk-C20gse35.js.gz +0 -0
  48. package/dist/MazPhoneNumberInput-Cz50Ts4U.js +4751 -0
  49. package/dist/MazPhoneNumberInput-Cz50Ts4U.js.gz +0 -0
  50. package/dist/MazSpinner.DZT5jj-c-y1IYJMcd.js +34 -0
  51. package/dist/MazSpinner.DZT5jj-c-y1IYJMcd.js.gz +0 -0
  52. package/dist/Menu-BsKr40BO.js +21377 -0
  53. package/dist/Menu-BsKr40BO.js.gz +0 -0
  54. package/dist/Message-D4PAgcHO.js +22 -0
  55. package/dist/MessageCard-CC74qCir.js +74 -0
  56. package/dist/MessageCard-CC74qCir.js.gz +0 -0
  57. package/dist/MessageView-BKAIrwj7.js +88 -0
  58. package/dist/MessageView-BKAIrwj7.js.gz +0 -0
  59. package/dist/PendingApprovalCard-Dzs0UxBO.js +48 -0
  60. package/dist/PendingApprovalCard-Dzs0UxBO.js.gz +0 -0
  61. package/dist/PendingApprovalView-V-OUYSnK.js +33 -0
  62. package/dist/ReferralButton-CEue5qud.js +18 -0
  63. package/dist/ReferralFailedView-3Ua13t4V.js +74 -0
  64. package/dist/ReferralFailedView-3Ua13t4V.js.gz +0 -0
  65. package/dist/ReferredConfirmCard-iwgkcZCm.js +48 -0
  66. package/dist/ReferredConfirmCard-iwgkcZCm.js.gz +0 -0
  67. package/dist/ReferredConfirmView-DS1RNBwP.js +33 -0
  68. package/dist/ReferredSuccessCard-Dg-a4FYr.js +209 -0
  69. package/dist/ReferredSuccessCard-Dg-a4FYr.js.gz +0 -0
  70. package/dist/ReferredSuccessView-ChVztlUr.js +33 -0
  71. package/dist/ReferredView-7HezoVIA.js +98 -0
  72. package/dist/ReferredView-7HezoVIA.js.gz +0 -0
  73. package/dist/RewardCard-CwU2X2Yo.js +197 -0
  74. package/dist/RewardCard-CwU2X2Yo.js.gz +0 -0
  75. package/dist/Rewards-DdyEwCyy.js +27 -0
  76. package/dist/RewardsRoot-CnQfyjC6.js +198 -0
  77. package/dist/RewardsRoot-CnQfyjC6.js.gz +0 -0
  78. package/dist/Root-bUfnZpPP.js +17 -0
  79. package/dist/ShareInvitation-SAgC-8YA.js +22 -0
  80. package/dist/SignIn-CroW3mY6.js +36 -0
  81. package/dist/SignIn-CroW3mY6.js.gz +0 -0
  82. package/dist/SignIn-g32Hg2or.js +17 -0
  83. package/dist/SignInTextArea-DBRk6x09.js +17 -0
  84. package/dist/SignUpFormCard-Cail4V4M.js +287 -0
  85. package/dist/SignUpFormCard-Cail4V4M.js.gz +0 -0
  86. package/dist/SignUpView-a7LPgEeX.js +368 -0
  87. package/dist/SignUpView-a7LPgEeX.js.gz +0 -0
  88. package/dist/SignUpView-uujOX5hN.js +103 -0
  89. package/dist/SignUpView-uujOX5hN.js.gz +0 -0
  90. package/dist/SocialView-CbBZTB7Z.js +87 -0
  91. package/dist/SocialView-CbBZTB7Z.js.gz +0 -0
  92. package/dist/Stats-DtS-GXsI.js +22 -0
  93. package/dist/StatsView-fX-VznRc.js +90 -0
  94. package/dist/StatsView-fX-VznRc.js.gz +0 -0
  95. package/dist/Success-k06CZz0K.js +40 -0
  96. package/dist/Success-k06CZz0K.js.gz +0 -0
  97. package/dist/SuccessCard-C1iF1j2W.js +219 -0
  98. package/dist/SuccessCard-C1iF1j2W.js.gz +0 -0
  99. package/dist/SuccessView-CDUVkpSQ.js +77 -0
  100. package/dist/SuccessView-CDUVkpSQ.js.gz +0 -0
  101. package/dist/TextArea-DFfa9A93.js +17 -0
  102. package/dist/TextAreaCard-D_VfEHME.js +34 -0
  103. package/dist/TextAreaCard-D_VfEHME.js.gz +0 -0
  104. package/dist/UserView-DnD929IT.js +96 -0
  105. package/dist/UserView-DnD929IT.js.gz +0 -0
  106. package/dist/WhatsAppShare-B40Ouvds.js +59 -0
  107. package/dist/WhatsAppShare-B40Ouvds.js.gz +0 -0
  108. package/dist/agent-session-Xh6dZlhc.js +298 -0
  109. package/dist/agent-session-Xh6dZlhc.js.gz +0 -0
  110. package/dist/aggregate-base-C6N8Ymd5.js +830 -0
  111. package/dist/aggregate-base-C6N8Ymd5.js.gz +0 -0
  112. package/dist/bel-serializer-DMbFBZ6U.js +51 -0
  113. package/dist/bel-serializer-DMbFBZ6U.js.gz +0 -0
  114. package/dist/browser-q7cvfJ-2.js +366 -0
  115. package/dist/browser-q7cvfJ-2.js.gz +0 -0
  116. package/dist/cart.js +5 -0
  117. package/dist/cart.js.gz +0 -0
  118. package/dist/check.C9Q_W85g-DmgtOx7Q.js +30 -0
  119. package/dist/chevron-down.BkvtON3b-RNrTKYcy.js +30 -0
  120. package/dist/content-5VAQ1vQ0.js +4 -0
  121. package/dist/event-origin-BSW5uum9.js +13 -0
  122. package/dist/examples.mobile.json.tW3aL0qI-tW3aL0qI.js +4 -0
  123. package/dist/examples.mobile.json.tW3aL0qI-tW3aL0qI.js.gz +0 -0
  124. package/dist/eye-slash.BoO00xzs-CULY_lvM.js +30 -0
  125. package/dist/eye.f8zAUc30-Yr89kafZ.js +43 -0
  126. package/dist/eye.f8zAUc30-Yr89kafZ.js.gz +0 -0
  127. package/dist/favicon.ico +0 -0
  128. package/dist/first-paint-B61SrVKm.js +453 -0
  129. package/dist/first-paint-B61SrVKm.js.gz +0 -0
  130. package/dist/gather-vue.css +5 -0
  131. package/dist/gather-vue.css.gz +0 -0
  132. package/dist/gather-widget.es.js +5 -0
  133. package/dist/gather-widget.umd.js +263 -0
  134. package/dist/gather-widget.umd.js.gz +0 -0
  135. package/dist/gather_widget.css +58 -0
  136. package/dist/gather_widget.css.gz +0 -0
  137. package/dist/gather_widget.js +72 -0
  138. package/dist/gather_widget.js.gz +0 -0
  139. package/dist/iframe-BELrOJ1p.js +6 -0
  140. package/dist/index-3lvNtPTE.js +327 -0
  141. package/dist/index-3lvNtPTE.js.gz +0 -0
  142. package/dist/index-BDyGxL1x.js +255 -0
  143. package/dist/index-BDyGxL1x.js.gz +0 -0
  144. package/dist/index-BF9haAFD.js +343 -0
  145. package/dist/index-BF9haAFD.js.gz +0 -0
  146. package/dist/index-BMIST_QA.js +128 -0
  147. package/dist/index-BMIST_QA.js.gz +0 -0
  148. package/dist/index-BdWnMhAc.js +235 -0
  149. package/dist/index-BdWnMhAc.js.gz +0 -0
  150. package/dist/index-BioZsJbf.js +190 -0
  151. package/dist/index-BioZsJbf.js.gz +0 -0
  152. package/dist/index-BzOcD8v-.js +166 -0
  153. package/dist/index-BzOcD8v-.js.gz +0 -0
  154. package/dist/index-C8pB9mUQ.js +147 -0
  155. package/dist/index-C8pB9mUQ.js.gz +0 -0
  156. package/dist/index-C_ougoWd.js +426 -0
  157. package/dist/index-C_ougoWd.js.gz +0 -0
  158. package/dist/index-CoRlIGDo.js +513 -0
  159. package/dist/index-CoRlIGDo.js.gz +0 -0
  160. package/dist/index-CyWBxUBS.js +291 -0
  161. package/dist/index-CyWBxUBS.js.gz +0 -0
  162. package/dist/index-DijQHge7.js +325 -0
  163. package/dist/index-DijQHge7.js.gz +0 -0
  164. package/dist/magnifying-glass.-nBiyXot-CuA_mltt.js +30 -0
  165. package/dist/main-DPldah1M.js +40243 -0
  166. package/dist/main-DPldah1M.js.gz +0 -0
  167. package/dist/nav-timing-B-TNQpyK.js +31 -0
  168. package/dist/nav-timing-B-TNQpyK.js.gz +0 -0
  169. package/dist/no-photography.BJX8HSus-BJX8HSus.js +4 -0
  170. package/dist/no-symbol.CIgKzsrB-3PuxVsDY.js +30 -0
  171. package/dist/recorder-PHZWRV-S.js +8271 -0
  172. package/dist/recorder-PHZWRV-S.js.gz +0 -0
  173. package/dist/stylesheet-evaluator-B4P289vW.js +86 -0
  174. package/dist/stylesheet-evaluator-B4P289vW.js.gz +0 -0
  175. package/dist/time-to-first-byte-kiwh1xjs.js +29 -0
  176. package/dist/traverse-Bw4y1x4D.js +8 -0
  177. package/dist/type-check-Bp684oBR.js +6 -0
  178. package/package.json +89 -0
@@ -0,0 +1,103 @@
1
+ import { defineComponent as $, defineAsyncComponent as m, useAttrs as h, computed as t, createBlock as l, openBlock as n, resolveDynamicComponent as s, normalizeStyle as S, normalizeClass as a, withCtx as j, renderSlot as u, createElementBlock as C, createCommentVNode as d, unref as r, createVNode as _ } from "vue";
2
+ import { s as O } from "./MazPhoneNumberInput-Cz50Ts4U.js";
3
+ const A = {
4
+ key: 0,
5
+ class: "m-btn-loader-container"
6
+ }, E = /* @__PURE__ */ $({
7
+ __name: "MazBtn",
8
+ props: {
9
+ variant: { default: "button" },
10
+ size: { default: "md" },
11
+ color: { default: "primary" },
12
+ type: { default: "button" },
13
+ rounded: { type: Boolean },
14
+ roundedSize: { default: "lg" },
15
+ noRounded: { type: Boolean },
16
+ outline: { type: Boolean },
17
+ pastel: { type: Boolean },
18
+ block: { type: Boolean },
19
+ noUnderline: { type: Boolean },
20
+ loading: { type: Boolean },
21
+ disabled: { type: Boolean },
22
+ fab: { type: Boolean },
23
+ icon: { type: [String, Function, Object], default: void 0 },
24
+ leftIcon: { type: [String, Function, Object], default: void 0 },
25
+ rightIcon: { type: [String, Function, Object], default: void 0 },
26
+ noPadding: { type: Boolean },
27
+ noElevation: { type: Boolean },
28
+ justify: { default: "center" }
29
+ },
30
+ setup(v) {
31
+ const o = v, y = m(() => import("./MazSpinner.DZT5jj-c-y1IYJMcd.js")), c = m(() => import("./MazIcon.B5hPzeLk-C20gse35.js")), { href: b, to: g } = h(), p = t(() => b ? "a" : g ? "router-link" : "button"), z = t(() => o.pastel ? `--${o.color}-pastel` : o.outline ? `--${o.color}-outline` : `--${o.color}`), f = t(
32
+ () => (o.loading || o.disabled) && p.value === "button"
33
+ ), B = t(() => f.value ? "--cursor-default" : "--cursor-pointer"), k = t(() => `--is-${o.variant}`), x = t(() => o.loading && o.variant === "button"), I = t(() => p.value === "button" ? o.type : void 0), i = t(() => o.size === "xl" ? "maz-text-3xl" : o.size === "lg" ? "maz-text-2xl" : o.size === "md" ? "maz-text-xl" : o.size === "sm" ? "maz-text-lg" : o.size === "xs" ? "maz-text-base" : o.size === "mini" ? "maz-text-sm" : "maz-text-xl");
34
+ return (e, F) => (n(), l(s(p.value), {
35
+ disabled: f.value || void 0,
36
+ class: a(["m-btn m-reset-css", [
37
+ `--${e.size}`,
38
+ !e.fab && !e.rounded && e.roundedSize && `--rounded-${e.roundedSize}`,
39
+ z.value,
40
+ B.value,
41
+ k.value,
42
+ {
43
+ "--block": e.block,
44
+ "--no-underline": e.noUnderline,
45
+ "--fab": e.fab,
46
+ "--loading": e.loading,
47
+ "--disabled": f.value,
48
+ "--rounded": e.rounded,
49
+ "--no-rounded": e.noRounded,
50
+ "--no-padding": e.noPadding,
51
+ "--no-elevation": e.noElevation
52
+ }
53
+ ]]),
54
+ style: S([`--justify: ${e.justify}`]),
55
+ type: I.value
56
+ }, {
57
+ default: j(() => [
58
+ u(e.$slots, "left-icon", {}, () => [
59
+ typeof e.leftIcon == "string" ? (n(), l(r(c), {
60
+ key: 0,
61
+ name: e.leftIcon,
62
+ class: a([i.value])
63
+ }, null, 8, ["name", "class"])) : e.leftIcon ? (n(), l(s(e.leftIcon), {
64
+ key: 1,
65
+ class: a([i.value])
66
+ }, null, 8, ["class"])) : d("v-if", !0)
67
+ ], !0),
68
+ u(e.$slots, "icon", {}, () => [
69
+ typeof e.icon == "string" ? (n(), l(r(c), {
70
+ key: 0,
71
+ name: e.icon,
72
+ class: a([i.value])
73
+ }, null, 8, ["name", "class"])) : e.icon ? (n(), l(s(e.icon), {
74
+ key: 1,
75
+ class: a([i.value])
76
+ }, null, 8, ["class"])) : d("v-if", !0)
77
+ ], !0),
78
+ u(e.$slots, "default", {}, void 0, !0),
79
+ u(e.$slots, "right-icon", {}, () => [
80
+ typeof e.rightIcon == "string" ? (n(), l(r(c), {
81
+ key: 0,
82
+ name: e.rightIcon,
83
+ class: a([i.value])
84
+ }, null, 8, ["name", "class"])) : e.rightIcon ? (n(), l(s(e.rightIcon), {
85
+ key: 1,
86
+ class: a([i.value])
87
+ }, null, 8, ["class"])) : d("v-if", !0)
88
+ ], !0),
89
+ x.value ? (n(), C("div", A, [
90
+ _(r(y), {
91
+ size: "2em",
92
+ color: e.color
93
+ }, null, 8, ["color"])
94
+ ])) : d("v-if", !0)
95
+ ]),
96
+ _: 3
97
+ /* FORWARDED */
98
+ }, 8, ["disabled", "class", "style", "type"]));
99
+ }
100
+ }), N = /* @__PURE__ */ O(E, [["__scopeId", "data-v-6b881156"]]);
101
+ export {
102
+ N as default
103
+ };
@@ -0,0 +1,149 @@
1
+ import { defineComponent as E, computed as o, ref as N, createElementBlock as b, openBlock as x, normalizeStyle as t, normalizeClass as n, unref as s, createElementVNode as u, mergeProps as $, createVNode as A, renderSlot as I, createCommentVNode as D, createTextVNode as K, toDisplayString as y } from "vue";
2
+ import { s as M, w as P } from "./MazPhoneNumberInput-Cz50Ts4U.js";
3
+ import T from "./check.C9Q_W85g-DmgtOx7Q.js";
4
+ const F = ["for", "aria-checked"], H = ["id", "checked", "disabled", "name"], J = { class: "m-checkbox__text" }, R = /* @__PURE__ */ E({
5
+ inheritAttrs: !1,
6
+ __name: "MazCheckbox",
7
+ props: {
8
+ style: { default: void 0 },
9
+ class: { default: void 0 },
10
+ modelValue: { default: void 0 },
11
+ id: { default: void 0 },
12
+ color: { default: "primary" },
13
+ value: { type: [String, Number, Boolean], default: void 0 },
14
+ name: { default: "m-checkbox" },
15
+ size: { default: "md" },
16
+ label: { default: void 0 },
17
+ disabled: { type: Boolean, default: !1 },
18
+ error: { type: Boolean },
19
+ success: { type: Boolean },
20
+ warning: { type: Boolean },
21
+ hint: {}
22
+ },
23
+ emits: ["update:model-value", "change", "blur", "focus"],
24
+ setup(z, { emit: g }) {
25
+ const a = z, r = g, d = P({
26
+ componentName: "MazCheckbox",
27
+ providedId: a.id
28
+ }), m = o(
29
+ () => typeof a.value != "boolean" && Array.isArray(a.modelValue) ? a.modelValue.includes(a.value) : typeof a.modelValue == "boolean" ? a.modelValue : !1
30
+ ), i = o(() => {
31
+ switch (a.size) {
32
+ case "xl":
33
+ return "2rem";
34
+ case "lg":
35
+ return "1.75rem";
36
+ case "sm":
37
+ return "1.25rem";
38
+ case "xs":
39
+ return "1rem";
40
+ case "mini":
41
+ return "0.75rem";
42
+ default:
43
+ return "1.5rem";
44
+ }
45
+ }), k = o(() => {
46
+ switch (a.size) {
47
+ case "xl":
48
+ return "maz-text-2xl";
49
+ case "lg":
50
+ return "maz-text-xl";
51
+ case "sm":
52
+ return "maz-text-base";
53
+ case "xs":
54
+ return "maz-text-sm";
55
+ case "mini":
56
+ return "maz-text-xs";
57
+ default:
58
+ return "maz-text-lg";
59
+ }
60
+ }), V = o(() => a.color === "theme" ? "var(--maz-color-bg)" : `var(--maz-color-${a.color}-contrast)`), w = o(() => a.color === "theme" ? "var(--maz-color-bg-theme)" : `var(--maz-color-${a.color})`), v = o(() => a.error ? "var(--maz-color-danger)" : a.warning ? "var(--maz-color-warning)" : a.success ? "var(--maz-color-success)" : ["black", "transparent", "theme"].includes(a.color) ? "var(--maz-color-muted)" : `var(--maz-color-${a.color}-alpha)`);
61
+ function B(e) {
62
+ ["Space"].includes(e.code) && (e.preventDefault(), f(a.value ?? !a.modelValue));
63
+ }
64
+ function _(e) {
65
+ return typeof e == "boolean" && (typeof a.modelValue == "boolean" || a.modelValue === void 0 || a.modelValue === null) ? !a.modelValue : Array.isArray(a.modelValue) && typeof e != "boolean" ? a.modelValue.includes(e) ? a.modelValue.filter((l) => l !== e) : [...a.modelValue, e] : [e];
66
+ }
67
+ function f(e) {
68
+ const l = _(e);
69
+ r("update:model-value", l), r("change", l);
70
+ }
71
+ const c = N();
72
+ function C(e) {
73
+ var l;
74
+ (l = c.value) == null || l.dispatchEvent(new Event("blur")), r("blur", e);
75
+ }
76
+ function S(e) {
77
+ var l;
78
+ (l = c.value) == null || l.dispatchEvent(new Event("focus")), r("focus", e);
79
+ }
80
+ return (e, l) => (x(), b("label", {
81
+ for: s(d),
82
+ class: n(["m-checkbox m-reset-css", [{ "--disabled": e.disabled, "--error": e.error, "--warning": e.warning, "--success": e.success }, a.class]]),
83
+ tabindex: "0",
84
+ style: t([e.style, { "--checkbox-selected-color": w.value, "--checkbox-box-shadow-color": v.value }]),
85
+ role: "checkbox",
86
+ "aria-checked": m.value,
87
+ onKeydown: B,
88
+ onBlur: C,
89
+ onFocus: S
90
+ }, [
91
+ u("input", $({
92
+ id: s(d),
93
+ ref_key: "inputRef",
94
+ ref: c,
95
+ checked: m.value
96
+ }, e.$attrs, {
97
+ tabindex: "-1",
98
+ disabled: e.disabled,
99
+ name: e.name,
100
+ type: "checkbox",
101
+ onChange: l[0] || (l[0] = (p) => {
102
+ var h;
103
+ return f(e.value ?? ((h = p == null ? void 0 : p.target) == null ? void 0 : h.checked));
104
+ })
105
+ }), null, 16, H),
106
+ u(
107
+ "span",
108
+ {
109
+ style: t({ width: i.value, height: i.value })
110
+ },
111
+ [
112
+ A(s(T), {
113
+ class: n(["check-icon", k.value]),
114
+ style: t({ color: V.value })
115
+ }, null, 8, ["class", "style"])
116
+ ],
117
+ 4
118
+ /* STYLE */
119
+ ),
120
+ u("div", J, [
121
+ I(e.$slots, "default", { value: e.value }, () => [
122
+ K(
123
+ y(e.label),
124
+ 1
125
+ /* TEXT */
126
+ )
127
+ ], !0),
128
+ e.hint ? (x(), b(
129
+ "span",
130
+ {
131
+ key: 0,
132
+ class: n(["m-checkbox__hint", {
133
+ "--error": e.error,
134
+ "--success": e.success,
135
+ "--warning": e.warning
136
+ }]),
137
+ style: t({ boxShadow: `0 0 0 0.125rem ${v.value}` })
138
+ },
139
+ y(e.hint),
140
+ 7
141
+ /* TEXT, CLASS, STYLE */
142
+ )) : D("v-if", !0)
143
+ ])
144
+ ], 46, F));
145
+ }
146
+ }), L = /* @__PURE__ */ M(R, [["__scopeId", "data-v-66c21eaf"]]);
147
+ export {
148
+ L as default
149
+ };
@@ -0,0 +1,103 @@
1
+ import { defineComponent as z, ref as f, computed as m, onMounted as x, createElementBlock as L, createCommentVNode as k, watchEffect as T, openBlock as H, mergeProps as N, nextTick as $ } from "vue";
2
+ import { N as C } from "./MazPhoneNumberInput-Cz50Ts4U.js";
3
+ const P = ["innerHTML"], G = /* @__PURE__ */ z({
4
+ __name: "MazIcon",
5
+ props: {
6
+ /** The source path of the SVG file - e.g: `/icons/home.svg` */
7
+ src: { type: String, default: void 0 },
8
+ /** The path of the folder where the SVG files are stored - e.g: `/icons` */
9
+ path: { type: String, default: void 0 },
10
+ /** The name of the SVG file - e.g: `home` */
11
+ name: { type: String, default: void 0 },
12
+ /** The size of the SVG file - e.g: `1em` */
13
+ size: { type: String, default: void 0 },
14
+ /** The title of the SVG file - e.g: `Home` */
15
+ title: { type: String, default: void 0 },
16
+ /** The function to transform the source of the SVG file - e.g: `(svg) => svg` */
17
+ transformSource: {
18
+ type: Function,
19
+ default: (l) => l
20
+ }
21
+ },
22
+ emits: ["loaded", "unloaded", "error"],
23
+ setup(l, { emit: v }) {
24
+ const o = l, i = v, u = {}, s = f(), c = f();
25
+ function p() {
26
+ try {
27
+ return C("mazIconPath");
28
+ } catch {
29
+ return;
30
+ }
31
+ }
32
+ const d = m(() => o.path ?? p()), g = m(() => o.src ? o.src : d.value ? `${d.value}/${o.name}.svg` : `/${o.name}.svg`);
33
+ x(() => {
34
+ !o.name && !o.src && console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop');
35
+ });
36
+ function y(e, r) {
37
+ const t = e.querySelectorAll("title");
38
+ if (t.length > 0)
39
+ t[0].textContent = r;
40
+ else {
41
+ const n = document.createElementNS("http://www.w3.org/2000/svg", "title");
42
+ n.textContent = r, e.append(n);
43
+ }
44
+ }
45
+ function h(e) {
46
+ return Object.keys(e).reduce((r, t) => (e[t] !== !1 && e[t] !== null && e[t] !== void 0 && (r[t] = e[t]), r), {});
47
+ }
48
+ function S(e) {
49
+ const r = {}, t = e.attributes;
50
+ if (!t)
51
+ return r;
52
+ for (let n = t.length - 1; n >= 0; n--)
53
+ r[t[n].name] = t[n].value;
54
+ return r;
55
+ }
56
+ function w(e) {
57
+ e.cloneNode(!0);
58
+ const r = o.transformSource(e);
59
+ return o.title && y(r, o.title), e.innerHTML;
60
+ }
61
+ async function E(e) {
62
+ u[e] || (u[e] = M(e));
63
+ try {
64
+ s.value = await u[e], await $(), i("loaded", c.value);
65
+ } catch (r) {
66
+ s.value && (s.value = void 0, i("unloaded")), delete u[e], i("error", r);
67
+ }
68
+ }
69
+ function M(e) {
70
+ return new Promise((r, t) => {
71
+ const n = new XMLHttpRequest();
72
+ n.open("GET", e, !0), n.addEventListener("load", () => {
73
+ if (n.status >= 200 && n.status < 400)
74
+ try {
75
+ let a = new DOMParser().parseFromString(n.responseText, "text/xml").querySelectorAll("svg")[0];
76
+ a ? (a = o.transformSource(a), r(a)) : t(new Error('Loaded file is not valid SVG"'));
77
+ } catch (a) {
78
+ t(a);
79
+ }
80
+ else
81
+ t(new Error("Error loading SVG"));
82
+ }), n.addEventListener("error", (a) => t(a)), n.send();
83
+ });
84
+ }
85
+ return T(() => E(g.value)), (e, r) => s.value ? (H(), L("svg", N({
86
+ key: 0,
87
+ ref_key: "svgElem",
88
+ ref: c,
89
+ class: "m-icon m-reset-css",
90
+ width: "1em",
91
+ height: "1em"
92
+ }, {
93
+ ...S(s.value),
94
+ ...h(e.$attrs)
95
+ }, {
96
+ style: `font-size: ${l.size}`,
97
+ innerHTML: w(s.value)
98
+ }), null, 16, P)) : k("v-if", !0);
99
+ }
100
+ });
101
+ export {
102
+ G as default
103
+ };