@nexxtmove/ui 0.1.27 → 0.1.28

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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as F, ref as M, computed as Q, watch as vA, createBlock as V, openBlock as E, TransitionGroup as oe, withCtx as D, createElementBlock as I, Fragment as S, renderList as R, createVNode as z, Transition as $, toDisplayString as x, normalizeClass as c, createCommentVNode as B, renderSlot as Z, createElementVNode as g, normalizeProps as gA, guardReactiveProps as sA, onMounted as iA, unref as N, nextTick as cA, mergeModels as uA, useModel as WA, mergeProps as TA, createTextVNode as b, onUnmounted as me, watchEffect as Ee, normalizeStyle as Ie, withKeys as aA, withModifiers as zA, createStaticVNode as FA, resolveDynamicComponent as de, createSlots as ge } from "vue";
1
+ import { defineComponent as F, ref as M, computed as z, watch as vA, createBlock as V, openBlock as E, TransitionGroup as oe, withCtx as D, createElementBlock as I, Fragment as S, renderList as R, createVNode as B, Transition as $, toDisplayString as x, normalizeClass as c, createCommentVNode as Q, renderSlot as Z, createElementVNode as g, normalizeProps as gA, guardReactiveProps as sA, onMounted as iA, unref as N, nextTick as cA, mergeModels as uA, useModel as WA, mergeProps as TA, createTextVNode as b, onUnmounted as me, watchEffect as Ee, normalizeStyle as Ie, withKeys as aA, withModifiers as zA, createStaticVNode as FA, resolveDynamicComponent as de, createSlots as ge } from "vue";
2
2
  import { TooltipProvider as se, TooltipRoot as ce, TooltipTrigger as ue, TooltipPortal as ze, TooltipContent as Qe } from "reka-ui";
