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.
@@ -3,7 +3,11 @@ type __VLS_Props = FdsSelectProps;
3
3
  type __VLS_PublicProps = __VLS_Props & {
4
4
  modelValue?: string;
5
5
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
11
  "update:modelValue": (value: string) => any;
8
12
  } & {
9
13
  change: (ev: Event) => any;
@@ -21,10 +25,21 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
21
25
  name: string;
22
26
  id: string;
23
27
  meta: string;
28
+ options: {
29
+ value: string;
30
+ label: string;
31
+ disabled?: boolean;
32
+ }[];
24
33
  placeholder: string;
25
34
  valid: "true" | "false" | "null";
26
35
  optional: boolean;
27
36
  invalidMessage: string;
28
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
38
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
29
39
  export default _default;
40
+ type __VLS_WithSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
30
45
  //# sourceMappingURL=FdsSelect.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FdsSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FdsSelect/FdsSelect.vue"],"names":[],"mappings":"AAoHA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,KAAK,WAAW,GAAG,cAAc,CAAC;AA2ElC,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;AA2JF,wBAIG"}
1
+ {"version":3,"file":"FdsSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FdsSelect/FdsSelect.vue"],"names":[],"mappings":"AA6HA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,KAAK,WAAW,GAAG,cAAc,CAAC;AAgFlC,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAyIF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA4B/C,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;gBAhQrB,CArHqD;;;;;;4EAyXnD,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAY1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2705,7 +2705,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2705
2705
  name: { default: void 0 },
2706
2706
  id: { default: void 0 },
2707
2707
  placeholder: { default: "Välj..." },
2708
- options: {}
2708
+ options: { default: void 0 }
2709
2709
  }, {
2710
2710
  "modelValue": { default: void 0, required: false },
2711
2711
  "modelModifiers": {}
@@ -2717,6 +2717,8 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2717
2717
  const emit = __emit;
2718
2718
  const autoId = `fds-select-${Math.random().toString(36).slice(2, 9)}`;
2719
2719
  const selectId = vue.computed(() => props.id ?? autoId);
2720
+ const slots = vue.useSlots();
2721
+ const hasDefaultSlot = vue.computed(() => !!slots.default);
2720
2722
  const showInvalidMessage = vue.computed(
2721
2723
  () => props.valid === "false" && !props.optional && props.invalidMessage && !props.disabled
2722
2724
  );
@@ -2761,14 +2763,14 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
2761
2763
  onChange: handleChange,
2762
2764
  onInput: _cache[1] || (_cache[1] = (e) => emit("input", e))
2763
2765
  }), [
2764
- _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_5$3, vue.toDisplayString(_ctx.placeholder), 1)) : vue.createCommentVNode("", true),
2765
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (option) => {
2766
+ _ctx.placeholder && !hasDefaultSlot.value ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_5$3, vue.toDisplayString(_ctx.placeholder), 1)) : vue.createCommentVNode("", true),
2767
+ !hasDefaultSlot.value && _ctx.options ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.options, (option) => {
2766
2768
  return vue.openBlock(), vue.createElementBlock("option", {
2767
2769
  key: option.value,
2768
2770
  value: option.value,
2769
2771
  disabled: option.disabled
2770
2772
  }, vue.toDisplayString(option.label), 9, _hoisted_6$1);
2771
- }), 128))
2773
+ }), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 2 })
2772
2774
  ], 16, _hoisted_4$5), [
2773
2775
  [vue.vModelSelect, internalValue.value]
2774
2776
  ]),