@nexxtmove/ui 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -184,6 +184,7 @@ declare interface NexxtSocialMediaTypeProps {
184
184
  variant: 'tiktok' | 'post' | 'reel' | 'story';
185
185
  chip?: string;
186
186
  selected?: boolean;
187
+ icons?: SocialPlatform[];
187
188
  }
188
189
 
189
190
  export declare const NexxtStepperHeader: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
@@ -196,4 +197,6 @@ declare interface NexxtStepperHeaderProps {
196
197
  backButtonAction: InstanceType<typeof NexxtHeader>['backButtonAction'];
197
198
  }
198
199
 
200
+ declare type SocialPlatform = 'tiktok' | 'facebook' | 'instagram' | 'linkedin' | 'x' | 'twitter' | 'google';
201
+
199
202
  export { }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, ref as H, computed as f, watch as E, createBlock as M, openBlock as e, TransitionGroup as T, withCtx as m, createElementBlock as l, Fragment as $, renderList as F, createVNode as v, Transition as z, toDisplayString as b, normalizeClass as c, createCommentVNode as p, renderSlot as x, createElementVNode as n, createTextVNode as k, watchEffect as N, normalizeStyle as Z, withKeys as S, withModifiers as C, createStaticVNode as w, mergeProps as j, resolveDynamicComponent as A, createSlots as D } from "vue";
