@capitaltg/vero 1.8.0 → 1.8.1

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
@@ -13363,7 +13363,7 @@ const tS = Me("flex", {
13363
13363
  vertical: ""
13364
13364
  }
13365
13365
  }
13366
- }), aS = Me("flex gap-1", {
13366
+ }), aS = Me("mb-0 mt-0 flex gap-1 pl-0", {
13367
13367
  variants: {
13368
13368
  orientation: {
13369
13369
  horizontal: "flex-row",
@@ -13447,10 +13447,11 @@ function lS({
13447
13447
  currentStepIndex: t,
13448
13448
  orientation: n,
13449
13449
  showCurrentAsCompleted: r,
13450
- steps: o
13450
+ showLabels: o,
13451
+ steps: a
13451
13452
  }) {
13452
- return /* @__PURE__ */ m("ol", { "aria-label": "Steps", className: k(tS({ orientation: n })), children: o.map((a, i) => {
13453
- const s = a.id === e, c = t !== -1 && (i < t || r && s), u = Pd(s, c);
13453
+ return /* @__PURE__ */ m("ol", { "aria-label": "Steps", className: k(tS({ orientation: n })), children: a.map((i, s) => {
13454
+ const c = i.id === e, u = t !== -1 && (s < t || r && c), d = Pd(c, u);
13454
13455
  return /* @__PURE__ */ T(
13455
13456
  "li",
13456
13457
  {
@@ -13458,11 +13459,11 @@ function lS({
13458
13459
  "relative flex items-start",
13459
13460
  n === "horizontal" && "flex-1 justify-center"
13460
13461
  ),
13461
- ...s && { "aria-current": "step" },
13462
+ ...c && { "aria-current": "step" },
13462
13463
  children: [
13463
13464
  /* @__PURE__ */ T("span", { className: "sr-only", children: [
13464
- a.label,
13465
- kd(u)
13465
+ i.label,
13466
+ kd(d)
13466
13467
  ] }),
13467
13468
  /* @__PURE__ */ T(
13468
13469
  "div",
@@ -13472,26 +13473,26 @@ function lS({
13472
13473
  n === "vertical" ? "flex-row items-start" : "flex-col items-center"
13473
13474
  ),
13474
13475
  children: [
13475
- /* @__PURE__ */ m("div", { className: k(nS({ status: u })), children: u === "completed" ? /* @__PURE__ */ m(_t, { className: "h-4 w-4", strokeWidth: 3 }) : /* @__PURE__ */ m("span", { children: (i + 1).toString() }) }),
13476
- /* @__PURE__ */ m(
13476
+ /* @__PURE__ */ m("div", { className: k(nS({ status: d })), children: d === "completed" ? /* @__PURE__ */ m(_t, { className: "h-4 w-4", strokeWidth: 3 }) : /* @__PURE__ */ m("span", { children: (s + 1).toString() }) }),
13477
+ o ? /* @__PURE__ */ m(
13477
13478
  Rd,
13478
13479
  {
13479
13480
  className: k(
13480
13481
  "flex flex-col",
13481
13482
  n === "vertical" ? "ml-4" : "mt-2 text-center"
13482
13483
  ),
13483
- description: a.description,
13484
- label: a.label,
13485
- status: u
13484
+ description: i.description,
13485
+ label: i.label,
13486
+ status: d
13486
13487
  }
13487
- )
13488
+ ) : null
13488
13489
  ]
13489
13490
  }
13490
13491
  ),
13491
- i < o.length - 1 ? /* @__PURE__ */ m("div", { className: k(rS({ orientation: n, status: u })) }) : null
13492
+ s < a.length - 1 ? /* @__PURE__ */ m("div", { className: k(rS({ orientation: n, status: d })) }) : null
13492
13493
  ]
13493
13494
  },
13494
- a.id
13495
+ i.id
13495
13496
  );
13496
13497
  }) });
13497
13498
  }
@@ -13501,7 +13502,7 @@ function uS({
13501
13502
  headingLevel: n = "h4",
13502
13503
  totalSteps: r
13503
13504
  }) {
13504
- return /* @__PURE__ */ T(n, { className: "flex items-center gap-3 text-xl", children: [
13505
+ return /* @__PURE__ */ T(n, { className: "mb-0 mt-0 flex items-center gap-3 text-xl", children: [
13505
13506
  /* @__PURE__ */ T("span", { className: "inline-flex items-center gap-1", children: [
13506
13507
  /* @__PURE__ */ m("span", { className: "sr-only", children: "Step" }),
13507
13508
  /* @__PURE__ */ m(
@@ -13522,43 +13523,44 @@ function dS({
13522
13523
  currentStep: e,
13523
13524
  currentStepIndex: t,
13524
13525
  showCurrentAsCompleted: n,
13525
- steps: r
13526
+ showLabels: r,
13527
+ steps: o
13526
13528
  }) {
13527
13529
  return /* @__PURE__ */ m(
13528
13530
  "ol",
13529
13531
  {
13530
13532
  "aria-label": "Steps",
13531
13533
  className: k(aS({ orientation: "horizontal" })),
13532
- children: r.map((o, a) => {
13533
- const i = o.id === e, s = t !== -1 && (a < t || n && i), c = Pd(i, s);
13534
+ children: o.map((a, i) => {
13535
+ const s = a.id === e, c = t !== -1 && (i < t || n && s), u = Pd(s, c);
13534
13536
  return /* @__PURE__ */ T(
13535
13537
  "li",
13536
13538
  {
13537
13539
  className: "flex flex-1 flex-col",
13538
- ...i && { "aria-current": "step" },
13540
+ ...s && { "aria-current": "step" },
13539
13541
  children: [
13540
13542
  /* @__PURE__ */ m(
13541
13543
  "div",
13542
13544
  {
13543
- className: k(sS({ status: c, orientation: "horizontal" })),
13545
+ className: k(sS({ status: u, orientation: "horizontal" })),
13544
13546
  children: /* @__PURE__ */ T("span", { className: "sr-only", children: [
13545
- o.label,
13546
- kd(c)
13547
+ a.label,
13548
+ kd(u)
13547
13549
  ] })
13548
13550
  }
13549
13551
  ),
13550
- /* @__PURE__ */ m(
13552
+ r ? /* @__PURE__ */ m(
13551
13553
  Rd,
13552
13554
  {
13553
13555
  className: "mt-2 flex flex-col",
13554
- description: o.description,
13555
- label: o.label,
13556
- status: c
13556
+ description: a.description,
13557
+ label: a.label,
13558
+ status: u
13557
13559
  }
13558
- )
13560
+ ) : null
13559
13561
  ]
13560
13562
  },
13561
- o.id
13563
+ a.id
13562
13564
  );
13563
13565
  })
13564
13566
  }
@@ -13570,47 +13572,50 @@ function fS({
13570
13572
  headingLevel: n = "h4",
13571
13573
  // orientation = 'horizontal',
13572
13574
  showCurrentAsCompleted: r = !1,
13573
- variant: o = "default",
13574
- steps: a,
13575
- ...i
13576
- }, s) {
13577
- const c = a.findIndex((p) => p.id === t), u = a[c], d = c + 1, f = a.length;
13575
+ showLabels: o = !0,
13576
+ variant: a = "default",
13577
+ steps: i,
13578
+ ...s
13579
+ }, c) {
13580
+ const u = i.findIndex((h) => h.id === t), d = i[u], f = u + 1, p = i.length;
13578
13581
  return /* @__PURE__ */ T(
13579
13582
  "section",
13580
13583
  {
13581
- ref: s,
13584
+ ref: c,
13582
13585
  "aria-label": "Step indicator",
13583
13586
  className: k(
13584
13587
  oS({ orientation: "horizontal" }),
13585
13588
  e
13586
13589
  ),
13587
- ...i,
13590
+ ...s,
13588
13591
  children: [
13589
- o === "counter" ? /* @__PURE__ */ m(
13592
+ a === "counter" ? /* @__PURE__ */ m(
13590
13593
  lS,
13591
13594
  {
13592
13595
  currentStep: t,
13593
- currentStepIndex: c,
13596
+ currentStepIndex: u,
13594
13597
  orientation: "horizontal",
13595
13598
  showCurrentAsCompleted: r,
13596
- steps: a
13599
+ showLabels: o,
13600
+ steps: i
13597
13601
  }
13598
13602
  ) : /* @__PURE__ */ m(
13599
13603
  dS,
13600
13604
  {
13601
13605
  currentStep: t,
13602
- currentStepIndex: c,
13606
+ currentStepIndex: u,
13603
13607
  showCurrentAsCompleted: r,
13604
- steps: a
13608
+ showLabels: o,
13609
+ steps: i
13605
13610
  }
13606
13611
  ),
13607
13612
  /* @__PURE__ */ m(
13608
13613
  uS,
13609
13614
  {
13610
- currentStepLabel: u == null ? void 0 : u.label,
13611
- currentStepNumber: d,
13615
+ currentStepLabel: d == null ? void 0 : d.label,
13616
+ currentStepNumber: f,
13612
13617
  headingLevel: n,
13613
- totalSteps: f
13618
+ totalSteps: p
13614
13619
  }
13615
13620
  )
13616
13621
  ]