@fkui/vue 5.43.0 → 5.44.0

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.
@@ -1,8 +1,8 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, mergeProps, createTextVNode, createElementVNode, isVNode, Comment, createApp, resolveComponent, withKeys, createCommentVNode, toDisplayString, createVNode, createBlock, withCtx, Fragment, renderList, withModifiers, getCurrentInstance, resolveDynamicComponent, Teleport, normalizeProps, guardReactiveProps, ref, Transition, normalizeStyle, onMounted, toValue, onUnmounted, useSlots, useTemplateRef, watchEffect, nextTick, withDirectives, vShow, watch, readonly, inject, toRef, provide, createSlots, vModelSelect, vModelDynamic, toHandlers, shallowRef, toRefs } from "vue";
2
- import { TranslationService, isSet, configLogic, focus as focus$1, ElementIdService, pushFocus, findTabbableElements, popFocus, scrollTo, Reference, documentOrderComparator, ValidationService, isValidatableHTMLElement, alertScreenReader, debounce, handleTab, deepClone, formatNumber, parseNumber, parseBankAccountNumber, parseBankgiro, parseClearingNumber, formatPersonnummer, parsePersonnummer, parsePlusgiro, formatPostalCode, parsePercent, formatPercent, parseOrganisationsnummer, isInvalidDatesConfig, isInvalidWeekdaysConfig, parseDate, waitForScreenReader, saveFocus, addFocusListener, removeFocusListener, restoreFocus, DomUtils, focusFirst } from "@fkui/logic";
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, mergeProps, createTextVNode, createElementVNode, isVNode, Comment, createApp, resolveComponent, withKeys, createCommentVNode, toDisplayString, createVNode, createBlock, withCtx, Fragment, renderList, withModifiers, getCurrentInstance, resolveDynamicComponent, Teleport, normalizeProps, guardReactiveProps, ref, Transition, normalizeStyle, onMounted, toValue, onUnmounted, useSlots, useTemplateRef, watchEffect, watch, nextTick, withDirectives, vShow, unref, readonly, inject, toRef, provide, createSlots, vModelSelect, vModelDynamic, toHandlers, shallowRef, toRefs } from "vue";
2
+ import { TranslationService, isSet, configLogic, focus as focus$1, ElementIdService, pushFocus, findTabbableElements, popFocus, scrollTo, Reference, documentOrderComparator, ValidationService, isValidatableHTMLElement, alertScreenReader, debounce, handleTab, isEmpty, deepClone, formatNumber, parseNumber, parseBankAccountNumber, parseBankgiro, parseClearingNumber, formatPersonnummer, parsePersonnummer, parsePlusgiro, formatPostalCode, parsePercent, formatPercent, parseOrganisationsnummer, isInvalidDatesConfig, isInvalidWeekdaysConfig, parseDate, waitForScreenReader, saveFocus, addFocusListener, removeFocusListener, restoreFocus, DomUtils, focusFirst } from "@fkui/logic";
3
3
  import { getWeekdayNamings, groupByWeek, FDate, DateFormat } from "@fkui/date";
4
4
  const statuses = ["default", "warning", "error", "success", "info"];
5
- const _sfc_main$1d = /* @__PURE__ */ defineComponent({
5
+ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
6
6
  __name: "FBadge",
7
7
  props: {
8
8
  /**
@@ -1320,7 +1320,7 @@ function requireEs_array_push() {
1320
1320
  requireEs_array_push();
1321
1321
  const Flip = ["horizontal", "vertical"];
1322
1322
  const Rotate = ["90", "180", "270"];
1323
- const _sfc_main$1c = defineComponent({
1323
+ const _sfc_main$1e = defineComponent({
1324
1324
  name: "FIcon",
1325
1325
  inheritAttrs: false,
1326
1326
  props: {
@@ -1408,8 +1408,8 @@ const _export_sfc = (sfc, props) => {
1408
1408
  }
1409
1409
  return target;
1410
1410
  };
1411
- const _hoisted_1$U = ["aria-hidden"];
1412
- const _hoisted_2$F = ["xlink:href"];
1411
+ const _hoisted_1$W = ["aria-hidden"];
1412
+ const _hoisted_2$H = ["xlink:href"];
1413
1413
  function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
1414
1414
  return openBlock(), createElementBlock("svg", mergeProps(_ctx.$attrs, {
1415
1415
  focusable: "false",
@@ -1417,9 +1417,9 @@ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
1417
1417
  "aria-hidden": _ctx.ariaHidden
1418
1418
  }), [renderSlot(_ctx.$slots, "default"), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("use", {
1419
1419
  "xlink:href": _ctx.spriteId
1420
- }, null, 8, _hoisted_2$F)], 16, _hoisted_1$U);
1420
+ }, null, 8, _hoisted_2$H)], 16, _hoisted_1$W);
1421
1421
  }
1422
- const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$10]]);
1422
+ const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$10]]);
1423
1423
  const DATA_TEST_ATTRIBUTE_NAME = "data-test";
1424
1424
  function throwErrorIfEmpty(value) {
1425
1425
  if (!value) {
@@ -3749,7 +3749,7 @@ function elementIsRadioButton(element) {
3749
3749
  function isHTMLInputElement(element) {
3750
3750
  return element instanceof HTMLInputElement;
3751
3751
  }
3752
- const _sfc_main$1b = defineComponent({
3752
+ const _sfc_main$1d = defineComponent({
3753
3753
  name: "FModal",
3754
3754
  components: {
3755
3755
  FIcon
@@ -3923,11 +3923,11 @@ const _sfc_main$1b = defineComponent({
3923
3923
  }
3924
3924
  }
3925
3925
  });
3926
- const _hoisted_1$T = ["id"];
3927
- const _hoisted_2$E = {
3926
+ const _hoisted_1$V = ["id"];
3927
+ const _hoisted_2$G = {
3928
3928
  class: "modal__backdrop"
3929
3929
  };
3930
- const _hoisted_3$w = {
3930
+ const _hoisted_3$x = {
3931
3931
  class: "modal__inner-container"
3932
3932
  };
3933
3933
  const _hoisted_4$r = {
@@ -3939,7 +3939,7 @@ const _hoisted_5$l = {
3939
3939
  const _hoisted_6$g = {
3940
3940
  class: "modal__header"
3941
3941
  };
3942
- const _hoisted_7$d = {
3942
+ const _hoisted_7$e = {
3943
3943
  key: 0,
3944
3944
  ref: "modalTitle",
3945
3945
  class: "modal__title",
@@ -3963,19 +3963,19 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
3963
3963
  key: 0,
3964
3964
  id: _ctx.id,
3965
3965
  class: normalizeClass(["modal", _ctx.modalClass])
3966
- }, [createElementVNode("div", _hoisted_2$E, [createElementVNode("div", {
3966
+ }, [createElementVNode("div", _hoisted_2$G, [createElementVNode("div", {
3967
3967
  class: "modal__outer-container scroll-target",
3968
3968
  tabindex: "-1",
3969
3969
  role: "dialog",
3970
3970
  "aria-modal": "true",
3971
3971
  onKeyup: _cache[3] || (_cache[3] = withKeys((...args) => _ctx.onClose && _ctx.onClose(...args), ["esc"]))
3972
- }, [createElementVNode("div", _hoisted_3$w, [createElementVNode("div", {
3972
+ }, [createElementVNode("div", _hoisted_3$x, [createElementVNode("div", {
3973
3973
  ref: "modalDialogContainer",
3974
3974
  class: normalizeClass(["modal__dialog-container", _ctx.containerClasses])
3975
3975
  }, [createElementVNode("div", _hoisted_4$r, [createElementVNode("div", _hoisted_5$l, [createElementVNode("div", _hoisted_6$g, [createElementVNode("div", {
3976
3976
  tabindex: "0",
3977
3977
  onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.onFocusFirst && _ctx.onFocusFirst(...args))
3978
- }, null, 32), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasHeaderSlot ? (openBlock(), createElementBlock("h1", _hoisted_7$d, [renderSlot(_ctx.$slots, "header")], 512)) : createCommentVNode("", true)]), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("div", _hoisted_8$9, [renderSlot(_ctx.$slots, "content")], 512), _cache[6] || (_cache[6] = createTextVNode()), createElementVNode("div", _hoisted_9$6, [renderSlot(_ctx.$slots, "footer")])]), _cache[9] || (_cache[9] = createTextVNode()), createElementVNode("div", _hoisted_10$4, [createElementVNode("button", {
3978
+ }, null, 32), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasHeaderSlot ? (openBlock(), createElementBlock("h1", _hoisted_7$e, [renderSlot(_ctx.$slots, "header")], 512)) : createCommentVNode("", true)]), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("div", _hoisted_8$9, [renderSlot(_ctx.$slots, "content")], 512), _cache[6] || (_cache[6] = createTextVNode()), createElementVNode("div", _hoisted_9$6, [renderSlot(_ctx.$slots, "footer")])]), _cache[9] || (_cache[9] = createTextVNode()), createElementVNode("div", _hoisted_10$4, [createElementVNode("button", {
3979
3979
  type: "button",
3980
3980
  class: "close-button",
3981
3981
  "aria-label": _ctx.ariaCloseText,
@@ -3985,9 +3985,9 @@ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
3985
3985
  })], 8, _hoisted_11$3), _cache[8] || (_cache[8] = createTextVNode()), createElementVNode("div", {
3986
3986
  tabindex: "0",
3987
3987
  onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.onFocusLast && _ctx.onFocusLast(...args))
3988
- }, null, 32)])])], 2)])], 32)])], 10, _hoisted_1$T)) : createCommentVNode("", true);
3988
+ }, null, 32)])])], 2)])], 32)])], 10, _hoisted_1$V)) : createCommentVNode("", true);
3989
3989
  }
3990
- const FModal = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$$]]);
3990
+ const FModal = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$$]]);
3991
3991
  function prepareButtonList(src, buttonOrder = config.buttonOrder) {
3992
3992
  const list = src.map((it) => {
3993
3993
  var _it$event, _ref, _it$reason, _it$type;
@@ -4016,7 +4016,7 @@ const defaultButtons = [{
4016
4016
  event: "dismiss",
4017
4017
  type: "secondary"
4018
4018
  }];
4019
- const _sfc_main$1a = defineComponent({
4019
+ const _sfc_main$1c = defineComponent({
4020
4020
  name: "FConfirmModal",
4021
4021
  components: {
4022
4022
  FModal
@@ -4120,11 +4120,11 @@ const _sfc_main$1a = defineComponent({
4120
4120
  }
4121
4121
  }
4122
4122
  });
4123
- const _hoisted_1$S = {
4123
+ const _hoisted_1$U = {
4124
4124
  class: "button-group"
4125
4125
  };
4126
- const _hoisted_2$D = ["onClick"];
4127
- const _hoisted_3$v = {
4126
+ const _hoisted_2$F = ["onClick"];
4127
+ const _hoisted_3$w = {
4128
4128
  key: 0,
4129
4129
  class: "sr-only"
4130
4130
  };
@@ -4141,22 +4141,22 @@ function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
4141
4141
  }, {
4142
4142
  header: withCtx(() => [renderSlot(_ctx.$slots, "heading", {}, () => [createTextVNode(toDisplayString(_ctx.heading), 1)])]),
4143
4143
  content: withCtx(() => [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(_ctx.content), 1)])]),
4144
- footer: withCtx(() => [createElementVNode("div", _hoisted_1$S, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.preparedButtons, (button) => {
4144
+ footer: withCtx(() => [createElementVNode("div", _hoisted_1$U, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.preparedButtons, (button) => {
4145
4145
  return openBlock(), createElementBlock("button", {
4146
4146
  key: button.label,
4147
4147
  type: "button",
4148
4148
  class: normalizeClass([button.classlist, "button-group__item"]),
4149
4149
  onClick: ($event) => _ctx.onClick(button)
4150
- }, [createElementVNode("span", null, toDisplayString(button.label), 1), _cache[0] || (_cache[0] = createTextVNode()), button.screenreader ? (openBlock(), createElementBlock("span", _hoisted_3$v, " " + toDisplayString(button.screenreader), 1)) : createCommentVNode("", true)], 10, _hoisted_2$D);
4150
+ }, [createElementVNode("span", null, toDisplayString(button.label), 1), _cache[0] || (_cache[0] = createTextVNode()), button.screenreader ? (openBlock(), createElementBlock("span", _hoisted_3$w, " " + toDisplayString(button.screenreader), 1)) : createCommentVNode("", true)], 10, _hoisted_2$F);
4151
4151
  }), 128))])]),
4152
4152
  _: 3
4153
4153
  }, 8, ["fullscreen", "is-open", "aria-close-text", "size", "focus", "onClose"]);
4154
4154
  }
4155
- const FConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$_]]);
4155
+ const FConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$_]]);
4156
4156
  const GAP = ["1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x"];
4157
4157
  const ALIGNMENT = ["top", "center", "bottom"];
4158
4158
  const FLOAT = ["left", "center", "right"];
4159
- const _sfc_main$19 = defineComponent({
4159
+ const _sfc_main$1b = defineComponent({
4160
4160
  name: "IFlex",
4161
4161
  inheritAttrs: true,
4162
4162
  props: {
@@ -4236,8 +4236,8 @@ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
4236
4236
  class: normalizeClass(["iflex", _ctx.classList])
4237
4237
  }, [renderSlot(_ctx.$slots, "default")], 2);
4238
4238
  }
4239
- const IFlex = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$Z]]);
4240
- const _sfc_main$18 = defineComponent({
4239
+ const IFlex = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$Z]]);
4240
+ const _sfc_main$1a = defineComponent({
4241
4241
  name: "IFlexItem",
4242
4242
  inheritAttrs: true,
4243
4243
  props: {
@@ -4289,7 +4289,7 @@ function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
4289
4289
  class: normalizeClass(["iflex__item", _ctx.classList])
4290
4290
  }, [renderSlot(_ctx.$slots, "default")], 2);
4291
4291
  }
4292
- const IFlexItem = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$Y]]);
4292
+ const IFlexItem = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$Y]]);
4293
4293
  function focusError(item) {
4294
4294
  const element = document.querySelector(`#${item.id}`);
4295
4295
  if (!element) {
@@ -4299,7 +4299,7 @@ function focusError(item) {
4299
4299
  scrollTo(element, window.innerHeight * 0.25);
4300
4300
  focus$1(focusElement2 ? focusElement2 : element);
4301
4301
  }
4302
- const _sfc_main$17 = defineComponent({
4302
+ const _sfc_main$19 = defineComponent({
4303
4303
  name: "FErrorList",
4304
4304
  components: {
4305
4305
  FIcon,
@@ -4355,13 +4355,13 @@ const _sfc_main$17 = defineComponent({
4355
4355
  }
4356
4356
  }
4357
4357
  });
4358
- const _hoisted_1$R = {
4358
+ const _hoisted_1$T = {
4359
4359
  class: "error-list"
4360
4360
  };
4361
- const _hoisted_2$C = {
4361
+ const _hoisted_2$E = {
4362
4362
  key: 0
4363
4363
  };
4364
- const _hoisted_3$u = {
4364
+ const _hoisted_3$v = {
4365
4365
  class: "error-list__list error-list--list-style-none"
4366
4366
  };
4367
4367
  const _hoisted_4$q = ["onClick"];
@@ -4372,7 +4372,7 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
4372
4372
  const _component_f_icon = resolveComponent("f-icon");
4373
4373
  const _component_i_flex_item = resolveComponent("i-flex-item");
4374
4374
  const _component_i_flex = resolveComponent("i-flex");
4375
- return openBlock(), createElementBlock("div", _hoisted_1$R, [createVNode(_component_i_flex, null, {
4375
+ return openBlock(), createElementBlock("div", _hoisted_1$T, [createVNode(_component_i_flex, null, {
4376
4376
  default: withCtx(() => [_ctx.hasTitleSlot ? (openBlock(), createBlock(_component_i_flex_item, {
4377
4377
  key: 0,
4378
4378
  shrink: ""
@@ -4391,7 +4391,7 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
4391
4391
  })) : createCommentVNode("", true), _cache[7] || (_cache[7] = createTextVNode()), createVNode(_component_i_flex_item, {
4392
4392
  grow: ""
4393
4393
  }, {
4394
- default: withCtx(() => [_ctx.hasTitleSlot ? (openBlock(), createElementBlock("div", _hoisted_2$C, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("", true), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("ul", _hoisted_3$u, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
4394
+ default: withCtx(() => [_ctx.hasTitleSlot ? (openBlock(), createElementBlock("div", _hoisted_2$E, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("", true), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("ul", _hoisted_3$v, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
4395
4395
  return openBlock(), createElementBlock("li", {
4396
4396
  key: item.id,
4397
4397
  class: normalizeClass(_ctx.liClasses(item))
@@ -4422,7 +4422,7 @@ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
4422
4422
  _: 3
4423
4423
  })]);
4424
4424
  }
4425
- const FErrorList = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$X]]);
4425
+ const FErrorList = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$X]]);
4426
4426
  function cleanUpElements(vm) {
4427
4427
  return new Promise((resolve) => {
4428
4428
  window.setTimeout(() => {
@@ -4451,7 +4451,7 @@ function sortComponentsWithErrorsOnDOMOrder(componentList) {
4451
4451
  function isFormStepReference(reference) {
4452
4452
  return "isOpen" in reference.ref;
4453
4453
  }
4454
- const _sfc_main$16 = defineComponent({
4454
+ const _sfc_main$18 = defineComponent({
4455
4455
  name: "FValidationGroup",
4456
4456
  props: {
4457
4457
  /**
@@ -4527,13 +4527,13 @@ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
4527
4527
  onComponentUnmount: _cache[1] || (_cache[1] = (...args) => _ctx.onComponentUnmount && _ctx.onComponentUnmount(...args))
4528
4528
  }, [renderSlot(_ctx.$slots, "default")], 32);
4529
4529
  }
4530
- const FValidationGroup = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$W]]);
4530
+ const FValidationGroup = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$W]]);
4531
4531
  var FValidationFormAction = /* @__PURE__ */ ((FValidationFormAction2) => {
4532
4532
  FValidationFormAction2[FValidationFormAction2["CONTINUE"] = 0] = "CONTINUE";
4533
4533
  FValidationFormAction2[FValidationFormAction2["CANCEL"] = 1] = "CANCEL";
4534
4534
  return FValidationFormAction2;
4535
4535
  })(FValidationFormAction || {});
4536
- const _sfc_main$15 = defineComponent({
4536
+ const _sfc_main$17 = defineComponent({
4537
4537
  name: "FValidationForm",
4538
4538
  components: {
4539
4539
  FValidationGroup,
@@ -4672,8 +4672,8 @@ const _sfc_main$15 = defineComponent({
4672
4672
  }
4673
4673
  }
4674
4674
  });
4675
- const _hoisted_1$Q = ["id"];
4676
- const _hoisted_2$B = {
4675
+ const _hoisted_1$S = ["id"];
4676
+ const _hoisted_2$D = {
4677
4677
  key: 0,
4678
4678
  ref: "errors",
4679
4679
  tabindex: "-1",
@@ -4694,19 +4694,19 @@ function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
4694
4694
  novalidate: "",
4695
4695
  autocomplete: "off",
4696
4696
  onSubmit: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onSubmit && _ctx.onSubmit(...args), ["prevent"]))
4697
- }), [_ctx.displayErrors ? (openBlock(), createElementBlock("nav", _hoisted_2$B, [createVNode(_component_f_error_list, {
4697
+ }), [_ctx.displayErrors ? (openBlock(), createElementBlock("nav", _hoisted_2$D, [createVNode(_component_f_error_list, {
4698
4698
  items: _ctx.errors,
4699
4699
  bullets: _ctx.errorListBullets,
4700
4700
  "before-navigate": _ctx.errorListBeforeNavigate
4701
4701
  }, {
4702
4702
  title: withCtx(() => [renderSlot(_ctx.$slots, "error-message")]),
4703
4703
  _: 3
4704
- }, 8, ["items", "bullets", "before-navigate"])], 512)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$Q)]),
4704
+ }, 8, ["items", "bullets", "before-navigate"])], 512)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$S)]),
4705
4705
  _: 3