1
+ import { defineComponent as u, ref as H, computed as f, watch as E, createBlock as M, openBlock as e, TransitionGroup as T, withCtx as b, createElementBlock as l, Fragment as $, renderList as F, createVNode as v, Transition as z, toDisplayString as g, normalizeClass as c, createCommentVNode as p, renderSlot as x, createElementVNode as i, createTextVNode as k, watchEffect as N, normalizeStyle as Z, withKeys as S, withModifiers as C, createStaticVNode as w, mergeProps as j, resolveDynamicComponent as A, createSlots as D } from "vue";
2
2
  const V = /* @__PURE__ */ u({
3
3
  __name: "AnimatedNumber",
4
4
  props: {
@@ -7,7 +7,7 @@ const V = /* @__PURE__ */ u({
7
7
  easing: { default: "ease-out" }
8
8
  },
9
9
  setup(t) {
10
- const a = H("up"), s = f(() => String(t.value).split("")), i = f(() => `duration-${t.duration}`);
10
+ const a = H("up"), n = f(() => String(t.value).split("")), r = f(() => `duration-${t.duration}`);
11
11
  return E(
12
12
  () => t.value,
13
13
  (d, h) => {
@@ -17,29 +17,29 @@ const V = /* @__PURE__ */ u({
17
17
  tag: "div",
18
18
  class: "relative flex shrink-0 items-center tabular-nums",
19
19
  "aria-label": t.value,
20
- "enter-active-class": `transition-all ${i.value} ${t.easing}`,
21
- "leave-active-class": `absolute transition-all ${i.value} ${t.easing}`,
20
+ "enter-active-class": `transition-all ${r.value} ${t.easing}`,
21
+ "leave-active-class": `absolute transition-all ${r.value} ${t.easing}`,
22
22
  "enter-from-class": a.value === "up" ? "translate-y-full opacity-0" : "-translate-y-full opacity-0",
23
23
  "leave-to-class": a.value === "up" ? "-translate-y-full opacity-0" : "translate-y-full opacity-0",
24
24
  "move-class": "transition-all duration-500 ease-in-out"
25
25
  }, {
26
- default: m(() => [
27
- (e(!0), l($, null, F(s.value, (g, r) => (e(), l("div", {
28
- key: r,
26
+ default: b(() => [
27
+ (e(!0), l($, null, F(n.value, (m, s) => (e(), l("div", {
28
+ key: s,
29
29
  class: "relative inline-flex h-[1.5em] w-[1ch] items-center justify-center overflow-hidden",
30
30
  "aria-hidden": "true"
31
31
  }, [
32
32
  v(z, {
33
- "enter-active-class": `transition-transform ${i.value} ${t.easing}`,
34
- "leave-active-class": `absolute inset-0 transition-transform ${i.value} ${t.easing}`,
33
+ "enter-active-class": `transition-transform ${r.value} ${t.easing}`,
34
+ "leave-active-class": `absolute inset-0 transition-transform ${r.value} ${t.easing}`,
35
35
  "enter-from-class": a.value === "up" ? "translate-y-full" : "-translate-y-full",
36
36
  "leave-to-class": a.value === "up" ? "-translate-y-full" : "translate-y-full"
37
37
  }, {
38
- default: m(() => [
38
+ default: b(() => [
39
39
  (e(), l("span", {
40
- key: g,
40
+ key: m,
41
41
  class: "flex h-full w-full items-center justify-center"
42
- }, b(g), 1))
42
+ }, g(m), 1))
43
43
  ]),
44
44
  _: 2
45
45
  }, 1032, ["enter-active-class", "leave-active-class", "enter-from-class", "leave-to-class"])
@@ -56,11 +56,11 @@ const V = /* @__PURE__ */ u({
56
56
  type: { default: "light" }
57
57
  },
58
58
  setup(t) {
59
- return (a, s) => (e(), l("i", {
59
+ return (a, n) => (e(), l("i", {
60
60
  class: c([`fa-${t.type}`, `fa-${t.name}`, "items-center", "justify-center"])
61
61
  }, null, 2));
62
62
  }
63
- }), P = ["type", "disabled", "data-variant"], I = {
63
+ }), I = ["type", "disabled", "data-variant"], P = {
64
64
  key: 0,
65
65
  class: /* @__PURE__ */ c(["absolute inset-0 flex items-center justify-center rounded-lg"])
66
66
  }, L = /* @__PURE__ */ u({
@@ -75,7 +75,7 @@ const V = /* @__PURE__ */ u({
75
75
  buttonType: { default: "button" }
76
76
  },
77
77
  setup(t) {
78
- return (a, s) => (e(), l("button", {
78
+ return (a, n) => (e(), l("button", {
79
79
  type: t.buttonType,
80
80
  disabled: t.disabled,
81
81
  class: c([
@@ -111,8 +111,8 @@ const V = /* @__PURE__ */ u({
111
111
  "leave-from-class": "opacity-100",
112
112
  "leave-to-class": "opacity-0"
113
113
  }, {
114
- default: m(() => [
115
- t.loading ? (e(), l("div", I, [
114
+ default: b(() => [
115
+ t.loading ? (e(), l("div", P, [
116
116
  v(y, {
117
117
  name: "spinner-third",
118
118
  type: "light",
@@ -122,7 +122,7 @@ const V = /* @__PURE__ */ u({
122
122
  ]),
123
123
  _: 1
124
124
  })
125
- ], 10, P));
125
+ ], 10, I));
126
126
  }
127
127
  }), q = { class: "justify-start text-center extra-small-semibold text-white" }, K = /* @__PURE__ */ u({
128
128
  name: "NexxtChip",
@@ -143,12 +143,12 @@ const V = /* @__PURE__ */ u({
143
143
  return "bg-cornflower-blue-600";
144
144
  }
145
145
  });
146
- return (s, i) => (e(), l("span", {
146
+ return (n, r) => (e(), l("span", {
147
147
  class: c(["inline-flex h-5 flex-col items-center justify-center gap-2.5 rounded-[200px] px-4", a.value])
148
148
  }, [
149
- n("span", q, [
150
- x(s.$slots, "default", {}, () => [
151
- i[0] || (i[0] = k("Chip", -1))
149
+ i("span", q, [
150
+ x(n.$slots, "default", {}, () => [
151
+ r[0] || (r[0] = k("Chip", -1))
152
152
  ])
153
153
  ])
154
154
  ], 2));
@@ -167,21 +167,21 @@ const V = /* @__PURE__ */ u({
167
167
  } }
168
168
  },
169
169
  setup(t) {
170
- return (a, s) => (e(), l("div", {
170
+ return (a, n) => (e(), l("div", {
171
171
  class: c(["header flex items-center", a.$slots.center ? "grid grid-cols-3" : ""])
172
172
  }, [
173
- n("div", R, [
173
+ i("div", R, [
174
174
  v(L, {
175
175
  class: "shrink-0",
176
176
  variant: "secondary",
177
177
  onClick: t.backButtonAction
178
178
  }, {
179
- default: m(() => [
180
- k(b(t.backButtonText), 1)
179
+ default: b(() => [
180
+ k(g(t.backButtonText), 1)
181
181
  ]),
182
182
  _: 1
183
183
  }, 8, ["onClick"]),
184
- n("span", G, b(t.title), 1)
184
+ i("span", G, g(t.title), 1)
185
185
  ]),
186
186
  a.$slots.center ? (e(), l("div", U, [
187
187
  x(a.$slots, "center")
@@ -204,9 +204,9 @@ const V = /* @__PURE__ */ u({
204
204
  name: "NexxtInfoBlock",
205
205
  __name: "InfoBlock",
206
206
  setup(t) {
207
- return (a, s) => (e(), l("div", J, [
208
- n("div", O, [
209
- n("div", Q, [
207
+ return (a, n) => (e(), l("div", J, [
208
+ i("div", O, [
209
+ i("div", Q, [
210
210
  v(y, {
211
211
  name: "thumbs-up",
212
212
  size: "lg",
@@ -214,10 +214,10 @@ const V = /* @__PURE__ */ u({
214
214
  })
215
215
  ])
216
216
  ]),
217
- n("div", W, [
218
- s[1] || (s[1] = n("span", { class: "mr-[0.7ch] body-semibold" }, "Tip!", -1)),
217
+ i("div", W, [
218
+ n[1] || (n[1] = i("span", { class: "mr-[0.7ch] body-semibold" }, "Tip!", -1)),
219
219
  x(a.$slots, "default", {}, () => [
220
- s[0] || (s[0] = n("span", null, "Koopwoningen doen het goed als post of reel: zo geef je de woning genoeg aandacht én vergroot je het bereik.", -1))
220
+ n[0] || (n[0] = i("span", null, "Koopwoningen doen het goed als post of reel: zo geef je de woning genoeg aandacht én vergroot je het bereik.", -1))
221
221
  ])
222
222
  ])
223
223
  ]));
@@ -230,7 +230,7 @@ const V = /* @__PURE__ */ u({
230
230
  key: 0,
231
231
  class: "flex justify-between @max-md:order-first @max-md:justify-center",
232
232
  "aria-label": "Progress steps"
233
- }, s1 = ["aria-current", "role", "tabindex", "aria-label", "onClick", "onKeydown"], n1 = /* @__PURE__ */ u({
233
+ }, n1 = ["aria-current", "role", "tabindex", "aria-label", "onClick", "onKeydown"], s1 = /* @__PURE__ */ u({
234
234
  name: "NexxtProgressBar",
235
235
  __name: "ProgressBar",
236
236
  props: {
@@ -241,37 +241,37 @@ const V = /* @__PURE__ */ u({
241
241
  },
242
242
  emits: ["update:currentStep"],
243
243
  setup(t) {
244
- const a = f(() => Math.min(Math.max(0, t.currentStep), Math.max(0, t.steps - 1))), s = f(() => t.steps > 0 ? a.value + 1 : 0), i = f(() => t.steps <= 1 ? t.steps === 1 ? 100 : 0 : a.value / (t.steps - 1) * 100), d = f(() => !!t.stepTitles?.length);
244
+ const a = f(() => Math.min(Math.max(0, t.currentStep), Math.max(0, t.steps - 1))), n = f(() => t.steps > 0 ? a.value + 1 : 0), r = f(() => t.steps <= 1 ? t.steps === 1 ? 100 : 0 : a.value / (t.steps - 1) * 100), d = f(() => !!t.stepTitles?.length);
245
245
  return N(() => {
246
246
  t.stepTitles && t.stepTitles.length !== t.steps && console.warn(
247
247
  `[NexxtProgressBar] The "stepTitles" array length (${t.stepTitles.length}) must match the "steps" prop (${t.steps}).`
248
248
  );
249
- }), (h, g) => (e(), l("div", Y, [
250
- n("div", _, [
251
- n("div", t1, [
252
- n("div", {
249
+ }), (h, m) => (e(), l("div", Y, [
250
+ i("div", _, [
251
+ i("div", t1, [
252
+ i("div", {
253
253
  class: "progress-bar progress-bar-bar h-2 w-full overflow-hidden rounded-full",
254
254
  role: "progressbar",
255
255
  "aria-label": t.progressLabel,
256
256
  "aria-valuemin": "0",
257
257
  "aria-valuemax": "100",
258
- "aria-valuenow": Math.round(i.value),
259
- "aria-valuetext": d.value && t.stepTitles?.[a.value] ? `Step ${s.value} of ${t.steps}: ${t.stepTitles[a.value]}` : `Step ${s.value} of ${t.steps}`
258
+ "aria-valuenow": Math.round(r.value),
259
+ "aria-valuetext": d.value && t.stepTitles?.[a.value] ? `Step ${n.value} of ${t.steps}: ${t.stepTitles[a.value]}` : `Step ${n.value} of ${t.steps}`
260
260
  }, [
261
- n("div", {
261
+ i("div", {
262
262
  class: "progress-bar-progress h-full transition-all duration-500 ease-out",
263
- style: Z({ width: `${i.value}%` }),
263
+ style: Z({ width: `${r.value}%` }),
264
264
  "aria-hidden": !0
265
265
  }, null, 4)
266
266
  ], 8, a1),
267
267
  d.value ? (e(), l("div", e1, [
268
- v(V, { value: s.value }, null, 8, ["value"]),
269
- n("span", null, "/" + b(t.steps), 1)
268
+ v(V, { value: n.value }, null, 8, ["value"]),
269
+ i("span", null, "/" + g(t.steps), 1)
270
270
  ])) : p("", !0)
271
271
  ]),
272
272
  d.value ? (e(), l("ol", l1, [
273
- (e(!0), l($, null, F(t.stepTitles, (r, o) => (e(), l("li", {
274
- key: r,
273
+ (e(!0), l($, null, F(t.stepTitles, (s, o) => (e(), l("li", {
274
+ key: s,
275
275
  class: c(["rounded-xs transition-colors duration-500 focus-visible:outline-3 @max-md:hidden @max-md:body-normal @min-md:small-normal", [
276
276
  o === a.value ? "text-sapphire-500 @max-md:inline" : "",
277
277
  o < a.value ? "cursor-pointer duration-200! hover:text-sapphire-400" : ""
@@ -279,13 +279,13 @@ const V = /* @__PURE__ */ u({
279
279
  "aria-current": o === a.value ? "step" : void 0,
280
280
  role: o < a.value ? "button" : void 0,
281
281
  tabindex: o < a.value ? 0 : void 0,
282
- "aria-label": o < a.value ? `Ga naar ${r}` : void 0,
282
+ "aria-label": o < a.value ? `Ga naar ${s}` : void 0,
283
283
  onClick: (B) => o < a.value && h.$emit("update:currentStep", o),
284
284
  onKeydown: [
285
285
  S((B) => o < a.value && h.$emit("update:currentStep", o), ["enter"]),
286
286
  S(C((B) => o < a.value && h.$emit("update:currentStep", o), ["prevent"]), ["space"])
287
287
  ]
288
- }, b(r), 43, s1))), 128))
288
+ }, g(s), 43, n1))), 128))
289
289
  ])) : p("", !0)
290
290
  ])
291
291
  ]));
@@ -305,14 +305,14 @@ const V = /* @__PURE__ */ u({
305
305
  tiktok: { type: Boolean }
306
306
  },
307
307
  setup(t) {
308
- const a = t, s = [
308
+ const a = t, n = [
309
309
  { name: "facebook", label: "Facebook", icon: "facebook-f" },
310
310
  { name: "instagram", label: "Instagram", icon: "instagram" },
311
311
  { name: "linkedin", label: "LinkedIn", icon: "linkedin-in" },
312
312
  { name: "x", label: "X (voorheen Twitter)", icon: "x-twitter" },
313
313
  { name: "google", label: "Google", icon: "google" },
314
314
  { name: "tiktok", label: "TikTok", icon: "tiktok" }
315
- ], i = {
315
+ ], r = {
316
316
  facebook: "bg-brands-facebook",
317
317
  instagram: "bg-brands-instagram",
318
318
  linkedin: "bg-brands-linkedin",
@@ -320,16 +320,16 @@ const V = /* @__PURE__ */ u({
320
320
  google: "bg-brands-google",
321
321
  tiktok: "bg-brands-tiktok"
322
322
  }, d = f(
323
- () => s.filter((h) => a[h.name])
323
+ () => n.filter((h) => a[h.name])
324
324
  );
325
- return (h, g) => (e(), l("ul", i1, [
326
- (e(!0), l($, null, F(d.value, (r) => (e(), l("li", {
327
- key: r.name,
328
- class: c(["inline-flex h-5 w-5 items-center justify-center rounded-full outline-1 outline-white", i[r.name]]),
329
- "aria-label": r.label
325
+ return (h, m) => (e(), l("ul", i1, [
326
+ (e(!0), l($, null, F(d.value, (s) => (e(), l("li", {
327
+ key: s.name,
328
+ class: c(["inline-flex h-5 w-5 items-center justify-center rounded-full outline-1 outline-white", r[s.name]]),
329
+ "aria-label": s.label
330
330
  }, [
331
331
  v(y, {
332
- name: r.icon,
332
+ name: s.icon,
333
333
  type: "brands",
334
334
  class: "text-[10px] text-white",
335
335
  "aria-hidden": "true"
@@ -381,11 +381,12 @@ const x1 = { render: M1 }, y1 = { class: "flex items-center justify-end self-str
381
381
  props: {
382
382
  variant: {},
383
383
  chip: {},
384
- selected: { type: Boolean }
384
+ selected: { type: Boolean },
385
+ icons: {}
385
386
  },
386
387
  emits: ["click"],
387
388
  setup(t, { emit: a }) {
388
- const s = a, i = {
389
+ const n = a, r = {
389
390
  tiktok: "TikTok",
390
391
  post: "Post",
391
392
  reel: "Reel",
@@ -396,6 +397,11 @@ const x1 = { render: M1 }, y1 = { class: "flex items-center justify-end self-str
396
397
  reel: b1,
397
398
  story: x1
398
399
  })[t.variant]), h = f(() => {
400
+ if (t.icons)
401
+ return t.icons.map((s) => s === "twitter" ? "x" : s).reduce(
402
+ (s, o) => (s[o] = !0, s),
403
+ {}
404
+ );
399
405
  switch (t.variant) {
400
406
  case "tiktok":
401
407
  return {
@@ -421,34 +427,34 @@ const x1 = { render: M1 }, y1 = { class: "flex items-center justify-end self-str
421
427
  return {};
422
428
  }
423
429
  });
424
- return (g, r) => (e(), l("button", {
430
+ return (m, s) => (e(), l("button", {
425
431
  type: "button",
426
432
  class: c(["group inline-flex min-w-60 cursor-pointer flex-col items-start justify-start gap-2.5 overflow-hidden rounded-3xl pt-4 outline-1 -outline-offset-1 transition-colors hover:outline-cornflower-blue-600 focus-visible:outline-2 focus-visible:outline-cornflower-blue-600", t.selected ? "bg-gray-50 outline-cornflower-blue-500" : "bg-white outline-gray-200"]),
427
- onClick: r[0] || (r[0] = (o) => s("click"))
433
+ onClick: s[0] || (s[0] = (o) => n("click"))
428
434
  }, [
429
- n("div", y1, [
435
+ i("div", y1, [
430
436
  t.chip ? (e(), M(K, {
431
437
  key: 0,
432
438
  variant: "warning"
433
439
  }, {
434
- default: m(() => [
435
- k(b(t.chip), 1)
440
+ default: b(() => [
441
+ k(g(t.chip), 1)
436
442
  ]),
437
443
  _: 1
438
444
  })) : p("", !0),
439
445
  v(o1, j({ class: "ml-auto" }, h.value, { "aria-hidden": "true" }), null, 16)
440
446
  ]),
441
- n("div", k1, [
447
+ i("div", k1, [
442
448
  (e(), M(A(d.value), {
443
449
  class: "h-44 object-contain transition-transform group-hover:-translate-y-0.5",
444
450
  "aria-hidden": "true"
445
451
  }))
446
452
  ]),
447
- n("div", {
453
+ i("div", {
448
454
  class: c(["inline-flex w-full flex-col items-center justify-center gap-2.5 bg-cornflower-blue-500 py-3.5 transition-colors group-hover:bg-cornflower-blue-600", t.selected ? "bg-cornflower-blue-600" : "bg-cornflower-blue-500"])
449
455
  }, [
450
- n("div", w1, [
451
- n("span", $1, [
456
+ i("div", w1, [
457
+ i("span", $1, [
452
458
  t.selected ? (e(), M(y, {
453
459
  key: 0,
454
460
  name: "check",
@@ -456,7 +462,7 @@ const x1 = { render: M1 }, y1 = { class: "flex items-center justify-end self-str
456
462
  class: "absolute top-1/2 -translate-x-[calc(100%+4px)] -translate-y-[calc(50%+1px)] text-white",
457
463
  "aria-hidden": "true"
458
464
  })) : p("", !0),
459
- k(" " + b(i[t.variant]), 1)
465
+ k(" " + g(r[t.variant]), 1)
460
466
  ])
461
467
  ])
462
468
  ], 2)
@@ -474,27 +480,27 @@ const x1 = { render: M1 }, y1 = { class: "flex items-center justify-end self-str
474
480
  },
475
481
  emits: ["update:currentStep"],
476
482
  setup(t) {
477
- return (a, s) => (e(), M(X, {
483
+ return (a, n) => (e(), M(X, {
478
484
  title: t.title,
479
485
  "back-button-action": t.backButtonAction,
480
486
  "back-button-text": t.backButtonText
481
487
  }, D({ _: 2 }, [
482
488
  t.steps ? {
483
489
  name: "center",
484
- fn: m(() => [
485
- v(n1, {
490
+ fn: b(() => [
491
+ v(s1, {
486
492
  class: "w-full",
487
493
  steps: t.steps.length,
488
494
  "step-titles": t.steps,
489
495
  "current-step": t.currentStep,
490
- "onUpdate:currentStep": s[0] || (s[0] = (i) => a.$emit("update:currentStep", i))
496
+ "onUpdate:currentStep": n[0] || (n[0] = (r) => a.$emit("update:currentStep", r))
491
497
  }, null, 8, ["steps", "step-titles", "current-step"])
492
498
  ]),
493
499
  key: "0"
494
500
  } : void 0,
495
501
  a.$slots.default ? {
496
502
  name: "right",
497
- fn: m(() => [
503
+ fn: b(() => [
498
504
  x(a.$slots, "default")
499
505
  ]),
500
506
  key: "1"
@@ -509,7 +515,7 @@ export {
509
515
  X as NexxtHeader,
510
516
  y as NexxtIcon,
511
517
  B1 as NexxtInfoBlock,
512
- n1 as NexxtProgressBar,
518
+ s1 as NexxtProgressBar,
513
519
  o1 as NexxtSocialIcons,
514
520
  S1 as NexxtSocialMediaType,
515
521
  z1 as NexxtStepperHeader
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nexxtmove/ui",
3
3
  "type": "module",
4
- "version": "0.1.13",
4
+ "version": "0.1.15",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -117,4 +117,8 @@
117
117
  @apply border-info-block-border p-(--info-block-padding) border border-solid;
118
118
  }
119
119
 
120
+ .social-media-template-info {
121
+ @apply bg-social-media-template-info-bg;
122
+ }
123
+
120
124
  }
@@ -159,6 +159,7 @@
159
159
  --color-progress-bar-border: var(--color-gray-200);
160
160
  --color-header-border-bottom: var(--color-gray-200);
161
161
  --color-info-block-border: var(--color-green-500);
162
+ --color-social-media-template-info-bg: var(--color-cornflower-blue-500);
162
163
  --text-xs: 0.75rem;
163
164
  --text-base: 1rem;
164
165
  --text-lg: 1.125rem;
@@ -39,7 +39,7 @@
39
39
  }
40
40
 
41
41
  @utility small-semibold {
42
- @apply font-sans text-sm;
42
+ @apply font-sans font-semibold text-sm;
43
43
  }
44
44
 
45
45
  @utility small-link {