fds-vue-core 2.0.49 → 2.0.50

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.
@@ -2703,7 +2703,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2703
2703
  name: { default: void 0 },
2704
2704
  id: { default: void 0 },
2705
2705
  placeholder: { default: "Välj..." },
2706
- options: {}
2706
+ options: { default: void 0 }
2707
2707
  }, {
2708
2708
  "modelValue": { default: void 0, required: false },
2709
2709
  "modelModifiers": {}
@@ -2715,6 +2715,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2715
2715
  const emit = __emit;
2716
2716
  const autoId = `fds-select-${Math.random().toString(36).slice(2, 9)}`;
2717
2717
  const selectId = computed(() => props.id ?? autoId);
2718
+ const slots = useSlots();
2719
+ const hasDefaultSlot = computed(() => !!slots.default);
2718
2720
  const showInvalidMessage = computed(
2719
2721
  () => props.valid === "false" && !props.optional && props.invalidMessage && !props.disabled
2720
2722
  );
@@ -2759,14 +2761,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2759
2761
  onChange: handleChange,
2760
2762
  onInput: _cache[1] || (_cache[1] = (e) => emit("input", e))
2761
2763
  }), [
2762
- _ctx.placeholder ? (openBlock(), createElementBlock("option", _hoisted_5$3, toDisplayString(_ctx.placeholder), 1)) : createCommentVNode("", true),
2763
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option) => {
2764
+ _ctx.placeholder && !hasDefaultSlot.value ? (openBlock(), createElementBlock("option", _hoisted_5$3, toDisplayString(_ctx.placeholder), 1)) : createCommentVNode("", true),
2765
+ !hasDefaultSlot.value && _ctx.options ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.options, (option) => {
2764
2766
  return openBlock(), createElementBlock("option", {
2765
2767
  key: option.value,
2766
2768
  value: option.value,
2767
2769
  disabled: option.disabled
2768
2770
  }, toDisplayString(option.label), 9, _hoisted_6$1);
2769
- }), 128))
2771
+ }), 128)) : renderSlot(_ctx.$slots, "default", { key: 2 })
2770
2772
  ], 16, _hoisted_4$5), [
2771
2773
  [vModelSelect, internalValue.value]
2772
2774
  ]),