4706
4706
  }, 8, ["modelValue"]);
4707
4707
  }
4708
- const FValidationForm = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$V]]);
4709
- const _sfc_main$14 = defineComponent({
4708
+ const FValidationForm = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$V]]);
4709
+ const _sfc_main$16 = defineComponent({
4710
4710
  name: "FFormModal",
4711
4711
  components: {
4712
4712
  FModal,
@@ -4858,11 +4858,11 @@ const _sfc_main$14 = defineComponent({
4858
4858
  }
4859
4859
  }
4860
4860
  });
4861
- const _hoisted_1$P = {
4861
+ const _hoisted_1$R = {
4862
4862
  class: "button-group"
4863
4863
  };
4864
- const _hoisted_2$A = ["type", "form", "onClick"];
4865
- const _hoisted_3$t = {
4864
+ const _hoisted_2$C = ["type", "form", "onClick"];
4865
+ const _hoisted_3$u = {
4866
4866
  key: 0,
4867
4867
  class: "sr-only"
4868
4868
  };
@@ -4891,7 +4891,7 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
4891
4891
  default: withCtx(() => [_cache[1] || (_cache[1] = createTextVNode()), renderSlot(_ctx.$slots, "input-text-fields")]),
4892
4892
  _: 3
4893
4893
  }, 8, ["id", "before-submit", "before-validation", "use-error-list", "onSubmit", "onCancel"])]),
