fds-vue-core 2.3.3 → 3.0.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.
@@ -659,7 +659,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
659
659
  closeable: { type: Boolean, default: false },
660
660
  collapsable: { type: Boolean, default: false },
661
661
  expanded: { type: Boolean, default: false },
662
- label: { default: "" },
662
+ heading: { default: "" },
663
663
  locale: { default: "sv" },
664
664
  icon: {},
665
665
  dataTestid: { default: void 0 }
@@ -704,7 +704,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
704
704
  return isVisible.value ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ key: 0 }, rootAttrs.value, { class: alertClasses.value }), [
705
705
  vue.createElementVNode("div", null, [
706
706
  vue.createElementVNode("div", null, [
707
- __props.label ? (vue.openBlock(), vue.createElementBlock("div", {
707
+ __props.heading ? (vue.openBlock(), vue.createElementBlock("div", {
708
708
  key: 0,
709
709
  class: vue.normalizeClass(["font-bold w-full justify-between items-start flex gap-2", { "mb-2": (isExpanded.value || !__props.collapsable) && vue.unref(hasSlot) }])
710
710
  }, [
@@ -716,7 +716,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
716
716
  class: "fill-yellow-700"
717
717
  })
718
718
  ]),
719
- vue.createElementVNode("span", _hoisted_3$c, vue.toDisplayString(__props.label), 1)
719
+ vue.createElementVNode("span", _hoisted_3$c, vue.toDisplayString(__props.heading), 1)
720
720
  ]),
721
721
  vue.createElementVNode("div", _hoisted_4$b, [
722
722
  __props.closeable ? (vue.openBlock(), vue.createBlock(_sfc_main$x, vue.mergeProps({
@@ -883,7 +883,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
883
883
  __name: "FdsBlockExpander",
884
884
  props: {
885
885
  disabled: { type: Boolean, default: false },
886
- label: { default: "" },
886
+ heading: { default: "" },
887
887
  open: { type: Boolean, default: false },
888
888
  preIcon: { default: void 0 },
889
889
  stickerColor: { default: void 0 },
@@ -961,7 +961,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
961
961
  vue.createElementVNode("span", _hoisted_3$a, [
962
962
  vue.createElementVNode("span", {
963
963
  class: vue.normalizeClass(["font-bold font-heading text-lg leading-md", { "text-gray-700": __props.disabled }])
964
- }, vue.toDisplayString(__props.label), 3)
964
+ }, vue.toDisplayString(__props.heading), 3)
965
965
  ])
966
966
  ], 2),
967
967
  vue.createElementVNode("span", null, [
@@ -1028,7 +1028,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1028
1028
  props: {
1029
1029
  heading: { default: void 0 },
1030
1030
  icon: { default: void 0 },
1031
- size: { default: "small" },
1031
+ iconSize: { default: "small" },
1032
1032
  dataTestid: { default: void 0 }
1033
1033
  },
1034
1034
  setup(__props) {
@@ -1037,9 +1037,9 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1037
1037
  const contentClasses = vue.computed(() => [
1038
1038
  "rounded-md bg-blue_t-100 mb-4",
1039
1039
  !hasSlot.value && "mb-0!",
1040
- props.size === "small" && "p-4",
1041
- props.size === "small" && hasSlot.value && "pb-6",
1042
- props.size === "large" && props.icon && "p-6"
1040
+ props.iconSize === "small" && "p-4",
1041
+ props.iconSize === "small" && hasSlot.value && "pb-6",
1042
+ props.iconSize === "large" && props.icon && "p-6"
1043
1043
  ]);
1044
1044
  const autoId = `fds-content-block-${Math.random().toString(36).slice(2, 9)}`;
1045
1045
  const contentBlockId = vue.computed(() => props.id ?? autoId);
@@ -1055,7 +1055,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1055
1055
  id: contentBlockId.value,
1056
1056
  class: contentClasses.value
1057
1057
  }, rootAttrs.value), [
1058
- __props.size === "large" && __props.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$g, [
1058
+ __props.iconSize === "large" && __props.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$g, [
1059
1059
  vue.createVNode(_sfc_main$y, {
1060
1060
  name: __props.icon,
1061
1061
  size: largeIconSize,
@@ -1081,7 +1081,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1081
1081
  }, [
1082
1082
  vue.createElementVNode("header", _hoisted_10$2, [
1083
1083
  vue.createElementVNode("div", _hoisted_11$2, [
1084
- __props.icon && __props.size === "small" ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
1084
+ __props.icon && __props.iconSize === "small" ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
1085
1085
  key: 0,
1086
1086
  name: __props.icon,
1087
1087
  size: smallIconSize,
@@ -1113,7 +1113,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1113
1113
  },
1114
1114
  __name: "FdsBlockLink",
1115
1115
  props: {
1116
- label: {},
1116
+ heading: {},
1117
1117
  arrow: { type: Boolean, default: false },
1118
1118
  download: {},
1119
1119
  href: {},
@@ -1210,7 +1210,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1210
1210
  }, [
1211
1211
  vue.createElementVNode("h3", {
1212
1212
  class: vue.normalizeClass(["flex-1 font-heading text-lg tracking-normal m-0 leading-md", headerTextClasses.value])
1213
- }, vue.toDisplayString(__props.label), 3)
1213
+ }, vue.toDisplayString(__props.heading), 3)
1214
1214
  ], 2),
1215
1215
  vue.createElementVNode("div", {
1216
1216
  class: vue.normalizeClass(slotWrapperClasses.value)
@@ -1436,8 +1436,8 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
1436
1436
  props: {
1437
1437
  value: { default: "" },
1438
1438
  targetId: {},
1439
- label: { default: "Kopiera" },
1440
- copiedLabel: { default: "Kopierat!" },
1439
+ text: { default: "Kopiera" },
1440
+ copiedText: { default: "Kopierat!" },
1441
1441
  timeoutMs: { default: 800 },
1442
1442
  disabled: { type: Boolean, default: false },
1443
1443
  dataTestid: { default: void 0 }
@@ -1495,13 +1495,13 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
1495
1495
  return (_ctx, _cache) => {
1496
1496
  return isCopied.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
1497
1497
  vue.createVNode(_sfc_main$y, { name: "bigSuccess" }),
1498
- vue.createElementVNode("span", null, vue.toDisplayString(props.copiedLabel), 1)
1498
+ vue.createElementVNode("span", null, vue.toDisplayString(props.copiedText), 1)
1499
1499
  ])) : (vue.openBlock(), vue.createBlock(_sfc_main$p, {
1500
1500
  key: 1,
1501
1501
  type: "button",
1502
1502
  disabled: props.disabled,
1503
1503
  icon: "copy",
1504
- text: isCopied.value ? props.copiedLabel : props.label,
1504
+ text: isCopied.value ? props.copiedText : props.text,
1505
1505
  dataTestid: __props.dataTestid,
1506
1506
  onClick
1507
1507
  }, null, 8, ["disabled", "text", "dataTestid"]));
@@ -5118,7 +5118,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
5118
5118
  key: 0,
5119
5119
  heading: "localStorage",
5120
5120
  icon: "information",
5121
- size: "small"
5121
+ iconSize: "small"
5122
5122
  }, {
5123
5123
  default: vue.withCtx(() => [
5124
5124
  !localStorageEntries.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$a, "Inga värden i localStorage.")) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$8, [
@@ -5186,7 +5186,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
5186
5186
  key: 1,
5187
5187
  heading: "sessionStorage",
5188
5188
  icon: "information",
5189
- size: "small"
5189
+ iconSize: "small"
5190
5190
  }, {
5191
5191
  default: vue.withCtx(() => [
5192
5192
  !sessionStorageEntries.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, "Inga värden i sessionStorage.")) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
@@ -5254,7 +5254,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
5254
5254
  key: 2,
5255
5255
  heading: "Cookies",
5256
5256
  icon: "information",
5257
- size: "small"
5257
+ iconSize: "small"
5258
5258
  }, {
5259
5259
  default: vue.withCtx(() => [
5260
5260
  !cookieEntries.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, "Inga cookies satta för domänen.")) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, [
@@ -5322,7 +5322,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
5322
5322
  key: 3,
5323
5323
  heading: "Placeholder",
5324
5324
  icon: "information",
5325
- size: "small",
5325
+ iconSize: "small",
5326
5326
  class: "min-h-[200px] flex items-center justify-center text-sm text-gray-500"
5327
5327
  }, {
5328
5328
  default: vue.withCtx(() => [..._cache[21] || (_cache[21] = [
@@ -9206,7 +9206,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9206
9206
  onInput: {}
9207
9207
  },
9208
9208
  emits: ["searchSelected", "paginate", "total", "change", "input", "clearInput"],
9209
- setup(__props, { emit: __emit }) {
9209
+ setup(__props, { expose: __expose, emit: __emit }) {
9210
9210
  const props = __props;
9211
9211
  const searchFields = vue.computed(() => props.searchFields ?? []);
9212
9212
  const emit = __emit;
@@ -9247,6 +9247,17 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9247
9247
  input?.focus();
9248
9248
  });
9249
9249
  };
9250
+ const handleBlurInput = () => {
9251
+ const input = getInputElement();
9252
+ input?.blur();
9253
+ };
9254
+ const handleBlurAndClear = () => {
9255
+ const input = getInputElement();
9256
+ input?.blur();
9257
+ searchTerm.value = "";
9258
+ selectedItem.value = null;
9259
+ valid.value = null;
9260
+ };
9250
9261
  const uncheckAllRadios = () => {
9251
9262
  if (!dropdownRef.value) return;
9252
9263
  const checkedRadio = dropdownRef.value.querySelector(
@@ -9560,6 +9571,12 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9560
9571
  }
9561
9572
  return attrs;
9562
9573
  });
9574
+ __expose({
9575
+ blur: handleBlurInput,
9576
+ clear: handleClear,
9577
+ blurAndClear: handleBlurAndClear,
9578
+ focus: focusInput
9579
+ });
9563
9580
  return (_ctx, _cache) => {
9564
9581
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
9565
9582
  ref_key: "componentRef",