@stachelock/ui 0.6.2 → 0.6.4

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 (39) hide show
  1. package/dist/AvatarIcon-kcEI0AWe.js +4 -0
  2. package/dist/AvatarImage-YFR2etb8.js +4 -0
  3. package/dist/AvatarInitials-B7wCnBX9.js +4 -0
  4. package/dist/ImageDropzoneInput.vue_vue_type_script_setup_true_lang-7JWDfxD2.js +393 -0
  5. package/dist/index.js +1988 -1975
  6. package/dist/inputs/AddressInput.d.ts +1 -0
  7. package/dist/inputs/AddressInput.js +639 -0
  8. package/dist/inputs/ImageDropzoneInput.d.ts +1 -0
  9. package/dist/inputs/ImageDropzoneInput.js +4 -0
  10. package/dist/src/components/avatars/AvatarIcon.d.ts +18 -0
  11. package/dist/src/components/avatars/AvatarImage.d.ts +25 -0
  12. package/dist/src/components/avatars/AvatarInitials.d.ts +15 -0
  13. package/dist/src/components/avatars/AvatarWithText.d.ts +129 -0
  14. package/dist/src/components/avatars/index.d.ts +4 -0
  15. package/dist/src/components/formatters/DateFormatter.d.ts +119 -0
  16. package/dist/src/components/formatters/DateRangeFormatter.d.ts +63 -0
  17. package/dist/src/components/formatters/index.d.ts +2 -0
  18. package/dist/src/components/icons/brands/DiscordBrandIcon.d.ts +2 -0
  19. package/dist/src/components/icons/brands/FacebookBrandIcon.d.ts +2 -0
  20. package/dist/src/components/icons/brands/GitHubBrandIcon.d.ts +2 -0
  21. package/dist/src/components/icons/brands/InstagramBrandIcon.d.ts +2 -0
  22. package/dist/src/components/icons/brands/LinkedInBrandIcon.d.ts +2 -0
  23. package/dist/src/components/icons/brands/PinterestBrandIcon.d.ts +2 -0
  24. package/dist/src/components/icons/brands/SnapchatBrandIcon.d.ts +2 -0
  25. package/dist/src/components/icons/brands/ThreadsBrandIcon.d.ts +2 -0
  26. package/dist/src/components/icons/brands/TikTokBrandIcon.d.ts +2 -0
  27. package/dist/src/components/icons/brands/TwitchBrandIcon.d.ts +2 -0
  28. package/dist/src/components/icons/brands/XBrandIcon.d.ts +2 -0
  29. package/dist/src/components/icons/brands/YouTubeBrandIcon.d.ts +2 -0
  30. package/dist/src/components/icons/brands/index.d.ts +12 -0
  31. package/dist/src/components/icons/index.d.ts +1 -0
  32. package/dist/src/components/index.d.ts +3 -0
  33. package/dist/src/components/inputs/DatepickerInput.d.ts +5 -5
  34. package/dist/src/components/inputs/ImageDropzoneInput.d.ts +326 -0
  35. package/dist/src/components/inputs/index.d.ts +1 -0
  36. package/dist/src/components/wrappers/BackgroundGradientWrapper.d.ts +1 -1
  37. package/dist/style.css +1 -1
  38. package/dist/ui.css +1 -1
  39. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,639 @@