4894
- footer: withCtx(() => [createElementVNode("div", _hoisted_1$P, [!_ctx.hasDeprecatedSlots ? (openBlock(true), createElementBlock(Fragment, {
4894
+ footer: withCtx(() => [createElementVNode("div", _hoisted_1$R, [!_ctx.hasDeprecatedSlots ? (openBlock(true), createElementBlock(Fragment, {
4895
4895
  key: 0
4896
4896
  }, renderList(_ctx.preparedButtons, (button) => {
4897
4897
  return openBlock(), createElementBlock("button", {
@@ -4900,7 +4900,7 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
4900
4900
  class: normalizeClass([button.classlist, "button-group__item"]),
4901
4901
  form: button.buttonType === "submit" ? _ctx.formId : void 0,
4902
4902
  onClick: ($event) => button.buttonType === "button" ? _ctx.onCancel() : false
4903
- }, [createElementVNode("span", null, toDisplayString(button.label), 1), _cache[3] || (_cache[3] = createTextVNode()), button.screenreader ? (openBlock(), createElementBlock("span", _hoisted_3$t, " " + toDisplayString(button.screenreader), 1)) : createCommentVNode("", true)], 10, _hoisted_2$A);
4903
+ }, [createElementVNode("span", null, toDisplayString(button.label), 1), _cache[3] || (_cache[3] = createTextVNode()), button.screenreader ? (openBlock(), createElementBlock("span", _hoisted_3$u, " " + toDisplayString(button.screenreader), 1)) : createCommentVNode("", true)], 10, _hoisted_2$C);
4904
4904
  }), 128)) : (openBlock(), createElementBlock(Fragment, {
4905
4905
  key: 1
4906
4906
  }, [createElementVNode("button", {
@@ -4917,7 +4917,7 @@ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
4917
4917
  _: 3
4918
4918
  }, 8, ["data-test", "fullscreen", "is-open", "size", "aria-close-text", "onClose"]);
4919
4919
  }
4920
- const FFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$U]]);
4920
+ const FFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$U]]);
4921
4921
  async function confirmModal(callingInstance, texts) {
4922
4922
  const buttons = [{
4923
4923
  label: texts.confirm,
@@ -5243,7 +5243,7 @@ const ErrorPlugin = {
5243
5243
  }
5244
5244
  }
5245
5245
  };
5246
- const _sfc_main$13 = defineComponent({
5246
+ const _sfc_main$15 = defineComponent({
5247
5247
  name: "FErrorPage",
5248
5248
  props: {
5249
5249
  payload: {
@@ -5253,16 +5253,16 @@ const _sfc_main$13 = defineComponent({
5253
5253
  }
5254
5254
  }
5255
5255
  });
5256
- const _hoisted_1$O = {
5256
+ const _hoisted_1$Q = {
5257
5257
  "data-test": "f-error-page"
5258
5258
  };
5259
5259
  function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
5260
- return openBlock(), createElementBlock("div", _hoisted_1$O, _cache[0] || (_cache[0] = [createElementVNode("h1", null, "Fel", -1), createTextVNode(), createElementVNode("p", null, "Ett fel har uppstått.", -1), createTextVNode(), createElementVNode("a", {
5260
+ return openBlock(), createElementBlock("div", _hoisted_1$Q, _cache[0] || (_cache[0] = [createElementVNode("h1", null, "Fel", -1), createTextVNode(), createElementVNode("p", null, "Ett fel har uppstått.", -1), createTextVNode(), createElementVNode("a", {
5261
5261
  href: "/"
5262
5262
  }, "Gå till startsidan", -1)]));
5263
5263
  }
5264
- const FErrorPage = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$T]]);
5265
- const _sfc_main$12 = defineComponent({
5264
+ const FErrorPage = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$T]]);
5265
+ const _sfc_main$14 = defineComponent({
5266
5266
  name: "FErrorHandlingApp",
5267
5267
  props: {
5268
5268
  defaultComponent: {
@@ -5301,7 +5301,7 @@ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
5301
5301
  key: 2
5302
5302
  })]);
5303
5303
  }
5304
- const FErrorHandlingApp = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$S]]);
5304
+ const FErrorHandlingApp = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$S]]);
5305
5305
  function isMonthBefore(date, minDate) {
5306
5306
  return Boolean(minDate && date.isBefore(minDate.startOfMonth()));
5307
5307
  }
@@ -5312,7 +5312,7 @@ function isInvalidMonth(date, minDate, maxDate) {
5312
5312
  const startOfMonth = date.startOfMonth();
5313
5313
  return isMonthBefore(startOfMonth, minDate) || isMonthAfter(startOfMonth, maxDate);
5314
5314
  }
5315
- function getMessage($t, date, minDate, maxDate) {
5315
+ function getMessage($t2, date, minDate, maxDate) {
5316
5316
  const invalidMonth = isInvalidMonth(date, minDate, maxDate);
5317
5317
  if (!invalidMonth) {
5318
5318
  return void 0;
@@ -5323,7 +5323,7 @@ function getMessage($t, date, minDate, maxDate) {
5323
5323
  monthName,
5324
5324
  year
5325
5325
  } = minDate;
5326
- return $t("fkui.calendar.error.below-min-date", "Du kan inte välja en dag före {{day}} {{month}} {{year}}", {
5326
+ return $t2("fkui.calendar.error.below-min-date", "Du kan inte välja en dag före {{day}} {{month}} {{year}}", {
5327
5327
  day,
5328
5328
  month: monthName,
5329
5329
  year
@@ -5335,14 +5335,14 @@ function getMessage($t, date, minDate, maxDate) {
5335
5335
  monthName,
5336
5336
  year
5337
5337
  } = maxDate;
5338
- return $t("fkui.calendar.error.above-max-date", "Du kan inte välja en dag efter {{day}} {{month}} {{year}}", {
5338
+ return $t2("fkui.calendar.error.above-max-date", "Du kan inte välja en dag efter {{day}} {{month}} {{year}}", {
5339
5339
  day,
5340
5340
  month: monthName,
5341
5341
  year
5342
5342
  });
5343
5343
  }
5344
5344
  }
5345
- const _sfc_main$11 = defineComponent({
5345
+ const _sfc_main$13 = defineComponent({
5346
5346
  name: "ICalendarNavbar",
5347
5347
  components: {
5348
5348
  FIcon
@@ -5456,14 +5456,14 @@ const _sfc_main$11 = defineComponent({
5456
5456
  }
5457
5457
  }
5458
5458
  });
5459
- const _hoisted_1$N = {
5459
+ const _hoisted_1$P = {
5460
5460
  class: "calendar-navbar"
5461
5461
  };
5462
- const _hoisted_2$z = {
5462
+ const _hoisted_2$B = {
5463
5463
  class: "calendar-navbar__month",
5464
5464
  tabindex: "-1"
5465
5465
  };
5466
- const _hoisted_3$s = ["aria-disabled", "aria-live"];
5466
+ const _hoisted_3$t = ["aria-disabled", "aria-live"];
5467
5467
  const _hoisted_4$o = {
5468
5468
  class: "sr-only"
5469
5469
  };
@@ -5473,7 +5473,7 @@ const _hoisted_6$f = {
5473
5473
  };
5474
5474
  function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
5475
5475
  const _component_f_icon = resolveComponent("f-icon");
5476
- return openBlock(), createElementBlock("div", _hoisted_1$N, [createElementVNode("div", _hoisted_2$z, toDisplayString(_ctx.currentText), 1), _cache[4] || (_cache[4] = createTextVNode()), createElementVNode("button", {
5476
+ return openBlock(), createElementBlock("div", _hoisted_1$P, [createElementVNode("div", _hoisted_2$B, toDisplayString(_ctx.currentText), 1), _cache[4] || (_cache[4] = createTextVNode()), createElementVNode("button", {
5477
5477
  ref: "previousButton",
5478
5478
  class: "calendar-navbar__arrow calendar-navbar__arrow--previous",
5479
5479
  type: "button",
@@ -5483,7 +5483,7 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
5483
5483
  }, [createElementVNode("span", _hoisted_4$o, toDisplayString(_ctx.previousSrText), 1), _cache[2] || (_cache[2] = createTextVNode()), createVNode(_component_f_icon, {
5484
5484
  class: normalizeClass(_ctx.previousIconClasses),
5485
5485
  name: "arrow-right"
5486
- }, null, 8, ["class"])], 8, _hoisted_3$s), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("button", {
5486
+ }, null, 8, ["class"])], 8, _hoisted_3$t), _cache[5] || (_cache[5] = createTextVNode()), createElementVNode("button", {
5487
5487
  ref: "nextButton",
5488
5488
  class: "calendar-navbar__arrow calendar-navbar__arrow--next",
5489
5489
  type: "button",
@@ -5495,14 +5495,14 @@ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
5495
5495
  name: "arrow-right"
5496
5496
  }, null, 8, ["class"])], 8, _hoisted_5$j)]);
5497
5497
  }
5498
- const ICalendarNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$R]]);
5498
+ const ICalendarNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$R]]);
5499
5499
  function getDayStartOffset(days) {
5500
5500
  return days[0].weekDay - 1;
5501
5501
  }
5502
5502
  function getDayEndOffset(days) {
5503
5503
  return 7 - days[days.length - 1].weekDay;
5504
5504
  }
5505
- const _sfc_main$10 = defineComponent({
5505
+ const _sfc_main$12 = defineComponent({
5506
5506
  name: "ICalendarMonthGrid",
5507
5507
  props: {
5508
5508
  /**
@@ -5573,14 +5573,14 @@ const _sfc_main$10 = defineComponent({
5573
5573
  }
5574
5574
  }
5575
5575
  });
5576
- const _hoisted_1$M = {
5576
+ const _hoisted_1$O = {
5577
5577
  key: 0,
5578
5578
  class: "calendar-month__col--week"
5579
5579
  };
5580
- const _hoisted_2$y = {
5580
+ const _hoisted_2$A = {
5581
5581
  role: "presentation"
5582
5582
  };
5583
- const _hoisted_3$r = {
5583
+ const _hoisted_3$s = {
5584
5584
  role: "presentation"
5585
5585
  };
5586
5586
  const _hoisted_4$n = {
@@ -5593,7 +5593,7 @@ const _hoisted_5$i = ["title"];
5593
5593
  const _hoisted_6$e = {
5594
5594
  role: "presentation"
5595
5595
  };
5596
- const _hoisted_7$c = {
5596
+ const _hoisted_7$d = {
5597
5597
  key: 0,
5598
5598
  class: "calendar-month__cell calendar-month__cell--week-number",
5599
5599
  "aria-hidden": "true"
@@ -5616,7 +5616,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5616
5616
  role: "application",
5617
5617
  onFocusin: _cache[0] || (_cache[0] = (...args) => _ctx.onFocusin && _ctx.onFocusin(...args)),
5618
5618
  onFocusout: _cache[1] || (_cache[1] = (...args) => _ctx.onFocusout && _ctx.onFocusout(...args))
5619
- }, [createElementVNode("colgroup", null, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("col", _hoisted_1$M)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), _cache[3] || (_cache[3] = createElementVNode("col", {
5619
+ }, [createElementVNode("colgroup", null, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("col", _hoisted_1$O)) : createCommentVNode("", true), _cache[2] || (_cache[2] = createTextVNode()), _cache[3] || (_cache[3] = createElementVNode("col", {
5620
5620
  class: "calendar-month__col--day"
5621
5621
  }, null, -1)), _cache[4] || (_cache[4] = createTextVNode()), _cache[5] || (_cache[5] = createElementVNode("col", {
5622
5622
  class: "calendar-month__col--day"
@@ -5630,7 +5630,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5630
5630
  class: "calendar-month__col--day"
5631
5631
  }, null, -1)), _cache[14] || (_cache[14] = createTextVNode()), _cache[15] || (_cache[15] = createElementVNode("col", {
5632
5632
  class: "calendar-month__col--day"
5633
- }, null, -1))]), _cache[22] || (_cache[22] = createTextVNode()), createElementVNode("thead", _hoisted_2$y, [createElementVNode("tr", _hoisted_3$r, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("th", _hoisted_4$n)) : createCommentVNode("", true), _cache[16] || (_cache[16] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.weekdays, (weekday) => {
5633
+ }, null, -1))]), _cache[22] || (_cache[22] = createTextVNode()), createElementVNode("thead", _hoisted_2$A, [createElementVNode("tr", _hoisted_3$s, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("th", _hoisted_4$n)) : createCommentVNode("", true), _cache[16] || (_cache[16] = createTextVNode()), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.weekdays, (weekday) => {
5634
5634
  return openBlock(), createElementBlock("th", {
5635
5635
  key: weekday.name,
5636
5636
  scope: "col",
@@ -5644,7 +5644,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5644
5644
  return openBlock(), createElementBlock("tr", {
5645
5645
  key: week.week,
5646
5646
  role: "presentation"
5647
- }, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("td", _hoisted_7$c, toDisplayString(week.week), 1)) : createCommentVNode("", true), _cache[17] || (_cache[17] = createTextVNode()), _ctx.getDayStartOffset(week.days) ? (openBlock(), createElementBlock("td", {
5647
+ }, [!_ctx.internalHideWeekNumbers ? (openBlock(), createElementBlock("td", _hoisted_7$d, toDisplayString(week.week), 1)) : createCommentVNode("", true), _cache[17] || (_cache[17] = createTextVNode()), _ctx.getDayStartOffset(week.days) ? (openBlock(), createElementBlock("td", {
5648
5648
  key: 1,
5649
5649
  class: "calendar-month__cell",
5650
5650
  colspan: _ctx.getDayStartOffset(week.days),
@@ -5674,7 +5674,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5674
5674
  "aria-hidden": "true"
5675
5675
  }, null, 8, _hoisted_13$1)])) : createCommentVNode("", true)])], 32);
5676
5676
  }
5677
- const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$Q]]);
5677
+ const ICalendarMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$Q]]);
5678
5678
  const DayStep = {
5679
5679
  ArrowRight: 1,
5680
5680
  ArrowLeft: -1,
@@ -5698,7 +5698,7 @@ function getDayTabindex(date, active, entry) {
5698
5698
  return date.day === 1 ? 0 : -1;
5699
5699
  }
5700
5700
  }
5701
- const _sfc_main$$ = defineComponent({
5701
+ const _sfc_main$11 = defineComponent({
5702
5702
  name: "ICalendarMonth",
5703
5703
  components: {
5704
5704
  ICalendarMonthGrid
@@ -5784,7 +5784,7 @@ const _sfc_main$$ = defineComponent({
5784
5784
  }
5785
5785
  }
5786
5786
  });
5787
- const _hoisted_1$L = ["data-date", "tabindex", "onClick", "onKeydown"];
5787
+ const _hoisted_1$N = ["data-date", "tabindex", "onClick", "onKeydown"];
5788
5788
  function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
5789
5789
  const _component_i_calendar_month_grid = resolveComponent("i-calendar-month-grid");
5790
5790
  return openBlock(), createBlock(_component_i_calendar_month_grid, {
@@ -5804,12 +5804,12 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
5804
5804
  }, [renderSlot(_ctx.$slots, "default", {
5805
5805
  date,
5806
5806
  isFocused: _ctx.isDayFocused(date)
5807
- })], 40, _hoisted_1$L)]),
5807
+ })], 40, _hoisted_1$N)]),
5808
5808
  _: 3
5809
5809
  }, 8, ["value"]);
5810
5810
  }
5811
- const ICalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$P]]);
5812
- const _sfc_main$_ = defineComponent({
5811
+ const ICalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$P]]);
5812
+ const _sfc_main$10 = defineComponent({
5813
5813
  name: "FCalendar",
5814
5814
  components: {
5815
5815
  ICalendarNavbar,
@@ -5861,13 +5861,13 @@ const _sfc_main$_ = defineComponent({
5861
5861
  }
5862
5862
  }
5863
5863
  });
5864
- const _hoisted_1$K = {
5864
+ const _hoisted_1$M = {
5865
5865
  class: "calendar__wrapper"
5866
5866
  };
5867
5867
  function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
5868
5868
  const _component_i_calendar_navbar = resolveComponent("i-calendar-navbar");
5869
5869
  const _component_i_calendar_month = resolveComponent("i-calendar-month");
5870
- return openBlock(), createElementBlock("div", _hoisted_1$K, [createVNode(_component_i_calendar_navbar, {
5870
+ return openBlock(), createElementBlock("div", _hoisted_1$M, [createVNode(_component_i_calendar_navbar, {
5871
5871
  "model-value": _ctx.modelValue,
5872
5872
  "min-date": _ctx.minDate,
5873
5873
  "max-date": _ctx.maxDate,
@@ -5890,7 +5890,7 @@ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
5890
5890
  _: 3
5891
5891
  }, 8, ["model-value", "min-date", "max-date", "tab-date", "onClick", "onUpdate:modelValue"])]);
5892
5892
  }
5893
- const FCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$O]]);
5893
+ const FCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$O]]);
5894
5894
  function getCalendarDaySrText(day, enabled, selected, t) {
5895
5895
  const parts = [];
5896
5896
  if (!enabled) {
@@ -5909,7 +5909,7 @@ function getCalendarDaySrText(day, enabled, selected, t) {
5909
5909
  parts.push(day.toString(DateFormat.FULL));
5910
5910
  return parts.join(" ");
5911
5911
  }
5912
- const _sfc_main$Z = defineComponent({
5912
+ const _sfc_main$$ = defineComponent({
5913
5913
  name: "FCalendarDay",
5914
5914
  mixins: [TranslationMixin],
5915
5915
  props: {
@@ -5974,18 +5974,18 @@ const _sfc_main$Z = defineComponent({
5974
5974
  }
5975
5975
  }
5976
5976
  });
5977
- const _hoisted_1$J = {
5977
+ const _hoisted_1$L = {
5978
5978
  "aria-hidden": "true"
5979
5979
  };
5980
- const _hoisted_2$x = {
5980
+ const _hoisted_2$z = {
5981
5981
  class: "sr-only"
5982
5982
  };
5983
5983
  function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
5984
5984
  return openBlock(), createElementBlock("span", {
5985
5985
  class: normalizeClass(_ctx.dayClasses)
5986
- }, [createElementVNode("span", _hoisted_1$J, toDisplayString(_ctx.day.day), 1), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("span", _hoisted_2$x, toDisplayString(_ctx.srText), 1)], 2);
5986
+ }, [createElementVNode("span", _hoisted_1$L, toDisplayString(_ctx.day.day), 1), _cache[0] || (_cache[0] = createTextVNode()), createElementVNode("span", _hoisted_2$z, toDisplayString(_ctx.srText), 1)], 2);
5987
5987
  }
5988
- const FCalendarDay = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$N]]);
5988
+ const FCalendarDay = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$N]]);
5989
5989
  function offset(page, el) {
5990
5990
  const rect = el.getBoundingClientRect();
5991
5991
  return {
@@ -6270,7 +6270,7 @@ function isTeleportDisabled(options) {
6270
6270
  }
6271
6271
  return disableTeleport;
6272
6272
  }
6273
- const _sfc_main$Y = defineComponent({
6273
+ const _sfc_main$_ = defineComponent({
6274
6274
  name: "IPopup",
6275
6275
  inheritAttrs: false,
6276
6276
  props: {
@@ -6582,7 +6582,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
6582
6582
  placement: _ctx.placement
6583
6583
  })))], 544)], 16)], 8, ["to", "disabled"])) : createCommentVNode("", true);
6584
6584
  }
6585
- const IPopup = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$M]]);
6585
+ const IPopup = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$M]]);
6586
6586
  function isContextMenuTextItem(value) {
6587
6587
  return typeof value.key === "string";
6588
6588
  }
@@ -6630,7 +6630,7 @@ async function doMenuAction$2(action, target) {
6630
6630
  }
6631
6631
  const preventKeys$2 = ["Tab", "Up", "Down", "ArrowUp", "ArrowDown", "Home", "End", " ", "Spacebar", "Enter", "Escape"];
6632
6632
  const keyUp = ["ArrowUp", "Up"];
6633
- const _sfc_main$X = defineComponent({
6633
+ const _sfc_main$Z = defineComponent({
6634
6634
  name: "FContextMenu",
6635
6635
  components: {
6636
6636
  IPopup,
@@ -6794,14 +6794,14 @@ const _sfc_main$X = defineComponent({
6794
6794
  }
6795
6795
  }
6796
6796
  });
6797
- const _hoisted_1$I = ["aria-label"];
6798
- const _hoisted_2$w = {
6797
+ const _hoisted_1$K = ["aria-label"];
6798
+ const _hoisted_2$y = {
6799
6799
  ref: "contextmenu",
6800
6800
  role: "menu",
6801
6801
  tabindex: "-1",
6802
6802
  class: "contextmenu__list"
6803
6803
  };
6804
- const _hoisted_3$q = ["onClick"];
6804
+ const _hoisted_3$r = ["onClick"];
6805
6805
  const _hoisted_4$m = ["tabindex"];
6806
6806
  const _hoisted_5$h = {
6807
6807
  key: 0,
@@ -6824,7 +6824,7 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
6824
6824
  "aria-label": _ctx.ariaLabel,
6825
6825
  onKeyup: _cache[0] || (_cache[0] = (...args) => _ctx.onKeyUp && _ctx.onKeyUp(...args)),
6826
6826
  onKeydown: _cache[1] || (_cache[1] = (...args) => _ctx.onKeyDown && _ctx.onKeyDown(...args))
6827
- }, [createElementVNode("ul", _hoisted_2$w, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.popupItems, (item, index) => {
6827
+ }, [createElementVNode("ul", _hoisted_2$y, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.popupItems, (item, index) => {
6828
6828
  return openBlock(), createElementBlock("li", {
6829
6829
  key: item.key,
6830
6830
  role: "menuitem",
@@ -6842,13 +6842,13 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
6842
6842
  }, null, 8, ["name", "library"])) : createCommentVNode("", true), _cache[3] || (_cache[3] = createTextVNode()), createElementVNode("a", {
6843
6843
  ref_for: true,
6844
6844
  ref: "anchors"
6845
- }, toDisplayString(item.label), 513)], 8, _hoisted_4$m), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasSeparatorAfterItemAt(index) ? (openBlock(), createElementBlock("hr", _hoisted_5$h)) : createCommentVNode("", true)], 8, _hoisted_3$q);
6846
- }), 128))], 512)], 40, _hoisted_1$I)]),
6845
+ }, toDisplayString(item.label), 513)], 8, _hoisted_4$m), _cache[4] || (_cache[4] = createTextVNode()), _ctx.hasSeparatorAfterItemAt(index) ? (openBlock(), createElementBlock("hr", _hoisted_5$h)) : createCommentVNode("", true)], 8, _hoisted_3$r);
6846
+ }), 128))], 512)], 40, _hoisted_1$K)]),
6847
6847
  _: 1
6848
6848
  }, 8, ["is-open", "anchor", "focus-element"]);
6849
6849
  }
6850
- const FContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$L]]);
6851
- const _sfc_main$W = defineComponent({
6850
+ const FContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$L]]);
6851
+ const _sfc_main$Y = defineComponent({
6852
6852
  name: "FExpand",
6853
6853
  data() {
6854
6854
  return {
@@ -6914,7 +6914,7 @@ function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
6914
6914
  _: 3
6915
6915
  }, 8, ["onEnter", "onAfterEnter", "onLeave"]);
6916
6916
  }
6917
- const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$K]]);
6917
+ const FExpand = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$K]]);
6918
6918
  function computeArrowOffset(placement, inputIconRect, wrapperRect) {
6919
6919
  switch (placement) {
6920
6920
  case Placement.A: {
@@ -6978,7 +6978,7 @@ function computeArrowOffset(placement, inputIconRect, wrapperRect) {
6978
6978
  }
6979
6979
  }
6980
6980
  const POPUP_SPACING = 10;
6981
- const _sfc_main$V = defineComponent({
6981
+ const _sfc_main$X = defineComponent({
6982
6982
  name: "IPopupError",
6983
6983
  components: {
6984
6984
  FIcon
@@ -7113,7 +7113,7 @@ const _sfc_main$V = defineComponent({
7113
7113
  }
7114
7114
  }
7115
7115
  });
7116
- const _hoisted_1$H = {
7116
+ const _hoisted_1$J = {
7117
7117
  ref: "wrapper",
7118
7118
  class: "popup-error__wrapper"
7119
7119
  };
@@ -7127,7 +7127,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
7127
7127
  ref: "popup",
7128
7128
  class: normalizeClass(_ctx.popupClasses),
7129
7129
  "aria-hidden": "true"
7130
- }, [createElementVNode("div", _hoisted_1$H, [createElementVNode("div", {
7130
+ }, [createElementVNode("div", _hoisted_1$J, [createElementVNode("div", {
7131
7131
  class: normalizeClass(_ctx.arrowClass),
7132
7132
  style: normalizeStyle(_ctx.errorStyle)
7133
7133
  }, [createElementVNode("span", null, toDisplayString(_ctx.errorMessage), 1), _cache[1] || (_cache[1] = createTextVNode()), createElementVNode("button", {
@@ -7141,7 +7141,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
7141
7141
  class: "button__icon"
7142
7142
  })])], 6)], 512)], 2)], 8, ["disabled"])) : createCommentVNode("", true);
7143
7143
  }
7144
- const IPopupError = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$J]]);
7144
+ const IPopupError = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$J]]);
7145
7145
  function useEventListener(target, event, callback) {
7146
7146
  onMounted(() => {
7147
7147
  var _a;
@@ -7162,15 +7162,16 @@ function useSlotUtils() {
7162
7162
  }
7163
7163
  };
7164
7164
  }
7165
- function numItems(itemHeight, availableHeight) {
7166
- return Math.min(Math.floor(availableHeight / itemHeight), 6);
7165
+ function numItems(itemHeight, availableHeight, verticalSpacing) {
7166
+ const itemsFit = Math.floor((availableHeight - verticalSpacing) / itemHeight);
7167
+ return Math.min(itemsFit, 7);
7167
7168
  }
7168
- function tryBelow(itemHeight, numOfItems, anchor, viewport) {
7169
+ function tryBelow(itemHeight, numOfItems, anchor, viewport, verticalSpacing) {
7169
7170
  const p1 = viewport.y + viewport.height;
7170
7171
  const p2 = anchor.y + anchor.height;
7171
7172
  const availableHeight = p1 - p2;
7172
- const itemsFit = numItems(itemHeight, availableHeight);
7173
- if (itemsFit < 2) {
7173
+ const itemsFit = numItems(itemHeight, availableHeight, verticalSpacing);
7174
+ if (itemsFit < 3) {
7174
7175
  return void 0;
7175
7176
  }
7176
7177
  const fittedHeight = itemHeight * Math.min(numOfItems, itemsFit);
@@ -7181,18 +7182,18 @@ function tryBelow(itemHeight, numOfItems, anchor, viewport) {
7181
7182
  height: fittedHeight
7182
7183
  };
7183
7184
  }
7184
- function tryAbove(itemHeight, numOfItems, anchor, viewport) {
7185
+ function tryAbove(itemHeight, numOfItems, anchor, viewport, verticalSpacing) {
7185
7186
  const p1 = viewport.y;
7186
7187
  const p2 = anchor.y;
7187
7188
  const availableHeight = p2 - p1;
7188
- const itemsFit = numItems(itemHeight, availableHeight);
7189
- if (itemsFit < 2) {
7189
+ const itemsFit = numItems(itemHeight, availableHeight, verticalSpacing);
7190
+ if (itemsFit < 3) {
7190
7191
  return void 0;
7191
7192
  }
7192
7193
  const fittedHeight = itemHeight * Math.min(numOfItems, itemsFit);
7193
7194
  return {
7194
7195
  left: anchor.x,
7195
- top: anchor.y - fittedHeight,
7196
+ top: anchor.y - fittedHeight - verticalSpacing,
7196
7197
  width: anchor.width,
7197
7198
  height: fittedHeight
7198
7199
  };
@@ -7203,7 +7204,8 @@ function computeListboxRect(anchor, options, root = document.documentElement, {
7203
7204
  } = window) {
7204
7205
  const {
7205
7206
  itemHeight,
7206
- numOfItems
7207
+ numOfItems,
7208
+ verticalSpacing
7207
7209
  } = options;
7208
7210
  const rect = anchor.getBoundingClientRect();
7209
7211
  const anchorRect = {
@@ -7216,19 +7218,22 @@ function computeListboxRect(anchor, options, root = document.documentElement, {
7216
7218
  y: scrollY,
7217
7219
  height: root.clientHeight
7218
7220
  };
7219
- const d = tryBelow(itemHeight, numOfItems, anchorRect, viewportRect);
7220
- if (d) {
7221
- return d;
7221
+ const below = tryBelow(itemHeight, numOfItems, anchorRect, viewportRect, verticalSpacing);
7222
+ if (below) {
7223
+ return below;
7222
7224
  }
7223
- const u = tryAbove(itemHeight, numOfItems, anchorRect, viewportRect);
7224
- if (u) {
7225
- return u;
7225
+ const above = tryAbove(itemHeight, numOfItems, anchorRect, viewportRect, verticalSpacing);
7226
+ if (above) {
7227
+ return above;
7226
7228
  }
7227
7229
  return void 0;
7228
7230
  }
7229
- const _hoisted_1$G = ["onKeyup"];
7231
+ const _hoisted_1$I = ["onKeyup"];
7232
+ const _hoisted_2$x = {
7233
+ ref: "content"
7234
+ };
7230
7235
  const teleportDisabled = false;
7231
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
7236
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
7232
7237
  __name: "IPopupListbox",
7233
7238
  props: {
7234
7239
  isOpen: {
@@ -7236,21 +7241,39 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
7236
7241
  },
7237
7242
  anchor: {},
7238
7243
  numOfItems: {},
7239
- itemHeight: {}
7244
+ itemHeight: {},
7245
+ activeElement: {}
7240
7246
  },
7241
7247
  emits: ["close"],
7242
7248
  setup(__props, {
7243
7249
  emit: __emit
7244
7250
  }) {
7245
7251
  const emit = __emit;
7246
- const wrapper = useTemplateRef("wrapper");
7247
- const content = useTemplateRef("content");
7252
+ const wrapperRef = useTemplateRef("wrapper");
7253
+ const contentRef = useTemplateRef("content");
7248
7254
  const popupClasses = ["popup", "popup--overlay"];
7249
7255
  const teleportTarget = computed(() => {
7250
7256
  var _config$popupTarget;
7251
7257
  return (_config$popupTarget = config.popupTarget) !== null && _config$popupTarget !== void 0 ? _config$popupTarget : config.teleportTarget;
7252
7258
  });
7259
+ let guessedItemHeight = void 0;
7260
+ let verticalSpacing = void 0;
7253
7261
  useEventListener(__props.anchor, "keyup", onKeyEsc);
7262
+ watchEffect(() => {
7263
+ if (wrapperRef.value && __props.activeElement !== void 0) {
7264
+ const centerPosition = __props.activeElement.offsetTop - (wrapperRef.value.getBoundingClientRect().height - __props.activeElement.getBoundingClientRect().height) / 2;
7265
+ if (!isElementInsideViewport(wrapperRef.value)) {
7266
+ wrapperRef.value.scrollIntoView({
7267
+ behavior: "instant",
7268
+ block: "nearest"
7269
+ });
7270
+ }
7271
+ wrapperRef.value.scrollTo({
7272
+ top: centerPosition,
7273
+ behavior: "instant"
7274
+ });
7275
+ }
7276
+ });
7254
7277
  function addListeners() {
7255
7278
  document.addEventListener("click", onDocumentClickHandler);
7256
7279
  window.addEventListener("resize", debounce(onResize, 100));
@@ -7259,6 +7282,14 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
7259
7282
  document.removeEventListener("click", onDocumentClickHandler);
7260
7283
  window.removeEventListener("resize", debounce(onResize, 100));
7261
7284
  }
7285
+ function isElementInsideViewport(element) {
7286
+ const rect = element.getBoundingClientRect();
7287
+ const windowHeight = window.innerHeight || document.documentElement.clientHeight;
7288
+ const windowWidth = window.innerWidth || document.documentElement.clientWidth;
7289
+ const insideX = rect.left >= 0 && rect.left + rect.width <= windowWidth;
7290
+ const insideY = rect.top >= 0 && rect.top + rect.height <= windowHeight;
7291
+ return insideX && insideY;
7292
+ }
7262
7293
  watchEffect(() => {
7263
7294
  if (__props.isOpen) {
7264
7295
  calculatePosition();
@@ -7271,6 +7302,11 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
7271
7302
  removeListeners();
7272
7303
  }
7273
7304
  });
7305
+ watch(() => __props.numOfItems, (oldValue, newValue) => {
7306
+ if (oldValue !== newValue && __props.isOpen) {
7307
+ calculatePosition();
7308
+ }
7309
+ });
7274
7310
  onUnmounted(removeListeners);
7275
7311
  function onDocumentClickHandler() {
7276
7312
  emit("close");
@@ -7291,21 +7327,30 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
7291
7327
  async function calculatePosition() {
7292
7328
  var _a;
7293
7329
  await nextTick();
7294
- const wrapperElement = wrapper.value;
7295
- const contentWrapper = content.value;
7330
+ const wrapperElement = wrapperRef.value;
7331
+ const contentWrapper = contentRef.value;
7296
7332
  if (!__props.anchor || !wrapperElement || !contentWrapper) {
7297
7333
  return;
7298
7334
  }
7299
7335
  let contentItemHeigth = __props.itemHeight;
7300
7336
  if (!contentItemHeigth) {
7301
- contentItemHeigth = guessItemHeight(__props.numOfItems, contentWrapper);
7337
+ if (!guessedItemHeight) {
7338
+ guessedItemHeight = guessItemHeight(__props.numOfItems, contentWrapper);
7339
+ }
7340
+ contentItemHeigth = guessedItemHeight;
7341
+ }
7342
+ if (verticalSpacing === void 0) {
7343
+ const absWrapper = getAbsolutePosition(wrapperElement);
7344
+ const marginTotal = absWrapper.y * 2;
7345
+ verticalSpacing = Math.ceil(absWrapper.height - contentItemHeigth * __props.numOfItems) + marginTotal;
7302
7346
  }
7303
7347
  wrapperElement.style.overflowY = "auto";
7304
- wrapperElement.style.left = `0px`;
7305
- wrapperElement.style.boxShadow = "none";
7348
+ wrapperElement.style.overflowX = "hidden";
7349
+ wrapperElement.style.left = "0px";
7306
7350
  const rect = computeListboxRect(__props.anchor, {
7307
7351
  itemHeight: contentItemHeigth,
7308
- numOfItems: __props.numOfItems
7352
+ numOfItems: __props.numOfItems,
7353
+ verticalSpacing
7309
7354
  });
7310
7355
  if (rect) {
7311
7356
  var _offsetRect$x;
@@ -7319,8 +7364,9 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
7319
7364
  const offsetLeft = (_offsetRect$x = offsetRect == null ? void 0 : offsetRect.x) !== null && _offsetRect$x !== void 0 ? _offsetRect$x : 0;
7320
7365
  wrapperElement.style.top = `${top}px`;
7321
7366
  wrapperElement.style.left = `${left - offsetLeft}px`;
7322
- wrapperElement.style.minWidth = `${width}px`;
7323
- wrapperElement.style.maxHeight = `${height}px`;
7367
+ wrapperElement.style.width = `${width}px`;
7368
+ contentWrapper.style.maxHeight = `${height}px`;
7369
+ contentWrapper.style.width = `${width}px`;
7324
7370
  }
7325
7371
  }
7326
7372
  return (_ctx, _cache) => {
@@ -7332,17 +7378,14 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
7332
7378
  ref: "popup",
7333
7379
  class: normalizeClass(popupClasses)
7334
7380
  }, [createElementVNode("div", mergeProps({
7335
- ref_key: "wrapper",
7336
- ref: wrapper
7381
+ ref: "wrapper"
7337
7382
  }, _ctx.$attrs, {
7338
7383
  class: "popup__wrapper",
7384
+ tabindex: "0",
7339
7385
  onKeyup: withKeys(withModifiers(onKeyEsc, ["stop"]), ["esc"]),
7340
7386
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
7341
7387
  }, ["stop"]))
7342
- }), [createElementVNode("div", {
7343
- ref_key: "content",
7344
- ref: content
7345
- }, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1$G)], 512)], 8, ["to"])) : createCommentVNode("", true);
7388
+ }), [createElementVNode("div", _hoisted_2$x, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1$I)], 512)], 8, ["to"])) : createCommentVNode("", true);
7346
7389
  };
7347
7390
  }
7348
7391
  });
@@ -7386,7 +7429,7 @@ async function doMenuAction$1(action, target) {
7386
7429
  }
7387
7430
  }
7388
7431
  const preventKeys$1 = ["Tab", "Up", "Down", "ArrowUp", "ArrowDown", "Home", "End", " ", "Spacebar", "Enter"];
7389
- const _sfc_main$T = defineComponent({
7432
+ const _sfc_main$V = defineComponent({
7390
7433
  name: "IPopupMenu",
7391
7434
  components: {
7392
7435
  IPopup
@@ -7642,12 +7685,12 @@ const _sfc_main$T = defineComponent({
7642
7685
  }
7643
7686
  }
7644
7687
  });
7645
- const _hoisted_1$F = ["aria-label"];
7646
- const _hoisted_2$v = {
7688
+ const _hoisted_1$H = ["aria-label"];
7689
+ const _hoisted_2$w = {
7647
7690
  role: "menu",
7648
7691
  class: "ipopupmenu__list"
7649
7692
  };
7650
- const _hoisted_3$p = ["onClick"];
7693
+ const _hoisted_3$q = ["onClick"];
7651
7694
  const _hoisted_4$l = ["data-ref-index", "href", "target"];
7652
7695
  const _hoisted_5$g = {
7653
7696
  key: 0,
@@ -7668,7 +7711,7 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
7668
7711
  default: withCtx(() => [createElementVNode("nav", {
7669
7712
  class: "ipopupmenu ipopupmenu--vertical",
7670
7713
  "aria-label": _ctx.ariaLabel
7671
- }, [createElementVNode("ul", _hoisted_2$v, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, index) => {
7714
+ }, [createElementVNode("ul", _hoisted_2$w, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, index) => {
7672
7715
  return openBlock(), createElementBlock("li", {
7673
7716
  ref_for: true,
7674
7717
  ref: "items",
@@ -7684,18 +7727,18 @@ function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
7684
7727
  role: "menuitem",
7685
7728
  target: item.target,
7686
7729
  tabindex: "0"
7687
- }, [_ctx.isSelected(index) ? (openBlock(), createElementBlock("span", _hoisted_5$g, [createElementVNode("span", null, toDisplayString(_ctx.selectedMenuItemScreenReaderText) + " ", 1)])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(item.label), 1)], 8, _hoisted_4$l)], 10, _hoisted_3$p);
7688
- }), 128))])], 8, _hoisted_1$F)]),
7730
+ }, [_ctx.isSelected(index) ? (openBlock(), createElementBlock("span", _hoisted_5$g, [createElementVNode("span", null, toDisplayString(_ctx.selectedMenuItemScreenReaderText) + " ", 1)])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(item.label), 1)], 8, _hoisted_4$l)], 10, _hoisted_3$q);
7731
+ }), 128))])], 8, _hoisted_1$H)]),
7689
7732
  _: 1
7690
7733
  }, 8, ["is-open", "anchor", "focus-element", "onKeyup", "onKeydown"]);
7691
7734
  }
7692
- const IPopupMenu = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$I]]);
7735
+ const IPopupMenu = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$I]]);
7693
7736
  const ANIMATION_DURATION = 500;
7694
7737
  const NO_CSS_CLASSES = "";
7695
7738
  const CLOSED_CSS_CLASS_OPACITY = "animate-expand animate-expand--opacity";
7696
7739
  const CLOSED_CSS_CLASS = "animate-expand";
7697
7740
  const ANIMATION_CSS_CLASSES = "animate-expand animate-expand--expanded";
7698
- const _sfc_main$S = defineComponent({
7741
+ const _sfc_main$U = defineComponent({
7699
7742
  name: "IAnimateExpand",
7700
7743
  props: {
7701
7744
  /**
@@ -7887,7 +7930,7 @@ const _sfc_main$S = defineComponent({
7887
7930
  }
7888
7931
  }
7889
7932
  });
7890
- const _hoisted_1$E = {
7933
+ const _hoisted_1$G = {
7891
7934
  key: 0,
7892
7935
  ref: "content",
7893
7936
  "data-test": "animation-content"
@@ -7896,10 +7939,10 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
7896
7939
  return openBlock(), createElementBlock("div", {
7897
7940
  class: normalizeClass(_ctx.animationClasses),
7898
7941
  style: normalizeStyle(_ctx.heightStyle)
7899
- }, [_ctx.shouldVIf ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$E, [renderSlot(_ctx.$slots, "default")], 512)), [[vShow, _ctx.shouldVShow]]) : createCommentVNode("", true)], 6);
7942
+ }, [_ctx.shouldVIf ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$G, [renderSlot(_ctx.$slots, "default")], 512)), [[vShow, _ctx.shouldVShow]]) : createCommentVNode("", true)], 6);
7900
7943
  }
7901
- const IAnimateExpand = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$H]]);
7902
- const _sfc_main$R = defineComponent({
7944
+ const IAnimateExpand = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$H]]);
7945
+ const _sfc_main$T = defineComponent({
7903
7946
  name: "ISkipLink",
7904
7947
  mixins: [TranslationMixin],
7905
7948
  props: {
@@ -7913,14 +7956,355 @@ const _sfc_main$R = defineComponent({
7913
7956
  }
7914
7957
  }
7915
7958
  });
7916
- const _hoisted_1$D = ["href"];
7959
+ const _hoisted_1$F = ["href"];
7917
7960
  function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
7918
7961
  return openBlock(), createElementBlock("a", {
7919
7962
  class: "iskiplink",
7920
7963
  href: _ctx.href
7921
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.skip-link.text", "Gå direkt till innehåll")), 1)])], 8, _hoisted_1$D);
7964
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.$t("fkui.skip-link.text", "Gå direkt till innehåll")), 1)])], 8, _hoisted_1$F);
7965
+ }
7966
+ const ISkipLink = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$G]]);
7967
+ function filterOptions(options, filter2, selectMode) {
7968
+ if (isEmpty(filter2) || selectMode) {
7969
+ return options;
7970
+ }
7971
+ const filterLowerCased = filter2.toLowerCase();
7972
+ return options.filter((it) => it.toLowerCase().indexOf(filterLowerCased) > -1);
7973
+ }
7974
+ const $t = useTranslate();
7975
+ function useCombobox(inputRef, options, onOptionSelected) {
7976
+ if (!options) {
7977
+ return {
7978
+ dropdownId: "",
7979
+ dropdownIsOpen: ref(false),
7980
+ dropdownOptions: ref([]),
7981
+ activeOptionId: "",
7982
+ activeOption: ref(null),
7983
+ toggleDropdown() {
7984
+ },
7985
+ selectOption() {
7986
+ },
7987
+ closeDropdown() {
7988
+ }
7989
+ };
7990
+ }
7991
+ useEventListener(inputRef, "click", onInputClick);
7992
+ useEventListener(inputRef, "focus", onInputFocus);
7993
+ useEventListener(inputRef, "keydown", onInputKeyDown);
7994
+ useEventListener(inputRef, "keyup", onInputKeyUp);
7995
+ const dropdownId = ElementIdService.generateElementId();
7996
+ const dropdownIsOpen = ref(false);
7997
+ const activeOptionId = ElementIdService.generateElementId();
7998
+ const activeOption = ref(null);
7999
+ const filter2 = ref("");
8000
+ const selectMode = ref(false);
8001
+ const selectedOption = ref(null);
8002
+ const dropdownOptions = computed(() => {
8003
+ return filterOptions(options, filter2.value, selectMode.value);
8004
+ });
8005
+ const hasOptions = computed(() => {
8006
+ return dropdownOptions.value.length > 0;
8007
+ });
8008
+ const hasMultipleOptions = computed(() => {
8009
+ return dropdownOptions.value.length > 1;
8010
+ });
8011
+ watchEffect(() => {
8012
+ if (!inputRef.value) {
8013
+ return;
8014
+ }
8015
+ inputRef.value.setAttribute("aria-expanded", `${dropdownIsOpen.value}`);
8016
+ if (dropdownIsOpen.value) {
8017
+ inputRef.value.setAttribute("aria-controls", dropdownId);
8018
+ } else {
8019
+ inputRef.value.removeAttribute("aria-controls");
8020
+ }
8021
+ });
8022
+ watchEffect(async () => {
8023
+ if (!inputRef.value) {
8024
+ return;
8025
+ }
8026
+ if (activeOption.value) {
8027
+ inputRef.value.setAttribute("aria-activedescendant", activeOptionId);
8028
+ } else {
8029
+ inputRef.value.removeAttribute("aria-activedescendant");
8030
+ }
8031
+ });
8032
+ watchEffect(() => {
8033
+ if (!inputRef.value) {
8034
+ return;
8035
+ }
8036
+ let description = selectMode.value ? `${$t("fkui.combobox.selected", "Valt förslag")} ` : "";
8037
+ if (isEmpty(filter2.value) || selectMode.value) {
8038
+ description += $t("fkui.combobox.listDetails", `Det finns {{ count }} förslag. Använd uppåtpil och nedåtpil för att navigera bland förslagen.`, {
8039
+ count: options.length
8040
+ });
8041
+ } else if (hasOptions.value) {
8042
+ description += $t("fkui.combobox.matchesListDetails", `Det finns {{ count }} förslag som matchar. Använd uppåtpil och nedåtpil för att navigera bland förslagen.`, {
8043
+ count: dropdownOptions.value.length
8044
+ });
8045
+ } else {
8046
+ description = $t("fkui.combobox.noMatchesListDetails", "Det finns inga förslag som matchar.");
8047
+ }
8048
+ inputRef.value.setAttribute("aria-description", description);
8049
+ });
8050
+ onMounted(() => {
8051
+ if (!inputRef.value) {
8052
+ throw new Error("missing input ref");
8053
+ }
8054
+ filter2.value = inputRef.value.value;
8055
+ inputRef.value.setAttribute("role", "combobox");
8056
+ inputRef.value.setAttribute("aria-autocomplete", "list");
8057
+ });
8058
+ return {
8059
+ dropdownId,
8060
+ dropdownIsOpen,
8061
+ dropdownOptions,
8062
+ activeOptionId,
8063
+ activeOption,
8064
+ toggleDropdown,
8065
+ selectOption,
8066
+ closeDropdown: close
8067
+ };
8068
+ function selectOption(value) {
8069
+ selectedOption.value = value;
8070
+ if (selectedOption.value) {
8071
+ close();
8072
+ filter2.value = selectedOption.value;
8073
+ selectMode.value = true;
8074
+ if (onOptionSelected) {
8075
+ onOptionSelected(value);
8076
+ }
8077
+ }
8078
+ }
8079
+ async function openSelected(fallback = null) {
8080
+ var _a;
8081
+ if (hasOptions.value) {
8082
+ dropdownIsOpen.value = true;
8083
+ await nextTick();
8084
+ if (selectMode.value) {
8085
+ activeOption.value = filter2.value;
8086
+ } else if (fallback === "first") {
8087
+ activeOption.value = dropdownOptions.value[0];
8088
+ } else if (fallback === "last") {
8089
+ activeOption.value = dropdownOptions.value[dropdownOptions.value.length - 1];
8090
+ } else {
8091
+ activeOption.value = null;
8092
+ }
8093
+ (_a = inputRef.value) == null ? void 0 : _a.focus();
8094
+ }
8095
+ }
8096
+ function close() {
8097
+ dropdownIsOpen.value = false;
8098
+ activeOption.value = null;
8099
+ }
8100
+ function toggleDropdown() {
8101
+ if (!dropdownIsOpen.value) {
8102
+ openSelected();
8103
+ } else {
8104
+ close();
8105
+ }
8106
+ }
8107
+ function setNextOption() {
8108
+ if (activeOption.value && hasMultipleOptions.value) {
8109
+ const index = dropdownOptions.value.indexOf(activeOption.value);
8110
+ if (index === dropdownOptions.value.length - 1) {
8111
+ activeOption.value = dropdownOptions.value[0];
8112
+ } else {
8113
+ activeOption.value = dropdownOptions.value[index + 1];
8114
+ }
8115
+ } else {
8116
+ activeOption.value = dropdownOptions.value[0];
8117
+ }
8118
+ }
8119
+ function setPreviousOption() {
8120
+ if (activeOption.value && hasMultipleOptions.value) {
8121
+ const index = dropdownOptions.value.indexOf(activeOption.value);
8122
+ if (index === 0) {
8123
+ activeOption.value = dropdownOptions.value[dropdownOptions.value.length - 1];
8124
+ } else {
8125
+ activeOption.value = dropdownOptions.value[index - 1];
8126
+ }
8127
+ } else {
8128
+ activeOption.value = dropdownOptions.value[dropdownOptions.value.length - 1];
8129
+ }
8130
+ }
8131
+ function onInputClick() {
8132
+ toggleDropdown();
8133
+ }
8134
+ async function onInputFocus() {
8135
+ var _a;
8136
+ var _inputRef$value$value, _options$includes;
8137
+ await nextTick();
8138
+ filter2.value = (_inputRef$value$value = (_a = inputRef.value) == null ? void 0 : _a.value) !== null && _inputRef$value$value !== void 0 ? _inputRef$value$value : "";
8139
+ selectMode.value = (_options$includes = options == null ? void 0 : options.includes(filter2.value)) !== null && _options$includes !== void 0 ? _options$includes : false;
8140
+ }
8141
+ async function onInputKeyDown(event) {
8142
+ let flag = false;
8143
+ if (event.ctrlKey || event.shiftKey) {
8144
+ return;
8145
+ }
8146
+ switch (event.key) {
8147
+ case "Enter":
8148
+ if (dropdownIsOpen.value) {
8149
+ if (activeOption.value) {
8150
+ selectOption(activeOption.value);
8151
+ flag = true;
8152
+ }
8153
+ close();
8154
+ } else {
8155
+ openSelected();
8156
+ }
8157
+ break;
8158
+ case "Down":
8159
+ case "ArrowDown":
8160
+ if (dropdownIsOpen.value) {
8161
+ setNextOption();
8162
+ } else {
8163
+ openSelected("first");
8164
+ }
8165
+ flag = true;
8166
+ break;
8167
+ case "Up":
8168
+ case "ArrowUp":
8169
+ if (dropdownIsOpen.value) {
8170
+ setPreviousOption();
8171
+ } else {
8172
+ openSelected("last");
8173
+ }
8174
+ flag = true;
8175
+ break;
8176
+ case "Esc":
8177
+ case "Escape":
8178
+ if (dropdownIsOpen.value) {
8179
+ close();
8180
+ }
8181
+ flag = true;
8182
+ break;
8183
+ case "Tab":
8184
+ if (dropdownIsOpen.value) {
8185
+ close();
8186
+ }
8187
+ break;
8188
+ }
8189
+ if (flag) {
8190
+ event.stopPropagation();
8191
+ event.preventDefault();
8192
+ }
8193
+ }
8194
+ function onInputKeyUp() {
8195
+ if (!inputRef.value) {
8196
+ throw new Error("missing input ref");
8197
+ }
8198
+ if (filter2.value === inputRef.value.value) {
8199
+ return;
8200
+ }
8201
+ filter2.value = inputRef.value.value;
8202
+ activeOption.value = null;
8203
+ selectMode.value = false;
8204
+ if (!dropdownIsOpen.value) {
8205
+ openSelected();
8206
+ } else if (!hasOptions.value) {
8207
+ close();
8208
+ }
8209
+ }
7922
8210
  }
7923
- const ISkipLink = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$G]]);
8211
+ const _hoisted_1$E = {
8212
+ class: "combobox"
8213
+ };
8214
+ const _hoisted_2$v = ["id"];
8215
+ const _hoisted_3$p = ["id", "aria-selected", "onClick"];
8216
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
8217
+ __name: "IComboboxDropdown",
8218
+ props: {
8219
+ id: {},
8220
+ isOpen: {
8221
+ type: Boolean
8222
+ },
8223
+ options: {},
8224
+ activeOption: {},
8225
+ activeOptionId: {},
8226
+ inputNode: {}
8227
+ },
8228
+ emits: ["select", "close"],
8229
+ setup(__props, {
8230
+ emit: __emit
8231
+ }) {
8232
+ const emit = __emit;
8233
+ const listboxRef = useTemplateRef("listbox");
8234
+ const activeElement = ref();
8235
+ function isOptionActive(item) {
8236
+ return item === __props.activeOption;
8237
+ }
8238
+ function onOptionClick(value) {
8239
+ emit("select", value);
8240
+ }
8241
+ function onListboxClose() {
8242
+ emit("close");
8243
+ }
8244
+ watchEffect(async () => {
8245
+ var _a;
8246
+ if (__props.activeOption !== null) {
8247
+ await nextTick();
8248
+ const activeOptionNode = (_a = listboxRef.value) == null ? void 0 : _a.querySelector(`#${__props.activeOptionId}`);
8249
+ activeElement.value = activeOptionNode !== null && activeOptionNode !== void 0 ? activeOptionNode : void 0;
8250
+ }
8251
+ });
8252
+ return (_ctx, _cache) => {
8253
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [createVNode(unref(_sfc_main$W), {
8254
+ "is-open": _ctx.isOpen,
8255
+ anchor: _ctx.inputNode,
8256
+ "num-of-items": _ctx.options.length,
8257
+ "active-element": activeElement.value,
8258
+ class: "combobox__listbox",
8259
+ onClose: onListboxClose
8260
+ }, {
8261
+ default: withCtx(() => [createElementVNode("ul", {
8262
+ id: _ctx.id,
8263
+ ref: "listbox",
8264
+ role: "listbox",
8265
+ "aria-label": "Förslag",
8266
+ class: "combobox__listbox__list"
8267
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item) => {
8268
+ return openBlock(), createElementBlock("li", {
8269
+ id: isOptionActive(item) ? _ctx.activeOptionId : void 0,
8270
+ key: item,
8271
+ role: "option",
8272
+ "aria-selected": isOptionActive(item) ? "true" : void 0,
8273
+ class: normalizeClass(["combobox__listbox__option", {
8274
+ "combobox__listbox__option--highlight": isOptionActive(item)
8275
+ }]),
8276
+ onClick: withModifiers(($event) => onOptionClick(item), ["stop", "prevent"])
8277
+ }, toDisplayString(item), 11, _hoisted_3$p);
8278
+ }), 128))], 8, _hoisted_2$v)]),
8279
+ _: 1
8280
+ }, 8, ["is-open", "anchor", "num-of-items", "active-element"])]);
8281
+ };
8282
+ }
8283
+ });
8284
+ const _hoisted_1$D = ["aria-label"];
8285
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
8286
+ __name: "IComboboxToggleButton",
8287
+ emits: ["toggle"],
8288
+ setup(__props, {
8289
+ emit: __emit
8290
+ }) {
8291
+ const $t2 = useTranslate();
8292
+ const emit = __emit;
8293
+ const ariaLabel = $t2("fkui.combobox.toggle", "Öppna förslagen");
8294
+ return (_ctx, _cache) => {
8295
+ return openBlock(), createElementBlock("button", {
8296
+ class: "combobox__button",
8297
+ type: "button",
8298
+ "aria-label": unref(ariaLabel),
8299
+ tabindex: "-1",
8300
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("toggle"))
8301
+ }, [createVNode(unref(FIcon), {
8302
+ name: "arrow-down",
8303
+ class: "text-field__icon"
8304
+ })], 8, _hoisted_1$D);
8305
+ };
8306
+ }
8307
+ });
7924
8308
  const tooltipAttachTo = Symbol("tooltipAttachTo");
7925
8309
  let initialized = false;
7926
8310
  const reducedMotion = ref(false);
@@ -8515,7 +8899,7 @@ const _hoisted_5$e = {
8515
8899
  const _hoisted_6$c = {
8516
8900
  key: 1
8517
8901
  };
8518
- const _hoisted_7$b = {
8902
+ const _hoisted_7$c = {
8519
8903
  ref: "tooltipAttachTo",
8520
8904
  class: "label"
8521
8905
  };
@@ -8546,7 +8930,7 @@ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
8546
8930
  name: "error"
8547
8931
  }), createTextVNode(" " + toDisplayString(_ctx.validity.validationMessage), 1)])) : createCommentVNode("", true)])], 2)), _cache[7] || (_cache[7] = createTextVNode()), _ctx.hasCheckbox ? (openBlock(), createElementBlock("span", _hoisted_4$j, [_ctx.children.length === 1 ? (openBlock(), createElementBlock("span", _hoisted_5$e, toDisplayString(_ctx.checkboxCheckedScreenReaderText), 1)) : (openBlock(), createElementBlock("span", _hoisted_6$c, toDisplayString(_ctx.numberOfCheckedCheckboxesScreenText), 1))])) : createCommentVNode("", true), _cache[8] || (_cache[8] = createTextVNode()), _ctx.hasTooltipSlot ? (openBlock(), createElementBlock(Fragment, {
8548
8932
  key: 1
8549
- }, [createElementVNode("div", _hoisted_7$b, [createElementVNode("span", _hoisted_8$7, [renderSlot(_ctx.$slots, "label")])], 512), _cache[5] || (_cache[5] = createTextVNode()), renderSlot(_ctx.$slots, "tooltip"), _cache[6] || (_cache[6] = createTextVNode()), _ctx.hasDescriptionSlot || _ctx.hasErrorMessageSlot || _ctx.hasError ? (openBlock(), createElementBlock("div", {
8933
+ }, [createElementVNode("div", _hoisted_7$c, [createElementVNode("span", _hoisted_8$7, [renderSlot(_ctx.$slots, "label")])], 512), _cache[5] || (_cache[5] = createTextVNode()), renderSlot(_ctx.$slots, "tooltip"), _cache[6] || (_cache[6] = createTextVNode()), _ctx.hasDescriptionSlot || _ctx.hasErrorMessageSlot || _ctx.hasError ? (openBlock(), createElementBlock("div", {
8550
8934
  key: 0,
8551
8935
  class: normalizeClass(["label", _ctx.groupLabelClass]),
8552
8936
  "aria-hidden": "true"
@@ -9519,7 +9903,7 @@ const _hoisted_5$d = {
9519
9903
  class: "label__message label__message--error"
9520
9904
  };
9521
9905
  const _hoisted_6$b = ["for"];
9522
- const _hoisted_7$a = {
9906
+ const _hoisted_7$b = {
9523
9907
  key: 0,
9524
9908
  class: "label__message label__message--error"
9525
9909
  };
@@ -9545,7 +9929,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
9545
9929
  }, [renderSlot(_ctx.$slots, "default"), _cache[5] || (_cache[5] = createTextVNode()), renderSlot(_ctx.$slots, "description", normalizeProps(guardReactiveProps({
9546
9930
  descriptionClass: _ctx.descriptionClass,
9547
9931
  discreteDescriptionClass: _ctx.discreteDescriptionClass
9548
- }))), _cache[6] || (_cache[6] = createTextVNode()), _ctx.hasErrorMessageSlot ? (openBlock(), createElementBlock("span", _hoisted_7$a, [createVNode(_component_f_icon, {
9932
+ }))), _cache[6] || (_cache[6] = createTextVNode()), _ctx.hasErrorMessageSlot ? (openBlock(), createElementBlock("span", _hoisted_7$b, [createVNode(_component_f_icon, {
9549
9933
  class: "label__icon--left",
9550
9934
  name: "error"
9551
9935
  }), _cache[4] || (_cache[4] = createTextVNode()), renderSlot(_ctx.$slots, "error-message")])) : createCommentVNode("", true)], 8, _hoisted_6$b));
@@ -9737,12 +10121,54 @@ const FSelectField = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_r
9737
10121
  function resolveWidthClass(words, inline) {
9738
10122
  return inline ? void 0 : words.split(" ").map((word) => `i-width-${word}`).join(" ");
9739
10123
  }
10124
+ function setCursorAtEnd(input) {
10125
+ input.setSelectionRange(input.value.length, input.value.length);
10126
+ }
10127
+ function useTextFieldSetup(props) {
10128
+ const inputNode = useTemplateRef("input");
10129
+ const textFieldTableMode = inject("textFieldTableMode", false);
10130
+ const viewValue = ref("");
10131
+ async function onOptionSelected(value) {
10132
+ if (!inputNode.value) {
10133
+ return;
10134
+ }
10135
+ viewValue.value = value;
10136
+ await nextTick();
10137
+ inputNode.value.focus();
10138
+ setCursorAtEnd(inputNode.value);
10139
+ }
10140
+ const {
10141
+ dropdownId,
10142
+ dropdownIsOpen,
10143
+ dropdownOptions,
10144
+ activeOptionId,
10145
+ activeOption,
10146
+ toggleDropdown,
10147
+ selectOption,
10148
+ closeDropdown
10149
+ } = useCombobox(inputNode, props.options, onOptionSelected);
10150
+ return {
10151
+ textFieldTableMode,
10152
+ viewValue,
10153
+ onOptionSelected,
10154
+ dropdownId,
10155
+ dropdownIsOpen,
10156
+ dropdownOptions,
10157
+ activeOptionId,
10158
+ activeOption,
10159
+ toggleDropdown,
10160
+ selectOption,
10161
+ closeDropdown
10162
+ };
10163
+ }
9740
10164
  const _sfc_main$H = defineComponent({
9741
10165
  name: "FTextField",
9742
10166
  components: {
9743
10167
  FLabel,
9744
10168
  FIcon,
9745
- IPopupError
10169
+ IPopupError,
10170
+ IComboboxDropdown: _sfc_main$S,
10171
+ IComboboxToggleButton: _sfc_main$R
9746
10172
  },
9747
10173
  inheritAttrs: false,
9748
10174
  props: {
@@ -9837,18 +10263,52 @@ const _sfc_main$H = defineComponent({
9837
10263
  type: String,
9838
10264
  required: false,
9839
10265
  default: "sm-12"
10266
+ },
10267
+ /**
10268
+ * List of options.
10269
+ *
10270
+ * When set, the user can select a value from the list of options and filter while typing.
10271
+ *
10272
+ * If a formatter is used by the component, make sure the options are formatted as well.
10273
+ */
10274
+ options: {
10275
+ type: Array,
10276
+ required: false,
10277
+ default: () => void 0
9840
10278
  }
9841
10279
  },
9842
10280
  emits: ["blur", "change", "update", "update:modelValue"],
9843
- setup() {
10281
+ setup(props) {
10282
+ const {
10283
+ textFieldTableMode,
10284
+ viewValue,
10285
+ onOptionSelected,
10286
+ dropdownId,
10287
+ dropdownIsOpen,
10288
+ dropdownOptions,
10289
+ activeOptionId,
10290
+ activeOption,
10291
+ toggleDropdown,
10292
+ selectOption,
10293
+ closeDropdown
10294
+ } = useTextFieldSetup(props);
9844
10295
  return {
9845
- textFieldTableMode: inject("textFieldTableMode", false)
10296
+ textFieldTableMode,
10297
+ viewValue,
10298
+ onOptionSelected,
10299
+ dropdownId,
10300
+ dropdownIsOpen,
10301
+ dropdownOptions,
10302
+ activeOptionId,
10303
+ activeOption,
10304
+ toggleDropdown,
10305
+ selectOption,
10306
+ closeDropdown
9846
10307
  };
9847
10308
  },
9848
10309
  data() {
9849
10310
  return {
9850
10311
  showErrorPopup: false,
9851
- viewValue: "",
9852
10312
  lastModelValue: "",
9853
10313
  validationMessage: "",
9854
10314
  validityMode: "INITIAL",
@@ -9911,6 +10371,12 @@ const _sfc_main$H = defineComponent({
9911
10371
  this.isAfterInitialRender = true;
9912
10372
  },
9913
10373
  methods: {
10374
+ onDropdownSelect(value) {
10375
+ this.selectOption(value);
10376
+ },
10377
+ onDropdownClose() {
10378
+ this.closeDropdown();
10379
+ },
9914
10380
  getErrorPopupAnchor() {
9915
10381
  return this.$refs.input;
9916
10382
  },
@@ -10045,10 +10511,16 @@ const _hoisted_6$a = {
10045
10511
  key: 2,
10046
10512
  class: "text-field__append-inner"
10047
10513
  };
10514
+ const _hoisted_7$a = {
10515
+ key: 3,
10516
+ class: "text-field__append-inner"
10517
+ };
10048
10518
  function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
10049
10519
  const _component_f_label = resolveComponent("f-label");
10050
10520
  const _component_f_icon = resolveComponent("f-icon");
10051
10521
  const _component_i_popup_error = resolveComponent("i-popup-error");
10522
+ const _component_i_combobox_toggle_button = resolveComponent("i-combobox-toggle-button");
10523
+ const _component_i_combobox_dropdown = resolveComponent("i-combobox-dropdown");
10052
10524
  return openBlock(), createElementBlock("div", {
10053
10525
  class: normalizeClass(["text-field", _ctx.rootClass])
10054
10526
  }, [createElementVNode("div", {
@@ -10082,9 +10554,9 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
10082
10554
  name: "tooltip",
10083
10555
  fn: withCtx(() => [renderSlot(_ctx.$slots, "tooltip")]),
10084
10556
  key: "0"
10085
- } : void 0]), 1032, ["for", "class"])], 2), _cache[18] || (_cache[18] = createTextVNode()), createElementVNode("div", {
10557
+ } : void 0]), 1032, ["for", "class"])], 2), _cache[19] || (_cache[19] = createTextVNode()), createElementVNode("div", {
10086
10558
  class: normalizeClass(["text-field__input-wrapper", _ctx.inputWrapperClass])
10087
- }, [renderSlot(_ctx.$slots, "input-left"), _cache[16] || (_cache[16] = createTextVNode()), createElementVNode("div", _hoisted_4$g, [withDirectives(createElementVNode("input", mergeProps({
10559
+ }, [renderSlot(_ctx.$slots, "input-left"), _cache[17] || (_cache[17] = createTextVNode()), createElementVNode("div", _hoisted_4$g, [withDirectives(createElementVNode("input", mergeProps({
10088
10560
  id: _ctx.id,
10089
10561
  ref: "input",
10090
10562
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.viewValue = $event),
@@ -10108,7 +10580,21 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
10108
10580
  "is-open": _ctx.showPopupError,
10109
10581
  "error-message": _ctx.validationMessage,
10110
10582
  onClose: _ctx.closePopupError
10111
- }, null, 8, ["anchor", "is-open", "error-message", "onClose"])) : createCommentVNode("", true), _cache[15] || (_cache[15] = createTextVNode()), _ctx.$slots["append-inner"] ? (openBlock(), createElementBlock("div", _hoisted_6$a, [renderSlot(_ctx.$slots, "append-inner")])) : createCommentVNode("", true)]), _cache[17] || (_cache[17] = createTextVNode()), renderSlot(_ctx.$slots, "input-right")], 2)], 2);
10583
+ }, null, 8, ["anchor", "is-open", "error-message", "onClose"])) : createCommentVNode("", true), _cache[15] || (_cache[15] = createTextVNode()), _ctx.$slots["append-inner"] ? (openBlock(), createElementBlock("div", _hoisted_6$a, [renderSlot(_ctx.$slots, "append-inner")])) : createCommentVNode("", true), _cache[16] || (_cache[16] = createTextVNode()), _ctx.options ? (openBlock(), createElementBlock("div", _hoisted_7$a, [createVNode(_component_i_combobox_toggle_button, {
10584
+ "aria-controls": _ctx.dropdownIsOpen ? _ctx.dropdownId : void 0,
10585
+ "aria-expanded": _ctx.dropdownIsOpen,
10586
+ onToggle: _ctx.toggleDropdown
10587
+ }, null, 8, ["aria-controls", "aria-expanded", "onToggle"])])) : createCommentVNode("", true)]), _cache[18] || (_cache[18] = createTextVNode()), renderSlot(_ctx.$slots, "input-right")], 2), _cache[20] || (_cache[20] = createTextVNode()), _ctx.options && _ctx.$refs.input ? (openBlock(), createBlock(_component_i_combobox_dropdown, {
10588
+ key: 0,
10589
+ id: _ctx.dropdownId,
10590
+ "is-open": _ctx.dropdownIsOpen,
10591
+ options: _ctx.dropdownOptions,
10592
+ "active-option": _ctx.activeOption,
10593
+ "active-option-id": _ctx.activeOptionId,
10594
+ "input-node": _ctx.$refs.input,
10595
+ onSelect: _ctx.onDropdownSelect,
10596
+ onClose: _ctx.onDropdownClose
10597
+ }, null, 8, ["id", "is-open", "options", "active-option", "active-option-id", "input-node", "onSelect", "onClose"])) : createCommentVNode("", true)], 2);
10112
10598
  }
10113
10599
  const FTextField = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$w]]);
10114
10600
  const _sfc_main$G = defineComponent({
@@ -10407,10 +10893,8 @@ const _sfc_main$E = defineComponent({
10407
10893
  default: parseNumber
10408
10894
  }
10409
10895
  },
10410
- setup() {
10411
- return {
10412
- textFieldTableMode: inject("textFieldTableMode", false)
10413
- };
10896
+ setup(props) {
10897
+ return useTextFieldSetup(props);
10414
10898
  },
10415
10899
  data() {
10416
10900
  return {
@@ -10553,10 +11037,8 @@ const _sfc_main$C = defineComponent({
10553
11037
  default: parseBankAccountNumber
10554
11038
  }
10555
11039
  },
10556
- setup() {
10557
- return {
10558
- textFieldTableMode: inject("textFieldTableMode", false)
10559
- };
11040
+ setup(props) {
11041
+ return useTextFieldSetup(props);
10560
11042
  },
10561
11043
  data() {
10562
11044
  return {
@@ -10584,10 +11066,8 @@ const _sfc_main$B = defineComponent({
10584
11066
  default: parseBankgiro
10585
11067
  }
10586
11068
  },
10587
- setup() {
10588
- return {
10589
- textFieldTableMode: inject("textFieldTableMode", false)
10590
- };
11069
+ setup(props) {
11070
+ return useTextFieldSetup(props);
10591
11071
  },
10592
11072
  data() {
10593
11073
  return {
@@ -10618,10 +11098,8 @@ const _sfc_main$A = defineComponent({
10618
11098
  default: parseClearingNumber
10619
11099
  }
10620
11100
  },
10621
- setup() {
10622
- return {
10623
- textFieldTableMode: inject("textFieldTableMode", false)
10624
- };
11101
+ setup(props) {
11102
+ return useTextFieldSetup(props);
10625
11103
  },
10626
11104
  data() {
10627
11105
  return {
@@ -10665,10 +11143,8 @@ const _sfc_main$z = defineComponent({
10665
11143
  default: parseNumber
10666
11144
  }
10667
11145
  },
10668
- setup() {
10669
- return {
10670
- textFieldTableMode: inject("textFieldTableMode", false)
10671
- };
11146
+ setup(props) {
11147
+ return useTextFieldSetup(props);
10672
11148
  },
10673
11149
  mounted() {
10674
11150
  const inputElement = getInputElement(this);
@@ -10696,10 +11172,8 @@ const _sfc_main$y = defineComponent({
10696
11172
  default: parsePersonnummer
10697
11173
  }
10698
11174
  },
10699
- setup() {
10700
- return {
10701
- textFieldTableMode: inject("textFieldTableMode", false)
10702
- };
11175
+ setup(props) {
11176
+ return useTextFieldSetup(props);
10703
11177
  },
10704
11178
  data() {
10705
11179
  return {
@@ -10733,10 +11207,8 @@ const _sfc_main$x = defineComponent({
10733
11207
  default: parsePlusgiro
10734
11208
  }
10735
11209
  },
10736
- setup() {
10737
- return {
10738
- textFieldTableMode: inject("textFieldTableMode", false)
10739
- };
11210
+ setup(props) {
11211
+ return useTextFieldSetup(props);
10740
11212
  },
10741
11213
  data() {
10742
11214
  return {
@@ -10767,10 +11239,8 @@ const _sfc_main$w = defineComponent({
10767
11239
  default: formatPostalCode
10768
11240
  }
10769
11241
  },
10770
- setup() {
10771
- return {
10772
- textFieldTableMode: inject("textFieldTableMode", false)
10773
- };
11242
+ setup(props) {
11243
+ return useTextFieldSetup(props);
10774
11244
  },
10775
11245
  data() {
10776
11246
  return {
@@ -10819,10 +11289,8 @@ const _sfc_main$v = defineComponent({
10819
11289
  default: parsePercent
10820
11290
  }
10821
11291
  },
10822
- setup() {
10823
- return {
10824
- textFieldTableMode: inject("textFieldTableMode", false)
10825
- };
11292
+ setup(props) {
11293
+ return useTextFieldSetup(props);
10826
11294
  },
10827
11295
  data() {
10828
11296
  return {
@@ -10856,10 +11324,8 @@ const _sfc_main$u = defineComponent({
10856
11324
  default: parseOrganisationsnummer
10857
11325
  }
10858
11326
  },
10859
- setup() {
10860
- return {
10861
- textFieldTableMode: inject("textFieldTableMode", false)
10862
- };
11327
+ setup(props) {
11328
+ return useTextFieldSetup(props);
10863
11329
  },
10864
11330
  data() {
10865
11331
  return {
@@ -13738,7 +14204,9 @@ const _sfc_main$e = defineComponent({
13738
14204
  }
13739
14205
  },
13740
14206
  updateActiveItemFromVModel() {
13741
- if (this.active && !itemEquals(this.active, this.activeItem, this.keyAttribute)) {
14207
+ if (this.active === void 0) {
14208
+ this.activeItem = void 0;
14209
+ } else if (!itemEquals(this.active, this.activeItem, this.keyAttribute)) {
13742
14210
  this.activeItem = this.active;
13743
14211
  }
13744
14212
  },
@@ -16670,7 +17138,7 @@ export {
16670
17138
  ErrorPlugin,
16671
17139
  ErrorViewData,
16672
17140
  EventBus,
16673
- _sfc_main$1d as FBadge,
17141
+ _sfc_main$1f as FBadge,
16674
17142
  _sfc_main$C as FBankAccountNumberTextField,
16675
17143
  _sfc_main$B as FBankgiroTextField,
16676
17144
  FCalendar,
@@ -16753,11 +17221,13 @@ export {
16753
17221
  ICalendarMonth,
16754
17222
  ICalendarMonthGrid,
16755
17223
  ICalendarNavbar,
17224
+ _sfc_main$S as IComboboxDropdown,
17225
+ _sfc_main$R as IComboboxToggleButton,
16756
17226
  IFlex,
16757
17227
  IFlexItem,
16758
17228
  IPopup,
16759
17229
  IPopupError,
16760
- _sfc_main$U as IPopupListbox,
17230
+ _sfc_main$W as IPopupListbox,
16761
17231
  IPopupMenu,
16762
17232
  ISkipLink,
16763
17233
  FValidationForm as IValidationForm,
@@ -16818,8 +17288,10 @@ export {
16818
17288
  sortComponentsWithErrorsOnDOMOrder,
16819
17289
  tableScrollClasses,
16820
17290
  tooltipAttachTo,
17291
+ useCombobox,
16821
17292
  useModal,
16822
17293
  useSlotUtils,
17294
+ useTextFieldSetup,
16823
17295
  useTranslate
16824
17296
  };
16825
17297
  //# sourceMappingURL=index.esm.js.map