cleek 2.4.73 → 2.4.77

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
@@ -26420,7 +26420,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
26420
26420
  });
26421
26421
  var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-eed7a2c0"]]);
26422
26422
  var ckRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
26423
- const _withScopeId$2 = (n) => (pushScopeId("data-v-2e09b238"), n = n(), popScopeId(), n);
26423
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-0dd8663c"), n = n(), popScopeId(), n);
26424
26424
  const _hoisted_1$8 = ["onKeyup"];
26425
26425
  const _hoisted_2$6 = ["name", "value", "disabled"];
26426
26426
  const _hoisted_3$4 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "c-Radio__element" }, null, -1));
@@ -26432,8 +26432,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
26432
26432
  props: {
26433
26433
  modelValue: null,
26434
26434
  name: null,
26435
+ vertical: { type: Boolean },
26436
+ classes: null,
26435
26437
  options: null,
26436
- disabled: { type: Boolean }
26438
+ disabled: { type: Boolean },
26439
+ value: null,
26440
+ label: null
26437
26441
  },
26438
26442
  emits: ["update:modelValue", "change"],
26439
26443
  setup(__props, { emit: emits }) {
@@ -26452,16 +26456,34 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
26452
26456
  tabindex: props.disabled ? void 0 : "0"
26453
26457
  };
26454
26458
  });
26459
+ const computedOptions = computed$2(() => {
26460
+ if (props.options)
26461
+ return props.options;
26462
+ if (typeof props.value !== void 0) {
26463
+ const label = props.label || props.value;
26464
+ return [{ value: props.value, label }];
26465
+ }
26466
+ return [];
26467
+ });
26468
+ const computedClass = computed$2(() => {
26469
+ const list = [];
26470
+ if (props.vertical)
26471
+ list.push("vertical");
26472
+ if (props.classes)
26473
+ list.push(props.classes);
26474
+ return list;
26475
+ });
26455
26476
  function handleChange(option, event) {
26456
26477
  option.value = value;
26457
26478
  emits("change", event);
26458
26479
  }
26459
26480
  return (_ctx, _cache) => {
26460
- return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
26481
+ return openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(computedOptions), (option, index) => {
26461
26482
  return openBlock(), createElementBlock("label", mergeProps({
26462
- key: `radio-${index}`,
26463
- class: "c-Radio"
26483
+ class: "ck-radio",
26484
+ key: `radio-${index}`
26464
26485
  }, unref$1(radioAttributes), {
26486
+ class: unref$1(computedClass),
26465
26487
  onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(() => {
26466
26488
  }, ["prevent"]), ["space"])),
26467
26489
  onKeyup: [
@@ -26487,7 +26509,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
26487
26509
  };
26488
26510
  }
26489
26511
  });
26490
- var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-2e09b238"]]);
26512
+ var ckRadio = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-0dd8663c"]]);
26491
26513
  var ckSelect_vue_vue_type_style_index_0_scoped_true_lang = "";
26492
26514
  const _hoisted_1$7 = ["disabled"];
26493
26515
  const _hoisted_2$5 = ["value"];