cleek 2.8.0 → 2.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/cleek.es.js CHANGED
@@ -49630,6 +49630,15 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
49630
49630
  list.push(`align--${props.align}`);
49631
49631
  return list;
49632
49632
  });
49633
+ const currentStepGroup = computed$3(() => {
49634
+ if (props.maxStep === 1)
49635
+ return "";
49636
+ if (currentStep.value === 1)
49637
+ return "left";
49638
+ if (currentStep.value === props.maxStep)
49639
+ return "right";
49640
+ return "center";
49641
+ });
49633
49642
  function goToPreviousStep() {
49634
49643
  if (currentStep.value <= 1)
49635
49644
  return;
@@ -49648,25 +49657,64 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
49648
49657
  createVNode$1(_component_ck_button, {
49649
49658
  group: "left",
49650
49659
  icon: "arrow-left",
49660
+ type: unref$2(currentStep) === 1 ? "flat" : "",
49651
49661
  onClick: _cache[0] || (_cache[0] = ($event) => goToPreviousStep())
49652
- }),
49653
- (openBlock$1(true), createElementBlock$1(Fragment$1, null, renderList(__props.maxStep, (stepNumber) => {
49654
- return openBlock$1(), createBlock$1(_component_ck_button, {
49655
- group: "center",
49656
- type: unref$2(currentStep) === stepNumber ? "filled" : "outlined",
49657
- onClick: ($event) => currentStep.value = stepNumber
49658
- }, {
49659
- default: withCtx$1(() => [
49660
- createTextVNode$1(toDisplayString(stepNumber), 1)
49661
- ]),
49662
- _: 2
49663
- }, 1032, ["type", "onClick"]);
49664
- }), 256)),
49662
+ }, null, 8, ["type"]),
49663
+ unref$2(currentStep) - 2 >= 1 ? (openBlock$1(), createBlock$1(_component_ck_button, {
49664
+ key: 0,
49665
+ group: "center",
49666
+ onClick: _cache[1] || (_cache[1] = ($event) => currentStep.value = unref$2(currentStep) - 2)
49667
+ }, {
49668
+ default: withCtx$1(() => [
49669
+ createTextVNode$1(toDisplayString(unref$2(currentStep) - 2), 1)
49670
+ ]),
49671
+ _: 1
49672
+ })) : createCommentVNode$1("", true),
49673
+ unref$2(currentStep) - 1 >= 1 ? (openBlock$1(), createBlock$1(_component_ck_button, {
49674
+ key: 1,
49675
+ group: "center",
49676
+ onClick: _cache[2] || (_cache[2] = ($event) => currentStep.value = unref$2(currentStep) - 1)
49677
+ }, {
49678
+ default: withCtx$1(() => [
49679
+ createTextVNode$1(toDisplayString(unref$2(currentStep) - 1), 1)
49680
+ ]),
49681
+ _: 1
49682
+ })) : createCommentVNode$1("", true),
49683
+ createVNode$1(_component_ck_button, {
49684
+ type: "filled",
49685
+ group: unref$2(currentStepGroup)
49686
+ }, {
49687
+ default: withCtx$1(() => [
49688
+ createTextVNode$1(toDisplayString(unref$2(currentStep)), 1)
49689
+ ]),
49690
+ _: 1
49691
+ }, 8, ["group"]),
49692
+ unref$2(currentStep) + 1 <= __props.maxStep ? (openBlock$1(), createBlock$1(_component_ck_button, {
49693
+ key: 2,
49694
+ group: "center",
49695
+ onClick: _cache[3] || (_cache[3] = ($event) => currentStep.value = unref$2(currentStep) + 1)
49696
+ }, {
49697
+ default: withCtx$1(() => [
49698
+ createTextVNode$1(toDisplayString(unref$2(currentStep) + 1), 1)
49699
+ ]),
49700
+ _: 1
49701
+ })) : createCommentVNode$1("", true),
49702
+ unref$2(currentStep) + 2 <= __props.maxStep ? (openBlock$1(), createBlock$1(_component_ck_button, {
49703
+ key: 3,
49704
+ group: "center",
49705
+ onClick: _cache[4] || (_cache[4] = ($event) => currentStep.value = unref$2(currentStep) + 2)
49706
+ }, {
49707
+ default: withCtx$1(() => [
49708
+ createTextVNode$1(toDisplayString(unref$2(currentStep) + 2), 1)
49709
+ ]),
49710
+ _: 1
49711
+ })) : createCommentVNode$1("", true),
49665
49712
  createVNode$1(_component_ck_button, {
49666
49713
  group: "right",
49667
49714
  icon: "arrow-right",
49668
- onClick: _cache[1] || (_cache[1] = ($event) => goToNextStep())
49669
- })
49715
+ type: unref$2(currentStep) === __props.maxStep ? "flat" : "",
49716
+ onClick: _cache[5] || (_cache[5] = ($event) => goToNextStep())
49717
+ }, null, 8, ["type"])
49670
49718
  ], 2);
49671
49719
  };
49672
49720
  }
@@ -59102,7 +59150,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent$1({
59102
59150
  };
59103
59151
  }
59104
59152
  });
59105
- var ckSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-42bd9396"]]);
59153
+ var ckSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-9c00736c"]]);
59106
59154
  var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
59107
59155
  const _withScopeId$1 = (n) => (pushScopeId$1("data-v-7400e90e"), n = n(), popScopeId$1(), n);
59108
59156
  const _hoisted_1$5 = ["disabled"];