1
+ import { defineComponent as me, inject as ye, onMounted as pe, ref as S, reactive as ve, computed as T, watch as be, createElementBlock as A, openBlock as p, createVNode as m, unref as g, withCtx as k, createElementVNode as y, createCommentVNode as L, normalizeClass as w, createBlock as U, Fragment as he, renderList as xe, toDisplayString as R, resolveDynamicComponent as ke, createTextVNode as Z } from "vue";
2
+ import { Combobox as we, ComboboxInput as Ce, ComboboxButton as Ie, TransitionRoot as H, ComboboxOptions as Se, ComboboxOption as Ae } from "@headlessui/vue";
3
+ import { LockClosedIcon as ze, MagnifyingGlassIcon as Ke, CheckIcon as Ge, ChevronDownIcon as Me, ChevronUpIcon as Te } from "@heroicons/vue/20/solid";
4
+ import { ClockIcon as W, ExclamationCircleIcon as Ue, CheckCircleIcon as $e } from "@heroicons/vue/24/outline";
5
+ import { useField as Ee } from "vee-validate";
6
+ import { debounce as Q } from "lodash-es";
7
+ import Oe from "../forms/FormFieldWrapper.js";
8
+ import z from "./TextInput.js";
9
+ import { g as Pe } from "../id-DafBB_QF.js";
10
+ import { Loader as Le } from "@googlemaps/js-api-loader";
11
+ import { _ as Re } from "../_plugin-vue_export-helper-CHgC5LLL.js";
12
+ let v = null, M = null, $ = null, K = null, N = !1;
13
+ const G = /* @__PURE__ */ new Map(), Ne = 1e3, Fe = 1e3 * 60 * 60 * 24;
14
+ function Be(e) {
15
+ v = e, N = !1, K = null, $ = null, M = null;
16
+ }
17
+ function De() {
18
+ return v !== null && !!v.apiKey;
19
+ }
20
+ async function F() {
21
+ if (!N) {
22
+ if (K)
23
+ return K;
24
+ if (!v?.apiKey)
25
+ throw new Error(
26
+ '[Geocoding] API key not configured. Call configureGeocoding({ apiKey: "..." }) first, or configure via StachelockUI plugin with googleMaps.apiKey option.'
27
+ );
28
+ return K = (async () => {
29
+ try {
30
+ await new Le({
31
+ apiKey: v.apiKey,
32
+ version: v.version || "weekly",
33
+ id: "__stachelockGoogleMapsScriptId",
34
+ libraries: v.libraries || ["places", "maps", "geometry"]
35
+ }).load(), $ = await google.maps.importLibrary("places"), M = new google.maps.Geocoder(), N = !0;
36
+ } catch (e) {
37
+ throw K = null, console.error("[Geocoding] Error loading Google Maps API:", e), e;
38
+ }
39
+ })(), K;
40
+ }
41
+ }
42
+ function X(e) {
43
+ return e.trim().toLowerCase().replace(/\s+/g, " ");
44
+ }
45
+ function J(e) {
46
+ return typeof e == "string" ? `str:${X(e)}` : `pid:${e.placeId}`;
47
+ }
48
+ function Y(e) {
49
+ const o = G.get(e);
50
+ return o ? Date.now() - o.ts > Fe ? (G.delete(e), null) : o.result : null;
51
+ }
52
+ function q(e, o) {
53
+ try {
54
+ if (G.size >= Ne) {
55
+ const c = G.keys().next().value;
56
+ c && G.delete(c);
57
+ }
58
+ G.set(e, { result: o, ts: Date.now() });
59
+ } catch {
60
+ }
61
+ }
62
+ function ee(e, o = 15, c = "200x200") {
63
+ if (!v?.apiKey) return "";
64
+ const i = v.staticMapsApiKey || v.apiKey, r = "https://maps.googleapis.com/maps/api/staticmap", d = new URLSearchParams({
65
+ center: `${e.lat},${e.lng}`,
66
+ zoom: o.toString(),
67
+ size: c,
68
+ key: i,
69
+ markers: `color:red|${e.lat},${e.lng}`
70
+ });
71
+ return `${r}?${d.toString()}`;
72
+ }
73
+ async function Ve(e) {
74
+ if (!e?.trim())
75
+ return {
76
+ status: "INVALID_INPUT",
77
+ message: "No placeId provided for geocoding."
78
+ };
79
+ await F();
80
+ const o = J({ placeId: e }), c = Y(o);
81
+ return c || new Promise((i) => {
82
+ if (!M) {
83
+ i({
84
+ status: "ERROR",
85
+ message: "Geocoder service not initialized."
86
+ });
87
+ return;
88
+ }
89
+ M.geocode({ placeId: e }, (r, d) => {
90
+ if (d === google.maps.GeocoderStatus.OK && r && r.length > 0) {
91
+ const u = r[0], n = u.geometry ? {
92
+ lat: u.geometry.location.lat(),
93
+ lng: u.geometry.location.lng()
94
+ } : void 0, h = {
95
+ status: "OK",
96
+ message: "Found address",
97
+ address_components: u.address_components || [],
98
+ location: n,
99
+ formatted_address: u.formatted_address || "",
100
+ thumbnailUrl: n ? ee(n) : void 0
101
+ };
102
+ q(o, h), i(h);
103
+ } else
104
+ i({
105
+ status: d.toString(),
106
+ message: `Unable to geocode place: ${d}`
107
+ });
108
+ });
109
+ });
110
+ }
111
+ function _e(e) {
112
+ const o = X(e);
113
+ if (o.length < 10) return !1;
114
+ const c = /\d/.test(o), i = o.includes(","), r = /\b([A-Z]{2})\b/i.test(e), d = /\b\d{5}(?:-\d{4})?\b/.test(o);
115
+ return (i || r || d) && c;
116
+ }
117
+ async function je(e) {
118
+ if (!e?.trim())
119
+ return {
120
+ status: "INVALID_INPUT",
121
+ message: "No address provided for geocoding."
122
+ };
123
+ if (!_e(e))
124
+ return {
125
+ status: "INVALID_INPUT",
126
+ message: "Insufficient address information for geocoding."
127
+ };
128
+ await F();
129
+ const o = J(e), c = Y(o);
130
+ return c || new Promise((i) => {
131
+ if (!M) {
132
+ i({
133
+ status: "ERROR",
134
+ message: "Geocoder service not initialized."
135
+ });
136
+ return;
137
+ }
138
+ M.geocode({ address: e }, (r, d) => {
139
+ if (d === google.maps.GeocoderStatus.OK && r && r.length > 0) {
140
+ const u = r[0], n = u.geometry ? {
141
+ lat: u.geometry.location.lat(),
142
+ lng: u.geometry.location.lng()
143
+ } : void 0, h = {
144
+ status: "OK",
145
+ message: "Found address",
146
+ address_components: u.address_components || [],
147
+ location: n,
148
+ formatted_address: u.formatted_address || "",
149
+ thumbnailUrl: n ? ee(n) : void 0
150
+ };
151
+ q(o, h), i(h);
152
+ } else
153
+ i({
154
+ status: d.toString(),
155
+ message: `Unable to geocode address: ${d}`
156
+ });
157
+ });
158
+ });
159
+ }
160
+ async function Ze(e, o) {
161
+ if (!e?.trim())
162
+ return [];
163
+ if (await F(), !$)
164
+ return console.warn("[Geocoding] Places library not initialized"), [];
165
+ try {
166
+ const { AutocompleteSuggestion: c } = $, i = {
167
+ input: e,
168
+ ...o?.includedPrimaryTypes && { includedPrimaryTypes: o.includedPrimaryTypes },
169
+ ...o?.includedRegionCodes && { includedRegionCodes: o.includedRegionCodes }
170
+ }, { suggestions: r } = await c.fetchAutocompleteSuggestions(i);
171
+ return r.filter(
172
+ (u) => u.placePrediction !== null
173
+ ).map((u) => {
174
+ const n = u.placePrediction;
175
+ return {
176
+ placeId: n.placeId,
177
+ description: n.text.toString(),
178
+ mainText: n.mainText?.toString() || n.text.toString(),
179
+ secondaryText: n.secondaryText?.toString() || "",
180
+ types: n.types || []
181
+ };
182
+ });
183
+ } catch (c) {
184
+ return console.error("[Geocoding] Error fetching autocomplete suggestions:", c), [];
185
+ }
186
+ }
187
+ function He(e) {
188
+ const o = {
189
+ street: "",
190
+ city: "",
191
+ state: "",
192
+ zipcode: "",
193
+ country: ""
194
+ };
195
+ if (!e?.address_components)
196
+ return o;
197
+ let c = "", i = "";
198
+ for (const r of e.address_components) {
199
+ const d = r.types;
200
+ d.includes("street_number") ? c = r.long_name : d.includes("route") ? i = r.long_name : d.includes("locality") ? o.city = r.long_name : d.includes("administrative_area_level_1") ? o.state = r.short_name : d.includes("postal_code") ? o.zipcode = r.long_name : d.includes("country") && (o.country = r.short_name);
201
+ }
202
+ return o.street = [c, i].filter(Boolean).join(" "), o;
203
+ }
204
+ function We(e) {
205
+ return [
206
+ e.street,
207
+ e.city,
208
+ e.state && e.zipcode ? `${e.state} ${e.zipcode}` : e.state || e.zipcode,
209
+ e.country
210
+ ].filter(Boolean).join(", ");
211
+ }
212
+ const Qe = { class: "sl-address-input" }, Xe = { class: "sl-space-y-3" }, Je = { class: "sl-relative" }, Ye = { class: "sl-flex sl-flex-col" }, qe = {
213
+ key: 0,
214
+ class: "sl-flex sl-items-center sl-justify-between"
215
+ }, et = { class: "sl-flex sl-items-center sl-gap-2" }, tt = { class: "sl-grid sl-grid-cols-1 sm:sl-grid-cols-2 sl-gap-3 sl-p-3 sl-bg-gray-50 dark:sl-bg-slate-800/50 sl-rounded-lg sl-border sl-border-gray-200 dark:sl-border-slate-700" }, st = { class: "sm:sl-col-span-2" }, lt = /* @__PURE__ */ me({
216
+ __name: "AddressInput",
217
+ props: {
218
+ name: {},
219
+ modelValue: {},
220
+ label: { default: "" },
221
+ placeholder: { default: "Search for an address..." },
222
+ disabled: { type: Boolean, default: !1 },
223
+ rules: {},
224
+ showSuggestionCount: { type: Boolean, default: !1 },
225
+ allowManualEntry: { type: Boolean, default: !0 },
226
+ successMessage: { default: "" },
227
+ tertiaryLabel: { default: "" },
228
+ validateOnMount: { type: Boolean, default: !1 }
229
+ },
230
+ emits: ["update:modelValue", "blur", "focus"],
231
+ setup(e, { expose: o, emit: c }) {
232
+ const i = e, r = c, d = Pe(i.name || "address-input"), u = ye("googleMaps", void 0);
233
+ pe(() => {
234
+ u?.apiKey && !De() && Be({
235
+ apiKey: u.apiKey,
236
+ version: u.version,
237
+ libraries: u.libraries
238
+ });
239
+ });
240
+ const { value: n, errorMessage: h, meta: E, handleChange: O, setTouched: te } = Ee(
241
+ () => i.name,
242
+ i.rules,
243
+ {
244
+ validateOnMount: i.validateOnMount,
245
+ initialValue: i.modelValue
246
+ }
247
+ ), b = S([]), P = S(null), B = S(""), C = S(!1), D = S(!1), f = S("unverified"), s = ve({
248
+ street: "",
249
+ suite: "",
250
+ city: "",
251
+ state: "",
252
+ zipcode: "",
253
+ country: ""
254
+ }), V = T(() => !!(n.value?.formattedAddress || n.value?.street)), se = T(() => i.showSuggestionCount && b.value.length > 0 ? `${b.value.length} suggestions` : i.tertiaryLabel), _ = T(() => {
255
+ switch (f.value) {
256
+ case "verified":
257
+ return "sl-text-green-600 dark:sl-text-green-400";
258
+ case "error":
259
+ return "sl-text-red-600 dark:sl-text-red-400";
260
+ case "pending":
261
+ return "sl-text-yellow-600 dark:sl-text-yellow-400";
262
+ default:
263
+ return "sl-text-gray-500 dark:sl-text-slate-400";
264
+ }
265
+ }), le = T(() => {
266
+ switch (f.value) {
267
+ case "verified":
268
+ return "Verified";
269
+ case "error":
270
+ return "Not verified";
271
+ case "pending":
272
+ return "Verifying...";
273
+ default:
274
+ return "Unverified";
275
+ }
276
+ }), ae = T(() => {
277
+ switch (f.value) {
278
+ case "verified":
279
+ return $e;
280
+ case "error":
281
+ return Ue;
282
+ case "pending":
283
+ return W;
284
+ default:
285
+ return W;
286
+ }
287
+ }), oe = Q(async (l) => {
288
+ if (!l || l.length < 3) {
289
+ b.value = [];
290
+ return;
291
+ }
292
+ D.value = !0;
293
+ try {
294
+ const t = await Ze(l);
295
+ b.value = t;
296
+ } catch (t) {
297
+ console.error("[AddressInput] Error fetching suggestions:", t), b.value = [];
298
+ } finally {
299
+ D.value = !1;
300
+ }
301
+ }, 300);
302
+ function re(l) {
303
+ const t = l.target;
304
+ B.value = t.value, oe(t.value);
305
+ }
306
+ function ne(l) {
307
+ return l ? l.description : n.value?.formattedAddress ? n.value.formattedAddress : "";
308
+ }
309
+ async function ie(l) {
310
+ if (l) {
311
+ f.value = "pending", b.value = [];
312
+ try {
313
+ const t = await Ve(l.placeId);
314
+ if (t.status === "OK") {
315
+ f.value = "verified";
316
+ const a = He(t);
317
+ s.street = a.street, s.city = a.city, s.state = a.state, s.zipcode = a.zipcode, s.country = a.country;
318
+ const x = {
319
+ formattedAddress: t.formatted_address,
320
+ street: a.street,
321
+ suite: s.suite,
322
+ city: a.city,
323
+ state: a.state,
324
+ zipcode: a.zipcode,
325
+ country: a.country,
326
+ geocode: t,
327
+ placeId: l.placeId
328
+ };
329
+ n.value = x, O(x), r("update:modelValue", x), C.value = !0;
330
+ } else
331
+ f.value = "error", console.warn("[AddressInput] Geocoding failed:", t.message);
332
+ } catch (t) {
333
+ f.value = "error", console.error("[AddressInput] Geocoding error:", t);
334
+ }
335
+ }
336
+ }
337
+ const de = ["street", "city", "state", "zipcode", "country"], ce = Q(async () => {
338
+ const l = We(s);
339
+ if (!l || l.length < 10) {
340
+ f.value = "unverified";
341
+ return;
342
+ }
343
+ f.value = "pending";
344
+ try {
345
+ const t = await je(l);
346
+ if (t.status === "OK") {
347
+ f.value = "verified";
348
+ const a = {
349
+ formattedAddress: t.formatted_address,
350
+ street: s.street,
351
+ suite: s.suite,
352
+ city: s.city,
353
+ state: s.state,
354
+ zipcode: s.zipcode,
355
+ country: s.country,
356
+ geocode: t,
357
+ placeId: void 0
358
+ // Clear placeId since we re-geocoded
359
+ };
360
+ n.value = a, O(a), r("update:modelValue", a);
361
+ } else
362
+ f.value = "unverified";
363
+ } catch (t) {
364
+ f.value = "error", console.error("[AddressInput] Re-geocoding error:", t);
365
+ }
366
+ }, 600);
367
+ function I(l) {
368
+ const t = {
369
+ ...n.value,
370
+ street: s.street,
371
+ suite: s.suite,
372
+ city: s.city,
373
+ state: s.state,
374
+ zipcode: s.zipcode,
375
+ country: s.country
376
+ };
377
+ de.includes(l) && (f.value = "unverified", t.geocode = void 0, ce()), n.value = t, O(t), r("update:modelValue", t);
378
+ }
379
+ function ue(l) {
380
+ r("focus", l);
381
+ }
382
+ function fe(l) {
383
+ te(!0), r("blur", l);
384
+ }
385
+ be(
386
+ () => i.modelValue,
387
+ (l) => {
388
+ l && (l.geocode?.status === "OK" ? f.value = "verified" : l.geocode?.status === "ERROR" && (f.value = "error"), l !== n.value && (n.value = l, l.street !== void 0 && (s.street = l.street), l.suite !== void 0 && (s.suite = l.suite), l.city !== void 0 && (s.city = l.city), l.state !== void 0 && (s.state = l.state), l.zipcode !== void 0 && (s.zipcode = l.zipcode), l.country !== void 0 && (s.country = l.country)));
389
+ },
390
+ { immediate: !0, deep: !0 }
391
+ );
392
+ function ge() {
393
+ n.value = void 0, P.value = null, B.value = "", b.value = [], C.value = !1, f.value = "unverified", s.street = "", s.suite = "", s.city = "", s.state = "", s.zipcode = "", s.country = "";
394
+ }
395
+ return o({
396
+ resetInput: ge,
397
+ geocodeStatus: f,
398
+ meta: E,
399
+ errorMessage: h
400
+ }), (l, t) => (p(), A("div", Qe, [
401
+ m(Oe, {
402
+ id: g(d),
403
+ name: e.name,
404
+ label: e.label,
405
+ "tertiary-label": se.value,
406
+ "error-message": g(h),
407
+ "success-message": e.successMessage,
408
+ "is-valid": g(E).valid,
409
+ "is-touched": g(E).touched,
410
+ disabled: e.disabled
411
+ }, {
412
+ default: k(() => [
413
+ y("div", Xe, [
414
+ m(g(we), {
415
+ modelValue: P.value,
416
+ "onUpdate:modelValue": [
417
+ t[0] || (t[0] = (a) => P.value = a),
418
+ ie
419
+ ],
420
+ disabled: e.disabled,
421
+ nullable: ""
422
+ }, {
423
+ default: k(() => [
424
+ y("div", Je, [
425
+ m(g(Ce), {
426
+ id: g(d),
427
+ "display-value": ne,
428
+ placeholder: e.placeholder || "Search for an address...",
429
+ disabled: e.disabled,
430
+ class: w([
431
+ "sl-block sl-w-full sl-rounded-lg sl-border sl-py-2.5 sl-pl-3 sl-pr-10 sl-text-sm focus:sl-outline-none",
432
+ e.disabled ? "sl-border-gray-200 dark:sl-border-slate-700 sl-bg-gray-50 dark:sl-bg-slate-800 sl-text-gray-500 dark:sl-text-slate-400 sl-cursor-not-allowed" : "sl-border-gray-300 dark:sl-border-slate-600 sl-bg-white dark:sl-bg-slate-900 sl-text-gray-900 dark:sl-text-slate-100 placeholder:sl-text-gray-400 dark:placeholder:sl-text-slate-500 focus:sl-border-stachelock-500 focus:sl-ring-2 focus:sl-ring-stachelock-500"
433
+ ]),
434
+ onChange: re,
435
+ onFocus: ue,
436
+ onBlur: fe
437
+ }, null, 8, ["id", "placeholder", "disabled", "class"]),
438
+ m(g(Ie), { class: "sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-2" }, {
439
+ default: k(() => [
440
+ e.disabled ? (p(), U(g(ze), {
441
+ key: 0,
442
+ class: "sl-h-5 sl-w-5 sl-text-gray-400 dark:sl-text-slate-500",
443
+ "aria-hidden": "true"
444
+ })) : (p(), U(g(Ke), {
445
+ key: 1,
446
+ class: "sl-h-5 sl-w-5 sl-text-gray-400 dark:sl-text-slate-400",
447
+ "aria-hidden": "true"
448
+ }))
449
+ ]),
450
+ _: 1
451
+ }),
452
+ m(g(H), {
453
+ leave: "sl-transition sl-ease-in sl-duration-100",
454
+ "leave-from": "sl-opacity-100",
455
+ "leave-to": "sl-opacity-0"
456
+ }, {
457
+ default: k(() => [
458
+ b.value.length > 0 ? (p(), U(g(Se), {
459
+ key: 0,
460
+ class: "sl-absolute sl-z-50 sl-mt-1 sl-max-h-60 sl-w-full sl-overflow-auto sl-rounded-md sl-bg-white dark:sl-bg-slate-800 sl-py-1 sl-text-base sl-shadow-lg dark:sl-shadow-slate-900/50 sl-ring-1 sl-ring-black sl-ring-opacity-5 dark:sl-ring-slate-700 focus:sl-outline-none sm:sl-text-sm"
461
+ }, {
462
+ default: k(() => [
463
+ (p(!0), A(he, null, xe(b.value, (a) => (p(), U(g(Ae), {
464
+ key: a.placeId,
465
+ value: a,
466
+ as: "template"
467
+ }, {
468
+ default: k(({ active: x, selected: j }) => [
469
+ y("li", {
470
+ class: w([
471
+ "sl-relative sl-cursor-pointer sl-select-none sl-py-2 sl-pl-10 sl-pr-4",
472
+ x ? "sl-bg-stachelock-600 sl-text-white" : "sl-text-gray-900 dark:sl-text-slate-200"
473
+ ])
474
+ }, [
475
+ y("div", Ye, [
476
+ y("span", {
477
+ class: w(["sl-block sl-truncate", j ? "sl-font-medium" : "sl-font-normal"])
478
+ }, R(a.mainText), 3),
479
+ y("span", {
480
+ class: w(["sl-text-xs", x ? "sl-text-stachelock-100" : "sl-text-gray-500 dark:sl-text-slate-400"])
481
+ }, R(a.secondaryText), 3)
482
+ ]),
483
+ j ? (p(), A("span", {
484
+ key: 0,
485
+ class: w([
486
+ "sl-absolute sl-inset-y-0 sl-left-0 sl-flex sl-items-center sl-pl-3",
487
+ x ? "sl-text-white" : "sl-text-stachelock-600 dark:sl-text-stachelock-400"
488
+ ])
489
+ }, [
490
+ m(g(Ge), {
491
+ class: "sl-h-5 sl-w-5",
492
+ "aria-hidden": "true"
493
+ })
494
+ ], 2)) : L("", !0)
495
+ ], 2)
496
+ ]),
497
+ _: 2
498
+ }, 1032, ["value"]))), 128))
499
+ ]),
500
+ _: 1
501
+ })) : L("", !0)
502
+ ]),
503
+ _: 1
504
+ })
505
+ ])
506
+ ]),
507
+ _: 1
508
+ }, 8, ["modelValue", "disabled"]),
509
+ V.value && !e.disabled ? (p(), A("div", qe, [
510
+ y("div", et, [
511
+ y("span", {
512
+ class: w(["sl-text-xs sl-uppercase sl-font-medium", _.value])
513
+ }, R(le.value), 3),
514
+ (p(), U(ke(ae.value), {
515
+ class: w(["sl-h-4 sl-w-4", _.value])
516
+ }, null, 8, ["class"]))
517
+ ]),
518
+ C.value ? (p(), A("button", {
519
+ key: 1,
520
+ type: "button",
521
+ onClick: t[2] || (t[2] = (a) => C.value = !1),
522
+ class: "sl-text-xs sl-text-gray-500 dark:sl-text-slate-400 hover:sl-underline sl-flex sl-items-center sl-gap-1"
523
+ }, [
524
+ t[10] || (t[10] = Z(" Collapse ", -1)),
525
+ m(g(Te), { class: "sl-h-3 sl-w-3" })
526
+ ])) : (p(), A("button", {
527
+ key: 0,
528
+ type: "button",
529
+ onClick: t[1] || (t[1] = (a) => C.value = !0),
530
+ class: "sl-text-xs sl-text-stachelock-600 dark:sl-text-stachelock-400 hover:sl-underline sl-flex sl-items-center sl-gap-1"
531
+ }, [
532
+ t[9] || (t[9] = Z(" Edit address ", -1)),
533
+ m(g(Me), { class: "sl-h-3 sl-w-3" })
534
+ ]))
535
+ ])) : L("", !0),
536
+ m(g(H), {
537
+ show: C.value && V.value && !e.disabled,
538
+ enter: "sl-transition sl-ease-out sl-duration-200",
539
+ "enter-from": "sl-opacity-0 sl-transform sl--translate-y-2",
540
+ "enter-to": "sl-opacity-100 sl-transform sl-translate-y-0",
541
+ leave: "sl-transition sl-ease-in sl-duration-150",
542
+ "leave-from": "sl-opacity-100 sl-transform sl-translate-y-0",
543
+ "leave-to": "sl-opacity-0 sl-transform sl--translate-y-2"
544
+ }, {
545
+ default: k(() => [
546
+ y("div", tt, [
547
+ y("div", st, [
548
+ m(z, {
549
+ name: `${e.name}_street`,
550
+ label: "Street Address",
551
+ value: s.street,
552
+ disabled: e.disabled,
553
+ "show-valid-check": !1,
554
+ "colorful-validation": !1,
555
+ "onUpdate:value": t[3] || (t[3] = (a) => {
556
+ s.street = a, I("street");
557
+ })
558
+ }, null, 8, ["name", "value", "disabled"])
559
+ ]),
560
+ y("div", null, [
561
+ m(z, {
562
+ name: `${e.name}_suite`,
563
+ label: "Suite / Apt",
564
+ value: s.suite,
565
+ disabled: e.disabled,
566
+ placeholder: "Optional",
567
+ "show-valid-check": !1,
568
+ "colorful-validation": !1,
569
+ "onUpdate:value": t[4] || (t[4] = (a) => {
570
+ s.suite = a, I("suite");
571
+ })
572
+ }, null, 8, ["name", "value", "disabled"])
573
+ ]),
574
+ y("div", null, [
575
+ m(z, {
576
+ name: `${e.name}_city`,
577
+ label: "City",
578
+ value: s.city,
579
+ disabled: e.disabled,
580
+ "show-valid-check": !1,
581
+ "colorful-validation": !1,
582
+ "onUpdate:value": t[5] || (t[5] = (a) => {
583
+ s.city = a, I("city");
584
+ })
585
+ }, null, 8, ["name", "value", "disabled"])
586
+ ]),
587
+ y("div", null, [
588
+ m(z, {
589
+ name: `${e.name}_state`,
590
+ label: "State",
591
+ value: s.state,
592
+ disabled: e.disabled,
593
+ "show-valid-check": !1,
594
+ "colorful-validation": !1,
595
+ "onUpdate:value": t[6] || (t[6] = (a) => {
596
+ s.state = a, I("state");
597
+ })
598
+ }, null, 8, ["name", "value", "disabled"])
599
+ ]),
600
+ y("div", null, [
601
+ m(z, {
602
+ name: `${e.name}_zipcode`,
603
+ label: "ZIP Code",
604
+ value: s.zipcode,
605
+ disabled: e.disabled,
606
+ "show-valid-check": !1,
607
+ "colorful-validation": !1,
608
+ "onUpdate:value": t[7] || (t[7] = (a) => {
609
+ s.zipcode = a, I("zipcode");
610
+ })
611
+ }, null, 8, ["name", "value", "disabled"])
612
+ ]),
613
+ y("div", null, [
614
+ m(z, {
615
+ name: `${e.name}_country`,
616
+ label: "Country",
617
+ value: s.country,
618
+ disabled: e.disabled,
619
+ "show-valid-check": !1,
620
+ "colorful-validation": !1,
621
+ "onUpdate:value": t[8] || (t[8] = (a) => {
622
+ s.country = a, I("country");
623
+ })
624
+ }, null, 8, ["name", "value", "disabled"])
625
+ ])
626
+ ])
627
+ ]),
628
+ _: 1
629
+ }, 8, ["show"])
630
+ ])
631
+ ]),
632
+ _: 1
633
+ }, 8, ["id", "name", "label", "tertiary-label", "error-message", "success-message", "is-valid", "is-touched", "disabled"])
634
+ ]));
635
+ }
636
+ }), yt = /* @__PURE__ */ Re(lt, [["__scopeId", "data-v-d65320d7"]]);
637
+ export {
638
+ yt as default
639
+ };
@@ -0,0 +1 @@
1
+ export {}
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "../ImageDropzoneInput.vue_vue_type_script_setup_true_lang-7JWDfxD2.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,18 @@
1
+ import { FunctionalComponent, HTMLAttributes, VNodeProps } from 'vue';
2
+ export type RoundedType = 'square' | 'rounded' | 'rounded-md' | 'rounded-lg' | 'rounded-full';
3
+ type __VLS_Props = {
4
+ /** Size of the avatar (Tailwind scale) */
5
+ size: number;
6
+ /** Background color class or CSS color */
7
+ color: string;
8
+ /** Fallback initials */
9
+ initials: string;
10
+ /** Vue component to render as icon */
11
+ iconComponent?: FunctionalComponent<HTMLAttributes & VNodeProps>;
12
+ /** Corner rounding style */
13
+ rounded?: RoundedType;
14
+ /** Additional classes for the icon */
15
+ classes?: string;
16
+ };
17
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
18
+ export default _default;