3
3
  const Be = /* @__PURE__ */ F({
4
4
  name: "NexxtAnimatedNumber",
@@ -9,7 +9,7 @@ const Be = /* @__PURE__ */ F({
9
9
  easing: { default: "ease-out" }
10
10
  },
11
11
  setup(A) {
12
- const e = M("up"), a = Q(() => String(A.value).split("")), t = Q(() => `duration-${A.duration}`);
12
+ const e = M("up"), a = z(() => String(A.value).split("")), t = z(() => `duration-${A.duration}`);
13
13
  return vA(
14
14
  () => A.value,
15
15
  (i, n) => {
@@ -31,7 +31,7 @@ const Be = /* @__PURE__ */ F({
31
31
  class: "relative inline-flex h-[1.5em] w-[1ch] items-center justify-center overflow-hidden",
32
32
  "aria-hidden": "true"
33
33
  }, [
34
- z($, {
34
+ B($, {
35
35
  "enter-active-class": `transition-transform ${t.value} ${A.easing}`,
36
36
  "leave-active-class": `absolute inset-0 transition-transform ${t.value} ${A.easing}`,
37
37
  "enter-from-class": e.value === "up" ? "translate-y-full" : "-translate-y-full",
@@ -93,7 +93,7 @@ const Be = /* @__PURE__ */ F({
93
93
  key: 0,
94
94
  name: A.icon,
95
95
  class: c(["transition-all duration-200", { "order-last": A.iconRight, "opacity-0": A.loading }])
96
- }, null, 8, ["name", "class"])) : B("", !0),
96
+ }, null, 8, ["name", "class"])) : Q("", !0),
97
97
  e.$slots.default ? (E(), I("span", {
98
98
  key: 1,
99
99
  class: c([
@@ -104,8 +104,8 @@ const Be = /* @__PURE__ */ F({
104
104
  ])
105
105
  }, [
106
106
  Z(e.$slots, "default")
107
- ], 2)) : B("", !0),
108
- z($, {
107
+ ], 2)) : Q("", !0),
108
+ B($, {
109
109
  "enter-active-class": "transition-opacity duration-200",
110
110
  "enter-from-class": "opacity-0",
111
111
  "enter-to-class": "opacity-100",
@@ -115,12 +115,12 @@ const Be = /* @__PURE__ */ F({
115
115
  }, {
116
116
  default: D(() => [
117
117
  A.loading ? (E(), I("div", le, [
118
- z(h, {
118
+ B(h, {
119
119
  name: "spinner-third",
120
120
  type: "light",
121
121
  class: "fa-spin absolute text-sm"
122
122
  })
123
- ])) : B("", !0)
123
+ ])) : Q("", !0)
124
124
  ]),
125
125
  _: 1
126
126
  })
@@ -2089,10 +2089,10 @@ const Wa = {
2089
2089
  },
2090
2090
  emits: ["prev", "next", "openMonthPicker", "openYearPicker", "closePicker"],
2091
2091
  setup(A, { emit: e }) {
2092
- const a = A, t = e, i = Q(() => {
2092
+ const a = A, t = e, i = z(() => {
2093
2093
  const o = j(a.viewDate, "MMM", { locale: a.locale }).replace(".", "").trim();
2094
2094
  return o.charAt(0).toUpperCase() + o.slice(1) + ".";
2095
- }), n = Q(() => j(a.viewDate, "yyyy")), r = {
2095
+ }), n = z(() => j(a.viewDate, "yyyy")), r = {
2096
2096
  enterActiveClass: "transition-all duration-200 ease-out",
2097
2097
  enterFromClass: "translate-y-full",
2098
2098
  leaveActiveClass: "transition-all duration-200 ease-out absolute inset-x-0 top-0",
@@ -2107,7 +2107,7 @@ const Wa = {
2107
2107
  onClick: m[0] || (m[0] = (d) => t("prev")),
2108
2108
  "aria-label": "Vorige maand"
2109
2109
  }, [
2110
- z(h, {
2110
+ B(h, {
2111
2111
  name: "chevron-left",
2112
2112
  class: "text-xs"
2113
2113
  })
@@ -2118,14 +2118,14 @@ const Wa = {
2118
2118
  onClick: m[1] || (m[1] = (d) => t("closePicker")),
2119
2119
  "aria-label": "Terug naar maanden"
2120
2120
  }, [
2121
- z(h, {
2121
+ B(h, {
2122
2122
  name: "arrow-left",
2123
2123
  class: "text-xs"
2124
2124
  })
2125
2125
  ])) : (E(), I("div", Tt)),
2126
2126
  g("div", Ft, [
2127
2127
  A.pickerView === "days" ? (E(), I("div", Xt, [
2128
- z($, gA(sA(r)), {
2128
+ B($, gA(sA(r)), {
2129
2129
  default: D(() => [
2130
2130
  A.monthYearPicker ? (E(), I("button", {
2131
2131
  key: `button-${i.value}`,
@@ -2139,9 +2139,9 @@ const Wa = {
2139
2139
  ]),
2140
2140
  _: 1
2141
2141
  }, 16)
2142
- ])) : B("", !0),
2142
+ ])) : Q("", !0),
2143
2143
  A.pickerView !== "years" ? (E(), I("div", Dt, [
2144
- z($, gA(sA(r)), {
2144
+ B($, gA(sA(r)), {
2145
2145
  default: D(() => [
2146
2146
  A.monthYearPicker ? (E(), I("button", {
2147
2147
  key: `button-${n.value}`,
@@ -2155,8 +2155,8 @@ const Wa = {
2155
2155
  ]),
2156
2156
  _: 1
2157
2157
  }, 16)
2158
- ])) : B("", !0),
2159
- A.pickerView === "years" ? (E(), I("span", Ct, "Kies jaar")) : B("", !0)
2158
+ ])) : Q("", !0),
2159
+ A.pickerView === "years" ? (E(), I("span", Ct, "Kies jaar")) : Q("", !0)
2160
2160
  ]),
2161
2161
  A.pickerView === "days" ? (E(), I("button", {
2162
2162
  key: 3,
@@ -2166,7 +2166,7 @@ const Wa = {
2166
2166
  onClick: m[4] || (m[4] = (d) => t("next")),
2167
2167
  "aria-label": "Volgende maand"
2168
2168
  }, [
2169
- z(h, {
2169
+ B(h, {
2170
2170
  name: "chevron-right",
2171
2171
  class: "text-xs"
2172
2172
  })
@@ -2196,12 +2196,12 @@ const Wa = {
2196
2196
  const t = A, i = a, n = M([]), r = (f) => {
2197
2197
  const T = X(f, t.timezone), u = X(/* @__PURE__ */ new Date(), t.timezone);
2198
2198
  return y(T, u);
2199
- }, o = (f) => t.modelValue ? y(f, t.modelValue) : !1, m = (f) => t.markedDates.some((T) => y(T, f)), d = Q(() => {
2199
+ }, o = (f) => t.modelValue ? y(f, t.modelValue) : !1, m = (f) => t.markedDates.some((T) => y(T, f)), d = z(() => {
2200
2200
  const f = [];
2201
2201
  for (let T = 0; T < t.calendarDays.length; T += 7)
2202
2202
  f.push(t.calendarDays.slice(T, T + 7));
2203
2203
  return f;
2204
- }), s = Q(() => t.calendarDays.length === 0 ? [] : t.calendarDays.slice(0, 7).map((f) => {
2204
+ }), s = z(() => t.calendarDays.length === 0 ? [] : t.calendarDays.slice(0, 7).map((f) => {
2205
2205
  const T = j(f, "EEEEEE", { locale: t.locale });
2206
2206
  return T.charAt(0).toUpperCase() + T.slice(1);
2207
2207
  })), p = (f, T) => {
@@ -2288,7 +2288,7 @@ const Wa = {
2288
2288
  "absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full",
2289
2289
  o(v) ? "bg-white" : "bg-cornflower-blue-500"
2290
2290
  ])
2291
- }, null, 2)) : B("", !0)
2291
+ }, null, 2)) : Q("", !0)
2292
2292
  ], 42, Vt)
2293
2293
  ], 8, Mt))), 128))
2294
2294
  ]))), 128))
@@ -2310,7 +2310,7 @@ const Wa = {
2310
2310
  },
2311
2311
  emits: ["select"],
2312
2312
  setup(A, { emit: e }) {
2313
- const a = A, t = e, i = Q(
2313
+ const a = A, t = e, i = z(
2314
2314
  () => Array.from({ length: 12 }, (m, d) => {
2315
2315
  const s = X(new Date(Date.UTC(a.viewYear, d, 1)), a.timezone), p = j(s, "LLL", { locale: a.locale }).replace(".", "").trim();
2316
2316
  return { index: d, label: p.charAt(0).toUpperCase() + p.slice(1) };
@@ -2351,7 +2351,7 @@ const Wa = {
2351
2351
  },
2352
2352
  emits: ["select"],
2353
2353
  setup(A, { emit: e }) {
2354
- const a = A, t = e, i = M(null), n = Q(() => {
2354
+ const a = A, t = e, i = M(null), n = z(() => {
2355
2355
  const o = a.minDate ? X(a.minDate, a.timezone).getFullYear() : a.viewYear - 100, m = a.maxDate ? X(a.maxDate, a.timezone).getFullYear() : a.viewYear + 20;
2356
2356
  return Array.from({ length: m - o + 1 }, (d, s) => o + s);
2357
2357
  }), r = (o) => {
@@ -2409,7 +2409,7 @@ const Wa = {
2409
2409
  vA(a, (P) => {
2410
2410
  P && (i.value = X(new Date(P), A.timezone));
2411
2411
  });
2412
- const m = Q(() => {
2412
+ const m = z(() => {
2413
2413
  const P = _(eA(i.value), { weekStartsOn: 1 }), w = Pe(pA(i.value), { weekStartsOn: 1 });
2414
2414
  return Ce({ start: P, end: w });
2415
2415
  }), d = (P) => {
@@ -2428,12 +2428,12 @@ const Wa = {
2428
2428
  }, f = (P) => {
2429
2429
  const w = X(new Date(Date.UTC(P, i.value.getUTCMonth(), 1)), A.timezone);
2430
2430
  i.value = w, n.value = "months";
2431
- }, T = Q(() => {
2431
+ }, T = z(() => {
2432
2432
  if (n.value !== "days") return !1;
2433
2433
  if (!A.minDate) return !0;
2434
2434
  const P = VA(i.value);
2435
2435
  return !MA(pA(P), W(X(A.minDate, A.timezone)));
2436
- }), u = Q(() => {
2436
+ }), u = z(() => {
2437
2437
  if (n.value !== "days") return !1;
2438
2438
  if (!A.maxDate) return !0;
2439
2439
  const P = QA(i.value, 1);
@@ -2466,11 +2466,11 @@ const Wa = {
2466
2466
  leaveActiveClass: "transition-all duration-200 ease-in absolute inset-0",
2467
2467
  leaveToClass: "translate-x-full opacity-0"
2468
2468
  }
2469
- }, ne = Q(
2469
+ }, ne = z(
2470
2470
  () => o.value === "fade" ? te : ie[o.value]
2471
2471
  );
2472
2472
  return (P, w) => (E(), I("div", Kt, [
2473
- z(Nt, {
2473
+ B(Nt, {
2474
2474
  "view-date": i.value,
2475
2475
  "picker-view": n.value,
2476
2476
  "month-year-picker": A.monthYearPicker,
@@ -2486,7 +2486,7 @@ const Wa = {
2486
2486
  g("div", {
2487
2487
  class: c(["relative", n.value === "days" && "overflow-hidden"])
2488
2488
  }, [
2489
- z($, TA(ne.value, {
2489
+ B($, TA(ne.value, {
2490
2490
  mode: o.value === "fade" ? "out-in" : void 0
2491
2491
  }), {
2492
2492
  default: D(() => [
@@ -2519,7 +2519,7 @@ const Wa = {
2519
2519
  "max-date": A.maxDate,
2520
2520
  timezone: A.timezone,
2521
2521
  onSelect: f
2522
- }, null, 8, ["view-year", "min-date", "max-date", "timezone"])) : B("", !0)
2522
+ }, null, 8, ["view-year", "min-date", "max-date", "timezone"])) : Q("", !0)
2523
2523
  ]),
2524
2524
  _: 1
2525
2525
  }, 16, ["mode"])
@@ -2533,7 +2533,7 @@ const Wa = {
2533
2533
  variant: { default: "default" }
2534
2534
  },
2535
2535
  setup(A) {
2536
- const e = Q(() => {
2536
+ const e = z(() => {
2537
2537
  switch (A.variant) {
2538
2538
  case "warning":
2539
2539
  return "bg-orange-500";
@@ -2581,7 +2581,7 @@ const Wa = {
2581
2581
  Selectie: "handshake",
2582
2582
  Transactie: "pencil-mechanical",
2583
2583
  Wonen: "house-heart"
2584
- }, a = Q(() => A.title && e[A.title] || null), t = Q(() => {
2584
+ }, a = z(() => A.title && e[A.title] || null), t = z(() => {
2585
2585
  const i = [];
2586
2586
  if (A.title && i.push(A.title), A.amount !== void 0 && i.push(`${A.amount} contacten`), A.percentage !== void 0) {
2587
2587
  const n = A.percentage > 0 ? "+" : "", r = A.percentageExplanaition ? ` ${A.percentageExplanaition}` : "";
@@ -2595,31 +2595,31 @@ const Wa = {
2595
2595
  class: c(["flex cursor-pointer rounded-xl bg-white outline outline-gray-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-cornflower-blue-500", a.value ? "gap-6 p-1.5" : "p-4"])
2596
2596
  }, [
2597
2597
  a.value ? (E(), I("div", jt, [
2598
- z(h, {
2598
+ B(h, {
2599
2599
  name: a.value,
2600
2600
  class: "text-2xl text-purple-500",
2601
2601
  "aria-hidden": "true"
2602
2602
  }, null, 8, ["name"])
2603
- ])) : B("", !0),
2603
+ ])) : Q("", !0),
2604
2604
  g("div", {
2605
2605
  class: c(["flex flex-col items-start gap-1", a.value ? "py-6 pr-4" : ""])
2606
2606
  }, [
2607
- A.title ? (E(), I("span", $t, x(A.title), 1)) : B("", !0),
2607
+ A.title ? (E(), I("span", $t, x(A.title), 1)) : Q("", !0),
2608
2608
  A.amount ? (E(), I("span", {
2609
2609
  key: 1,
2610
2610
  class: c(["heading-1", a.value ? "text-purple-500" : "text-sapphire-900"])
2611
- }, x(A.amount), 3)) : B("", !0),
2611
+ }, x(A.amount), 3)) : Q("", !0),
2612
2612
  A.percentage ? (E(), I("div", _t, [
2613
2613
  g("span", {
2614
2614
  class: c(["extra-small-semibold", A.percentage > 0 ? "text-green-500" : "text-brick-500"])
2615
2615
  }, [
2616
2616
  A.percentage > 0 ? (E(), I(S, { key: 0 }, [
2617
2617
  b("+")
2618
- ], 64)) : B("", !0),
2618
+ ], 64)) : Q("", !0),
2619
2619
  b(x(A.percentage) + "%", 1)
2620
2620
  ], 2),
2621
- A.percentageExplanaition ? (E(), I("span", Ai, x(A.percentageExplanaition), 1)) : B("", !0)
2622
- ])) : B("", !0)
2621
+ A.percentageExplanaition ? (E(), I("span", Ai, x(A.percentageExplanaition), 1)) : Q("", !0)
2622
+ ])) : Q("", !0)
2623
2623
  ], 2)
2624
2624
  ], 10, Lt));
2625
2625
  }
@@ -2643,7 +2643,7 @@ const Wa = {
2643
2643
  }),
2644
2644
  emits: ["update:modelValue"],
2645
2645
  setup(A) {
2646
- const e = WA(A, "modelValue"), a = A, t = /* @__PURE__ */ new Set(["placeholder", "anchor", "autoClose"]), i = Q(() => ({
2646
+ const e = WA(A, "modelValue"), a = A, t = /* @__PURE__ */ new Set(["placeholder", "anchor", "autoClose"]), i = z(() => ({
2647
2647
  timezone: "UTC",
2648
2648
  ...Object.fromEntries(
2649
2649
  Object.entries(a).filter(([O]) => !t.has(O))
@@ -2662,12 +2662,12 @@ const Wa = {
2662
2662
  r.value && !r.value.contains(u.target) && (n.value = !1);
2663
2663
  };
2664
2664
  iA(() => document.addEventListener("mousedown", p)), me(() => document.removeEventListener("mousedown", p));
2665
- const f = Q(() => ({
2665
+ const f = z(() => ({
2666
2666
  "bottom-right": "top-full right-0 mt-2 origin-top-right",
2667
2667
  "bottom-left": "top-full left-0 mt-2 origin-top-left",
2668
2668
  "top-right": "bottom-full right-0 mb-2 origin-bottom-right",
2669
2669
  "top-left": "bottom-full left-0 mb-2 origin-bottom-left"
2670
- })[a.anchor]), T = Q(() => {
2670
+ })[a.anchor]), T = z(() => {
2671
2671
  const u = a.anchor.startsWith("bottom"), O = {
2672
2672
  "bottom-left": "origin-top-left",
2673
2673
  "bottom-right": "origin-top-right",
@@ -2697,7 +2697,7 @@ const Wa = {
2697
2697
  isOpen: n.value,
2698
2698
  toggle: () => n.value = !n.value
2699
2699
  }, () => [
2700
- z(qA, {
2700
+ B(qA, {
2701
2701
  icon: "calendar",
2702
2702
  variant: "secondary",
2703
2703
  "aria-expanded": n.value,
@@ -2711,7 +2711,7 @@ const Wa = {
2711
2711
  }, 8, ["aria-expanded"])
2712
2712
  ])
2713
2713
  ], 512),
2714
- z($, gA(sA(T.value)), {
2714
+ B($, gA(sA(T.value)), {
2715
2715
  default: D(() => [
2716
2716
  n.value ? (E(), I("div", {
2717
2717
  key: 0,
@@ -2720,11 +2720,11 @@ const Wa = {
2720
2720
  tabindex: "-1",
2721
2721
  class: c(["absolute z-50 outline-none", f.value])
2722
2722
  }, [
2723
- z(Wt, TA({
2723
+ B(Wt, TA({
2724
2724
  modelValue: e.value,
2725
2725
  "onUpdate:modelValue": O[1] || (O[1] = (v) => e.value = v)
2726
2726
  }, i.value, { onSelect: d }), null, 16, ["modelValue"])
2727
- ], 2)) : B("", !0)
2727
+ ], 2)) : Q("", !0)
2728
2728
  ]),
2729
2729
  _: 1
2730
2730
  }, 16)
@@ -2738,7 +2738,7 @@ const Wa = {
2738
2738
  __name: "Header",
2739
2739
  props: {
2740
2740
  title: {},
2741
- backButtonText: { default: "Back" },
2741
+ backButtonText: {},
2742
2742
  backButtonAction: { type: Function, default: () => {
2743
2743
  window.history.back();
2744
2744
  } }
@@ -2748,7 +2748,8 @@ const Wa = {
2748
2748
  class: c(["header flex items-center", e.$slots.center ? "grid grid-cols-3" : ""])
2749
2749
  }, [
2750
2750
  g("div", ei, [
2751
- z(qA, {
2751
+ A.backButtonText ? (E(), V(qA, {
2752
+ key: 0,
2752
2753
  class: "shrink-0",
2753
2754
  variant: "secondary",
2754
2755
  onClick: A.backButtonAction
@@ -2757,18 +2758,18 @@ const Wa = {
2757
2758
  b(x(A.backButtonText), 1)
2758
2759
  ]),
2759
2760
  _: 1
2760
- }, 8, ["onClick"]),
2761
+ }, 8, ["onClick"])) : Q("", !0),
2761
2762
  g("span", ai, x(A.title), 1)
2762
2763
  ]),
2763
2764
  e.$slots.center ? (E(), I("div", ti, [
2764
2765
  Z(e.$slots, "center")
2765
- ])) : B("", !0),
2766
+ ])) : Q("", !0),
2766
2767
  e.$slots.right ? (E(), I("div", {
2767
2768
  key: 1,
2768
2769
  class: c(e.$slots.center ? "col-span-1 col-start-3 flex justify-end" : "ml-auto")
2769
2770
  }, [
2770
2771
  Z(e.$slots, "right")
2771
- ], 2)) : B("", !0)
2772
+ ], 2)) : Q("", !0)
2772
2773
  ], 2));
2773
2774
  }
2774
2775
  }), ni = { class: "p-5" }, on = /* @__PURE__ */ F({
@@ -2779,7 +2780,7 @@ const Wa = {
2779
2780
  color: { default: "green" }
2780
2781
  },
2781
2782
  setup(A) {
2782
- const e = Q(() => {
2783
+ const e = z(() => {
2783
2784
  switch (A.color) {
2784
2785
  case "green":
2785
2786
  return {
@@ -2824,7 +2825,7 @@ const Wa = {
2824
2825
  g("div", {
2825
2826
  class: c(["flex aspect-square h-10 items-center justify-center rounded-3xl", e.value.icon])
2826
2827
  }, [
2827
- z(h, {
2828
+ B(h, {
2828
2829
  name: A.icon,
2829
2830
  class: "text-xl text-white"
2830
2831
  }, null, 8, ["name"])
@@ -2854,7 +2855,7 @@ const Wa = {
2854
2855
  },
2855
2856
  emits: ["update:currentStep"],
2856
2857
  setup(A) {
2857
- const e = Q(() => Math.min(Math.max(0, A.currentStep), Math.max(0, A.steps - 1))), a = Q(() => A.steps > 0 ? e.value + 1 : 0), t = Q(() => A.steps <= 1 ? A.steps === 1 ? 100 : 0 : e.value / (A.steps - 1) * 100), i = Q(() => !!A.stepTitles?.length);
2858
+ const e = z(() => Math.min(Math.max(0, A.currentStep), Math.max(0, A.steps - 1))), a = z(() => A.steps > 0 ? e.value + 1 : 0), t = z(() => A.steps <= 1 ? A.steps === 1 ? 100 : 0 : e.value / (A.steps - 1) * 100), i = z(() => !!A.stepTitles?.length);
2858
2859
  return Ee(() => {
2859
2860
  A.stepTitles && A.stepTitles.length !== A.steps && console.warn(
2860
2861
  `[NexxtProgressBar] The "stepTitles" array length (${A.stepTitles.length}) must match the "steps" prop (${A.steps}).`
@@ -2878,9 +2879,9 @@ const Wa = {
2878
2879
  }, null, 4)
2879
2880
  ], 8, Ei),
2880
2881
  i.value ? (E(), I("div", Ii, [
2881
- z(Be, { value: a.value }, null, 8, ["value"]),
2882
+ B(Be, { value: a.value }, null, 8, ["value"]),
2882
2883
  g("span", null, "/" + x(A.steps), 1)
2883
- ])) : B("", !0)
2884
+ ])) : Q("", !0)
2884
2885
  ]),
2885
2886
  i.value ? (E(), I("ol", di, [
2886
2887
  (E(!0), I(S, null, R(A.stepTitles, (o, m) => (E(), I("li", {
@@ -2899,7 +2900,7 @@ const Wa = {
2899
2900
  aA(zA((d) => m < e.value && n.$emit("update:currentStep", m), ["prevent"]), ["space"])
2900
2901
  ]
2901
2902
  }, x(o), 43, gi))), 128))
2902
- ])) : B("", !0)
2903
+ ])) : Q("", !0)
2903
2904
  ])
2904
2905
  ]));
2905
2906
  }
@@ -2932,7 +2933,7 @@ const Wa = {
2932
2933
  x: "bg-brands-x",
2933
2934
  google: "bg-brands-google",
2934
2935
  tiktok: "bg-brands-tiktok"
2935
- }, i = Q(
2936
+ }, i = z(
2936
2937
  () => a.filter((n) => e[n.name])
2937
2938
  );
2938
2939
  return (n, r) => (E(), I("ul", ci, [
@@ -2941,7 +2942,7 @@ const Wa = {
2941
2942
  class: c(["inline-flex h-5 w-5 items-center justify-center rounded-full outline-1 outline-white", t[o.name]]),
2942
2943
  "aria-label": o.label
2943
2944
  }, [
2944
- z(h, {
2945
+ B(h, {
2945
2946
  name: o.icon,
2946
2947
  type: "brands",
2947
2948
  class: "text-[10px] text-white",
@@ -3000,14 +3001,14 @@ const Wa = {
3000
3001
  },
3001
3002
  emits: ["click"],
3002
3003
  setup(A, { emit: e }) {
3003
- const a = e, t = M(null), i = Q(() => A.mediaType !== "video" ? void 0 : {
3004
+ const a = e, t = M(null), i = z(() => A.mediaType !== "video" ? void 0 : {
3004
3005
  mp4: "video/mp4",
3005
3006
  webm: "video/webm",
3006
3007
  ogg: "video/ogg",
3007
3008
  mov: "video/quicktime",
3008
3009
  avi: "video/x-msvideo",
3009
3010
  mkv: "video/x-matroska"
3010
- }[A.mediaExtension || ""] || "video/mp4"), n = Q(() => A.aspectRatio ? A.aspectRatio.startsWith("aspect-") ? A.aspectRatio.replace(":", "/") : `aspect-${A.aspectRatio.replace(":", "/")}` : A.mediaType === "video" ? "aspect-9/16" : ""), r = () => {
3011
+ }[A.mediaExtension || ""] || "video/mp4"), n = z(() => A.aspectRatio ? A.aspectRatio.startsWith("aspect-") ? A.aspectRatio.replace(":", "/") : `aspect-${A.aspectRatio.replace(":", "/")}` : A.mediaType === "video" ? "aspect-9/16" : ""), r = () => {
3011
3012
  t.value && t.value.play();
3012
3013
  }, o = () => {
3013
3014
  t.value && t.value.pause();
@@ -3060,7 +3061,7 @@ const Wa = {
3060
3061
  g("div", {
3061
3062
  class: c(["flex aspect-square items-center justify-center rounded-full px-2", A.variant === "video" ? "bg-purple-500" : "bg-cornflower-blue-500"])
3062
3063
  }, [
3063
- z(h, {
3064
+ B(h, {
3064
3065
  name: "check",
3065
3066
  class: "ml-auto block shrink-0 text-3xl text-white"
3066
3067
  })
@@ -3073,7 +3074,7 @@ const Wa = {
3073
3074
  g("div", Xi, x(A.name), 1),
3074
3075
  g("div", Di, x(A.type), 1)
3075
3076
  ]),
3076
- z(h, {
3077
+ B(h, {
3077
3078
  name: A.variant === "post" ? "image" : A.variant === "video" ? "play-circle" : "images",
3078
3079
  class: "mb-1 ml-auto block shrink-0 self-end text-lg"
3079
3080
  }, null, 8, ["name"])
@@ -3124,11 +3125,11 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3124
3125
  post: "Post",
3125
3126
  reel: "TikTok & Reel",
3126
3127
  story: "Story"
3127
- }, i = Q(() => ({
3128
+ }, i = z(() => ({
3128
3129
  post: wi,
3129
3130
  reel: Pi,
3130
3131
  story: Vi
3131
- })[A.variant]), n = Q(() => {
3132
+ })[A.variant]), n = z(() => {
3132
3133
  if (A.icons)
3133
3134
  return A.icons.map((o) => o === "twitter" ? "x" : o).reduce(
3134
3135
  (o, m) => (o[m] = !0, o),
@@ -3170,8 +3171,8 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3170
3171
  b(x(A.chip), 1)
3171
3172
  ]),
3172
3173
  _: 1
3173
- })) : B("", !0),
3174
- z(zi, TA({ class: "ml-auto" }, n.value, { "aria-hidden": "true" }), null, 16)
3174
+ })) : Q("", !0),
3175
+ B(zi, TA({ class: "ml-auto" }, n.value, { "aria-hidden": "true" }), null, 16)
3175
3176
  ]),
3176
3177
  g("div", Yi, [
3177
3178
  (E(), V(de(i.value), {
@@ -3190,7 +3191,7 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3190
3191
  type: "solid",
3191
3192
  class: "absolute top-1/2 -translate-x-[calc(100%+4px)] -translate-y-[calc(50%+1px)] text-white",
3192
3193
  "aria-hidden": "true"
3193
- })) : B("", !0),
3194
+ })) : Q("", !0),
3194
3195
  b(" " + x(A.label ?? t[A.variant]), 1)
3195
3196
  ])
3196
3197
  ])
@@ -3217,7 +3218,7 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3217
3218
  A.steps ? {
3218
3219
  name: "center",
3219
3220
  fn: D(() => [
3220
- z(si, {
3221
+ B(si, {
3221
3222
  class: "w-full",
3222
3223
  steps: A.steps.length,
3223
3224
  "step-titles": A.steps,
@@ -3439,7 +3440,7 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3439
3440
  label: "Gebeurtenis",
3440
3441
  icon: "info",
3441
3442
  color: "bg-gray-500"
3442
- }, a = Q(() => bi[t.event.type] || { ...e, label: t.event.type }), t = A, i = Q(() => {
3443
+ }, a = z(() => bi[t.event.type] || { ...e, label: t.event.type }), t = A, i = z(() => {
3443
3444
  const r = new Date(t.event.happened_at), o = r.toLocaleDateString("nl-NL", {
3444
3445
  day: "numeric",
3445
3446
  month: "short",
@@ -3449,7 +3450,7 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3449
3450
  minute: "2-digit"
3450
3451
  });
3451
3452
  return `${o} om ${m}`;
3452
- }), n = Q(() => t.splitView && t.event.direction === "inbound");
3453
+ }), n = z(() => t.splitView && t.event.direction === "inbound");
3453
3454
  return (r, o) => (E(), I("div", {
3454
3455
  "data-event-source": A.event.direction,
3455
3456
  "data-event-date": A.event.happened_at,
@@ -3471,7 +3472,7 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3471
3472
  g("div", {
3472
3473
  class: c(["flex h-10 w-10 shrink-0 items-center justify-center rounded-full", [a.value.color]])
3473
3474
  }, [
3474
- z(h, {
3475
+ B(h, {
3475
3476
  name: a.value.icon,
3476
3477
  type: a.value.icon === "whatsapp" ? "brands" : "light",
3477
3478
  class: "flex h-6 w-6 text-xl text-white"
@@ -3488,12 +3489,12 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3488
3489
  class: "group mt-1 flex justify-between gap-2 text-sm text-cornflower-blue-500 hover:text-cornflower-blue-600"
3489
3490
  }, [
3490
3491
  g("span", Ji, x(A.event.description || A.event.url), 1),
3491
- z(h, {
3492
+ B(h, {
3492
3493
  name: "external-link",
3493
3494
  class: "ml-1 h-4 w-4 text-gray-950"
3494
3495
  })
3495
- ], 8, Gi)) : B("", !0),
3496
- A.event.request_reason ? (E(), I("span", Ki, " Reden: " + x(A.event.request_reason), 1)) : B("", !0)
3496
+ ], 8, Gi)) : Q("", !0),
3497
+ A.event.request_reason ? (E(), I("span", Ki, " Reden: " + x(A.event.request_reason), 1)) : Q("", !0)
3497
3498
  ], 2)
3498
3499
  ], 2)
3499
3500
  ], 10, Ri));
@@ -3511,20 +3512,20 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3511
3512
  setup(A) {
3512
3513
  return (e, a) => (E(), V(N(se), null, {
3513
3514
  default: D(() => [
3514
- z(N(ce), {
3515
+ B(N(ce), {
3515
3516
  "delay-duration": A.delay,
3516
3517
  "disable-hoverable-content": A.disableHoverableContent
3517
3518
  }, {
3518
3519
  default: D(() => [
3519
- z(N(ue), { "as-child": "" }, {
3520
+ B(N(ue), { "as-child": "" }, {
3520
3521
  default: D(() => [
3521
3522
  Z(e.$slots, "default")
3522
3523
  ]),
3523
3524
  _: 3
3524
3525
  }),
3525
- z(N(ze), null, {
3526
+ B(N(ze), null, {
3526
3527
  default: D(() => [
3527
- z(N(Qe), {
3528
+ B(N(Qe), {
3528
3529
  side: A.side,
3529
3530
  "side-offset": A.sideOffset,
3530
3531
  align: A.align,
@@ -3562,7 +3563,7 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3562
3563
  isLast: { type: Boolean }
3563
3564
  },
3564
3565
  setup(A) {
3565
- const e = A, a = Q(() => {
3566
+ const e = A, a = z(() => {
3566
3567
  const r = e.phase.phase.value, o = e.phases[e.index + 1];
3567
3568
  if (!o) return "";
3568
3569
  const m = J[r].fromColor, d = J[o.phase.value].toColor;
@@ -3593,12 +3594,12 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3593
3594
  g("div", Li, [
3594
3595
  g("span", ji, [
3595
3596
  o[1] || (o[1] = b(" Outbound ", -1)),
3596
- z(KA, null, {
3597
+ B(KA, null, {
3597
3598
  tooltip: D(() => [...o[0] || (o[0] = [
3598
3599
  g("span", { class: "text-sm" }, "Vanuit Nexxtmove", -1)
3599
3600
  ])]),
3600
3601
  default: D(() => [
3601
- z(h, {
3602
+ B(h, {
3602
3603
  name: "circle-info",
3603
3604
  class: "h-4 w-4 text-xs text-gray-600"
3604
3605
  })
@@ -3608,12 +3609,12 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3608
3609
  ]),
3609
3610
  g("span", $i, [
3610
3611
  o[3] || (o[3] = b(" Inbound ", -1)),
3611
- z(KA, { "as-child": "" }, {
3612
+ B(KA, { "as-child": "" }, {
3612
3613
  tooltip: D(() => [...o[2] || (o[2] = [
3613
3614
  g("span", { class: "text-sm" }, "Vanuit relatie", -1)
3614
3615
  ])]),
3615
3616
  default: D(() => [
3616
- z(h, {
3617
+ B(h, {
3617
3618
  name: "circle-info",
3618
3619
  class: "h-4 w-4 text-xs text-gray-600"
3619
3620
  })
@@ -3622,14 +3623,14 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3622
3623
  })
3623
3624
  ])
3624
3625
  ])
3625
- ])) : B("", !0),
3626
+ ])) : Q("", !0),
3626
3627
  g("div", {
3627
3628
  class: c(["absolute top-0 bottom-0 left-5 w-0 border-l", N(J)[A.phase.phase.value].color])
3628
3629
  }, null, 2),
3629
3630
  A.isSplitView ? (E(), I("div", {
3630
3631
  key: 1,
3631
3632
  class: c(["absolute top-0 right-5 bottom-0 w-0 border-l", N(J)[A.phase.phase.value].color])
3632
- }, null, 2)) : B("", !0),
3633
+ }, null, 2)) : Q("", !0),
3633
3634
  (E(!0), I(S, null, R(A.phase.events, (m) => (E(), V(Wi, {
3634
3635
  key: m.id,
3635
3636
  event: m,
@@ -3647,22 +3648,22 @@ const Vi = { render: Mi }, Hi = { class: "flex items-center justify-end self-str
3647
3648
  key: 0,
3648
3649
  name: n() === "up" ? "arrow-up" : "arrow-down",
3649
3650
  class: "h-4 w-4 text-white"
3650
- }, null, 8, ["name"])) : B("", !0)
3651
+ }, null, 8, ["name"])) : Q("", !0)
3651
3652
  ], 2),
3652
3653
  g("span", An, x(i()), 1),
3653
3654
  A.isSplitView ? (E(), I("div", {
3654
3655
  key: 0,
3655
3656
  class: c(["mt-4 h-px w-[75%]", N(J)[A.phase.phase.value].bgColor])
3656
- }, null, 2)) : B("", !0),
3657
- A.isLast ? B("", !0) : (E(), I("div", en)),
3657
+ }, null, 2)) : Q("", !0),
3658
+ A.isLast ? Q("", !0) : (E(), I("div", en)),
3658
3659
  g("div", {
3659
3660
  class: c(["absolute top-0 bottom-0 left-5 w-[1px] bg-linear-to-b", a.value])
3660
3661
  }, null, 2),
3661
3662
  A.isSplitView ? (E(), I("div", {
3662
3663
  key: 2,
3663
3664
  class: c(["absolute top-0 right-5 bottom-0 w-[1px] bg-linear-to-b", a.value])
3664
- }, null, 2)) : B("", !0)
3665
- ], 2)) : B("", !0)
3665
+ }, null, 2)) : Q("", !0)
3666
+ ], 2)) : Q("", !0)
3666
3667
  ], 8, qi));
3667
3668
  }
3668
3669
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nexxtmove/ui",
3
3
  "type": "module",
4
- "version": "0.1.27",
4
+ "version": "0.1.28",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -23,6 +23,12 @@ export const Default: Story = {
23
23
  },
24
24
  }
25
25
 
26
+ export const WithoutBackButton: Story = {
27
+ args: {
28
+ title: 'Header Title',
29
+ },
30
+ }
31
+
26
32
  export const WithSlots: Story = {
27
33
  args: {
28
34
  title: 'Header Title',
@@ -15,10 +15,11 @@ describe('Header', () => {
15
15
  expect(wrapper.find('span.heading-4').text()).toBe('My Page Title')
16
16
  })
17
17
 
18
- it('renders the back button with default text', () => {
18
+ it('renders the back button with explicit text', () => {
19
19
  const wrapper = mount(Header, {
20
20
  props: {
21
21
  title: 'Test',
22
+ backButtonText: 'Back',
22
23
  },
23
24
  })
24
25
 
@@ -28,6 +29,17 @@ describe('Header', () => {
28
29
  expect(button.props('variant')).toBe('secondary')
29
30
  })
30
31
 
32
+ it('does not render the back button when backButtonText is not provided', () => {
33
+ const wrapper = mount(Header, {
34
+ props: {
35
+ title: 'Test',
36
+ },
37
+ })
38
+
39
+ const button = wrapper.findComponent(Button)
40
+ expect(button.exists()).toBe(false)
41
+ })
42
+
31
43
  it('renders the back button with custom text', () => {
32
44
  const wrapper = mount(Header, {
33
45
  props: {
@@ -45,6 +57,7 @@ describe('Header', () => {
45
57
  const wrapper = mount(Header, {
46
58
  props: {
47
59
  title: 'Test',
60
+ backButtonText: 'Back',
48
61
  backButtonAction,
49
62
  },
50
63
  })
@@ -61,6 +74,7 @@ describe('Header', () => {
61
74
  const wrapper = mount(Header, {
62
75
  props: {
63
76
  title: 'Test',
77
+ backButtonText: 'Back',
64
78
  },
65
79
  })
66
80
 
@@ -12,7 +12,7 @@ defineOptions({
12
12
  })
13
13
 
14
14
  const {
15
- backButtonText = 'Back',
15
+ backButtonText,
16
16
  backButtonAction = () => {
17
17
  window.history.back()
18
18
  },
@@ -22,9 +22,13 @@ const {
22
22
  <template>
23
23
  <div class="header flex items-center" :class="$slots.center ? 'grid grid-cols-3' : ''">
24
24
  <div class="flex max-w-full items-center justify-start gap-4">
25
- <Button class="shrink-0" variant="secondary" @click="backButtonAction">{{
26
- backButtonText
27
- }}</Button>
25
+ <Button
26
+ v-if="backButtonText"
27
+ class="shrink-0"
28
+ variant="secondary"
29
+ @click="backButtonAction"
30
+ >{{ backButtonText }}</Button
31
+ >
28
32
  <span class="block truncate heading-4 text-sapphire-500">
29
33
  {{ title }}
30
34
  </span>