fds-vue-core 2.1.49 → 2.1.51

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.
@@ -753,10 +753,10 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
753
753
  const _hoisted_1$m = ["id"];
754
754
  const _hoisted_2$h = {
755
755
  key: 0,
756
- class: "flex items-start justify-between gap-4"
756
+ class: "flex items-start justify-between gap-4 mb-4"
757
757
  };
758
758
  const _hoisted_3$a = { class: "flex items-center gap-3" };
759
- const _hoisted_4$9 = { class: "flex items-start gap-3" };
759
+ const _hoisted_4$9 = { class: "flex items-start gap-3 leading-8" };
760
760
  const _hoisted_5$8 = { class: "mb-0-last-child" };
761
761
  const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
762
762
  __name: "FdsBlockContent",
@@ -777,7 +777,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
777
777
  props.borderLeft && "border-l-4",
778
778
  hasSlot.value ? "pb-6" : "pb-4"
779
779
  ]);
780
- const headerClasses = vue.computed(() => ["mt-0 mb-4 text-lg font-bold tracking-wide", !hasSlot.value && "mb-0!"]);
780
+ const headerClasses = vue.computed(() => ["m-0 text-lg font-bold tracking-wide", !hasSlot.value && "mb-0!"]);
781
781
  const borderLeftStyle = vue.computed(() => {
782
782
  if (!props.borderLeft) return {};
783
783
  const colorMap = {
@@ -1019,8 +1019,8 @@ const _hoisted_8$2 = {
1019
1019
  const _hoisted_9$2 = { key: 1 };
1020
1020
  const _hoisted_10$1 = { class: "flex items-start justify-between gap-4" };
1021
1021
  const _hoisted_11$1 = { class: "flex items-center gap-3" };
1022
- const _hoisted_12$1 = { class: "m-0 text-base font-main font-bold tracking-wide" };
1023
- const _hoisted_13$1 = { class: "flex items-start gap-3" };
1022
+ const _hoisted_12 = { class: "m-0 text-base font-main font-bold tracking-wide" };
1023
+ const _hoisted_13 = { class: "flex items-start gap-3" };
1024
1024
  const _hoisted_14 = { class: "mb-0-last-child" };
1025
1025
  const smallIconSize = 24;
1026
1026
  const largeIconSize = 48;
@@ -1088,9 +1088,9 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
1088
1088
  size: smallIconSize,
1089
1089
  class: "fill-blue-500"
1090
1090
  }, null, 8, ["name"])) : vue.createCommentVNode("", true),
1091
- vue.createElementVNode("h3", _hoisted_12$1, vue.toDisplayString(__props.heading), 1)
1091
+ vue.createElementVNode("h3", _hoisted_12, vue.toDisplayString(__props.heading), 1)
1092
1092
  ]),
1093
- vue.createElementVNode("div", _hoisted_13$1, [
1093
+ vue.createElementVNode("div", _hoisted_13, [
1094
1094
  vue.renderSlot(_ctx.$slots, "headerInfo")
1095
1095
  ])
1096
1096
  ])
@@ -7927,7 +7927,6 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
7927
7927
  return {
7928
7928
  ...filtered,
7929
7929
  id: inputId.value,
7930
- class: props.class ?? attrs.class,
7931
7930
  "data-testid": props.dataTestid ?? void 0
7932
7931
  };
7933
7932
  });
@@ -7986,7 +7985,9 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
7986
7985
  if (!isLazy.value && ev.type === "change") {
7987
7986
  return;
7988
7987
  }
7989
- internalValue.value = target.value;
7988
+ if (!props.mask) {
7989
+ internalValue.value = target.value;
7990
+ }
7990
7991
  if (ev.type === "input") {
7991
7992
  emit("input", ev);
7992
7993
  }
@@ -8037,7 +8038,9 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
8037
8038
  () => props.value,
8038
8039
  (newValue) => {
8039
8040
  if (maskInstance && newValue !== void 0 && newValue !== maskInstance.value) {
8040
- maskInstance.value = newValue;
8041
+ if (document.activeElement !== inputRef.value) {
8042
+ maskInstance.value = newValue;
8043
+ }
8041
8044
  }
8042
8045
  }
8043
8046
  );
@@ -8045,7 +8048,9 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
8045
8048
  () => modelValue.value,
8046
8049
  (newValue) => {
8047
8050
  if (maskInstance && newValue !== void 0 && newValue !== maskInstance.value) {
8048
- maskInstance.value = newValue;
8051
+ if (document.activeElement !== inputRef.value) {
8052
+ maskInstance.value = newValue;
8053
+ }
8049
8054
  }
8050
8055
  }
8051
8056
  );
@@ -8357,22 +8362,14 @@ const _hoisted_6$2 = {
8357
8362
  key: 0,
8358
8363
  class: "flex justify-center p-4"
8359
8364
  };
8360
- const _hoisted_7$2 = {
8361
- key: 0,
8362
- class: "block m-0 font-light p-6 border-b border-gray-200 rounded-t-md"
8363
- };
8364
- const _hoisted_8$1 = {
8365
- key: 1,
8366
- class: "block m-0 font-light p-4 border-b border-gray-200 rounded-t-md"
8367
- };
8368
- const _hoisted_9$1 = ["id", "aria-selected", "tabindex", "onMouseup", "onMouseenter", "onKeydown"];
8369
- const _hoisted_10 = ["id", "checked"];
8370
- const _hoisted_11 = ["for", "innerHTML"];
8371
- const _hoisted_12 = {
8365
+ const _hoisted_7$2 = ["id", "onMouseup"];
8366
+ const _hoisted_8$1 = ["id", "onKeydown"];
8367
+ const _hoisted_9$1 = ["for", "innerHTML"];
8368
+ const _hoisted_10 = {
8372
8369
  key: 2,
8373
8370
  class: "block m-0 list-none p-0"
8374
8371
  };
8375
- const _hoisted_13 = { class: "p-4" };
8372
+ const _hoisted_11 = { class: "p-4" };
8376
8373
  const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8377
8374
  __name: "FdsSearchSelect",
8378
8375
  props: {
@@ -8418,7 +8415,6 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8418
8415
  const matchingItems = vue.ref([]);
8419
8416
  const displayedItems = vue.ref([]);
8420
8417
  const selectedItem = vue.ref(null);
8421
- const focusedIndex = vue.ref(-1);
8422
8418
  const valid = vue.ref(props.valid ?? null);
8423
8419
  const totalCount = vue.computed(() => {
8424
8420
  if (props.totalCount !== void 0) {
@@ -8433,7 +8429,38 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8433
8429
  }
8434
8430
  );
8435
8431
  const componentRef = vue.ref(null);
8432
+ const dropdownRef = vue.ref(null);
8433
+ const inputComponentRef = vue.ref(null);
8436
8434
  const inputId = `searchSelectInput-${Math.random().toString(36).slice(2, 9)}`;
8435
+ const listboxId = `select-dropdown-${Math.random().toString(36).slice(2, 9)}`;
8436
+ const getInputElement = () => {
8437
+ if (inputComponentRef.value?.$el) {
8438
+ const input = inputComponentRef.value.$el.querySelector("input");
8439
+ if (input) return input;
8440
+ }
8441
+ return document.getElementById(inputId);
8442
+ };
8443
+ const focusInput = () => {
8444
+ vue.nextTick(() => {
8445
+ const input = getInputElement();
8446
+ input?.focus();
8447
+ });
8448
+ };
8449
+ const uncheckAllRadios = () => {
8450
+ if (!dropdownRef.value) return;
8451
+ const checkedRadio = dropdownRef.value.querySelector('input[name="search-select-radio-group"]:checked');
8452
+ if (checkedRadio) {
8453
+ checkedRadio.checked = false;
8454
+ }
8455
+ };
8456
+ const focusFirstRadio = () => {
8457
+ vue.nextTick(() => {
8458
+ const firstRadioButton = document.getElementById(`search-select-radio-0`);
8459
+ if (firstRadioButton) {
8460
+ firstRadioButton.focus();
8461
+ }
8462
+ });
8463
+ };
8437
8464
  const hasInputValue = vue.computed(() => searchTerm.value.length > 0);
8438
8465
  const listWrapperClasses = vue.computed(() => [
8439
8466
  "rounded-md box-border overflow-hidden z-4 w-full bg-white mt-2",
@@ -8445,7 +8472,16 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8445
8472
  const listItemClasses = vue.computed(() => [
8446
8473
  "block m-0",
8447
8474
  "outline-none! hover:bg-blue_t-100 active:bg-blue_t-200",
8448
- props.borderless && "border-b border-blue_t-200"
8475
+ "border-b border-blue_t-200"
8476
+ ]);
8477
+ const listItemWrapperClasses = vue.computed(() => [
8478
+ "block m-0 hover:outline-none",
8479
+ "has-focus:outline-2 has-focus:outline-blue-500 has-focus:-outline-offset-2 has-focus:outline-dashed"
8480
+ ]);
8481
+ const labelClasses = vue.computed(() => "block p-4 text-gray-700 cursor-pointer no-underline");
8482
+ const headerClasses = vue.computed(() => [
8483
+ "block m-0 font-light border-b border-gray-200 rounded-t-md",
8484
+ searchTerm.value && searchTerm.value.length ? "p-6" : "p-4"
8449
8485
  ]);
8450
8486
  const listWrapperStyle = vue.computed(() => {
8451
8487
  if (!props.maxListHeight) return null;
@@ -8502,13 +8538,14 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8502
8538
  emit("searchSelected", null);
8503
8539
  emit("clearInput", new Event("clearInput"));
8504
8540
  filterAndPaginate();
8541
+ focusInput();
8505
8542
  };
8506
8543
  vue.watch(
8507
8544
  () => props.clearTrigger,
8508
8545
  (value) => value && handleClear()
8509
8546
  );
8510
8547
  vue.watch(
8511
- () => props.items,
8548
+ () => [props.items, props.page],
8512
8549
  () => {
8513
8550
  filterAndPaginate();
8514
8551
  },
@@ -8547,18 +8584,6 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8547
8584
  }
8548
8585
  }
8549
8586
  );
8550
- vue.watch(
8551
- () => props.page,
8552
- () => {
8553
- filterAndPaginate();
8554
- }
8555
- );
8556
- vue.watch(
8557
- () => displayedItems.value,
8558
- () => {
8559
- focusedIndex.value = -1;
8560
- }
8561
- );
8562
8587
  const onClickOutside = (e) => {
8563
8588
  const target = e.target;
8564
8589
  if (componentRef.value?.contains(target)) return;
@@ -8581,10 +8606,10 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8581
8606
  searchTerm.value = value;
8582
8607
  dropdownVisible.value = true;
8583
8608
  selectedItem.value = null;
8584
- focusedIndex.value = -1;
8585
8609
  valid.value = null;
8586
8610
  filterAndPaginate();
8587
8611
  debouncedEmitInput(e);
8612
+ uncheckAllRadios();
8588
8613
  };
8589
8614
  const { isPid } = useIsPid(searchTerm);
8590
8615
  const { boldQuery } = useBoldQuery(searchTerm);
@@ -8616,9 +8641,6 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8616
8641
  }
8617
8642
  if (searchTerm.value) {
8618
8643
  const formattedTerm = formatPidWithDash(searchTerm.value);
8619
- if (formattedTerm !== searchTerm.value) {
8620
- searchTerm.value = formattedTerm;
8621
- }
8622
8644
  const escaped = formattedTerm.replace(/[()]/g, "\\$&");
8623
8645
  if (new RegExp(escaped, "i").test(result)) {
8624
8646
  return boldQuery(result);
@@ -8626,9 +8648,8 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8626
8648
  }
8627
8649
  return result;
8628
8650
  };
8629
- const handlePagination = (payload) => {
8630
- const newPage = payload.detail;
8631
- emit("paginate", newPage);
8651
+ const handlePagination = (_payload) => {
8652
+ emit("paginate", _payload.detail);
8632
8653
  };
8633
8654
  const selectItem = (item) => {
8634
8655
  selectedItem.value = item;
@@ -8643,13 +8664,9 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8643
8664
  const firstField = searchFields.value[0];
8644
8665
  searchTerm.value = (firstField ? item[firstField] : "") || "";
8645
8666
  selectItem(item);
8646
- focusedIndex.value = -1;
8647
8667
  dropdownVisible.value = false;
8648
8668
  setTimeout(() => {
8649
- const input = document.getElementById(inputId);
8650
- if (input) {
8651
- input.focus();
8652
- }
8669
+ focusInput();
8653
8670
  }, 100);
8654
8671
  }
8655
8672
  };
@@ -8659,76 +8676,33 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8659
8676
  }
8660
8677
  };
8661
8678
  const handleListKeyDown = (e) => {
8662
- const target = e.target;
8663
- const isRadioButton = target.tagName === "INPUT" && target.type === "radio";
8664
- const isListItem = target.closest('li[role="option"]');
8665
- if (isRadioButton || isListItem) {
8666
- handleInputKeyDown(e);
8679
+ if (e.key === "Escape") {
8680
+ e.preventDefault();
8681
+ dropdownVisible.value = false;
8682
+ uncheckAllRadios();
8683
+ focusInput();
8667
8684
  }
8668
8685
  };
8669
8686
  const handleInputKeyDown = (e) => {
8670
- if (!dropdownVisible.value && displayedItems.value.length > 0) {
8671
- if (e.key === "ArrowDown" || e.key === "Enter") {
8672
- e.preventDefault();
8687
+ if (e.key === "ArrowDown" && displayedItems.value.length > 0) {
8688
+ e.preventDefault();
8689
+ if (!dropdownVisible.value) {
8673
8690
  dropdownVisible.value = true;
8674
- focusedIndex.value = 0;
8675
- setTimeout(() => {
8676
- const firstRadioButton = document.getElementById(`search-select-radio-0`);
8677
- if (firstRadioButton) {
8678
- firstRadioButton.focus();
8679
- firstRadioButton.setAttribute("checked", "true");
8680
- }
8681
- }, 0);
8682
- return;
8683
8691
  }
8692
+ focusFirstRadio();
8693
+ return;
8684
8694
  }
8685
- if (!dropdownVisible.value) return;
8686
- switch (e.key) {
8687
- case "ArrowDown":
8688
- e.preventDefault();
8689
- e.stopPropagation();
8690
- if (focusedIndex.value < displayedItems.value.length - 1) {
8691
- focusedIndex.value++;
8692
- } else {
8693
- focusedIndex.value = 0;
8694
- }
8695
- break;
8696
- case "ArrowUp":
8697
- e.preventDefault();
8698
- e.stopPropagation();
8699
- if (focusedIndex.value > 0) {
8700
- focusedIndex.value--;
8701
- } else {
8702
- focusedIndex.value = displayedItems.value.length - 1;
8703
- }
8704
- break;
8705
- case "Enter":
8706
- e.preventDefault();
8707
- if (focusedIndex.value >= 0 && focusedIndex.value < displayedItems.value.length) {
8708
- const focusedItem = displayedItems.value[focusedIndex.value];
8709
- if (focusedItem) {
8710
- handleClick(e, focusedItem);
8711
- }
8712
- } else if (displayedItems.value.length === 1) {
8713
- const onlyItem = displayedItems.value[0];
8714
- if (onlyItem) {
8715
- handleClick(e, onlyItem);
8716
- }
8717
- }
8718
- break;
8719
- case "Escape":
8720
- e.preventDefault();
8721
- dropdownVisible.value = false;
8722
- focusedIndex.value = -1;
8723
- const input = document.getElementById(inputId);
8724
- input?.focus();
8725
- break;
8726
- case "Tab":
8727
- if (!dropdownVisible.value) {
8728
- dropdownVisible.value = false;
8729
- focusedIndex.value = -1;
8730
- }
8731
- break;
8695
+ if (e.key === "Enter" && !dropdownVisible.value && displayedItems.value.length > 0) {
8696
+ e.preventDefault();
8697
+ dropdownVisible.value = true;
8698
+ focusFirstRadio();
8699
+ return;
8700
+ }
8701
+ if (e.key === "Escape" && dropdownVisible.value) {
8702
+ e.preventDefault();
8703
+ dropdownVisible.value = false;
8704
+ uncheckAllRadios();
8705
+ focusInput();
8732
8706
  }
8733
8707
  };
8734
8708
  vue.onMounted(() => {
@@ -8738,7 +8712,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8738
8712
  }
8739
8713
  window.addEventListener("mouseup", onClickOutside);
8740
8714
  vue.nextTick(() => {
8741
- const input = document.getElementById(inputId);
8715
+ const input = getInputElement();
8742
8716
  if (input) {
8743
8717
  input.addEventListener("keydown", handleInputKeyDown);
8744
8718
  input.addEventListener("focus", handleInputFocus);
@@ -8748,7 +8722,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8748
8722
  });
8749
8723
  vue.onBeforeUnmount(() => {
8750
8724
  window.removeEventListener("mouseup", onClickOutside);
8751
- const input = document.getElementById(inputId);
8725
+ const input = getInputElement();
8752
8726
  if (input) {
8753
8727
  input.removeEventListener("keydown", handleInputKeyDown);
8754
8728
  input.removeEventListener("focus", handleInputFocus);
@@ -8761,6 +8735,26 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8761
8735
  }
8762
8736
  return attrs;
8763
8737
  });
8738
+ const activeDescendantId = vue.computed(() => {
8739
+ if (!dropdownVisible.value || !dropdownRef.value) return null;
8740
+ const checkedRadio = dropdownRef.value.querySelector('input[name="search-select-radio-group"]:checked');
8741
+ return checkedRadio?.id || null;
8742
+ });
8743
+ const inputAriaAttrs = vue.computed(() => {
8744
+ const attrs = {
8745
+ role: "combobox",
8746
+ "aria-expanded": dropdownVisible.value,
8747
+ "aria-autocomplete": "list",
8748
+ "aria-haspopup": "listbox"
8749
+ };
8750
+ if (dropdownVisible.value && listboxId) {
8751
+ attrs["aria-controls"] = listboxId;
8752
+ }
8753
+ if (activeDescendantId.value) {
8754
+ attrs["aria-activedescendant"] = activeDescendantId.value;
8755
+ }
8756
+ return attrs;
8757
+ });
8764
8758
  return (_ctx, _cache) => {
8765
8759
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
8766
8760
  ref_key: "componentRef",
@@ -8770,7 +8764,9 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8770
8764
  vue.createElementVNode("div", _hoisted_1$9, [
8771
8765
  !singleItemName.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
8772
8766
  vue.createElementVNode("div", _hoisted_3$5, [
8773
- vue.createVNode(_sfc_main$h, {
8767
+ vue.createVNode(_sfc_main$h, vue.mergeProps({
8768
+ ref_key: "inputComponentRef",
8769
+ ref: inputComponentRef,
8774
8770
  label: __props.label,
8775
8771
  meta: __props.meta ?? void 0,
8776
8772
  labelLeft: __props.labelLeft,
@@ -8784,10 +8780,11 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8784
8780
  id: inputId,
8785
8781
  clearButton: !!searchTerm.value,
8786
8782
  mask: pidMask.value,
8787
- maskOptions: { lazy: true },
8783
+ maskOptions: { lazy: true }
8784
+ }, inputAriaAttrs.value, {
8788
8785
  onInput: handleInput,
8789
8786
  onClearInput: handleClear
8790
- }, null, 8, ["label", "meta", "labelLeft", "valid", "invalidMessage", "disabled", "locale", "value", "clearButton", "mask"]),
8787
+ }), null, 16, ["label", "meta", "labelLeft", "valid", "invalidMessage", "disabled", "locale", "value", "clearButton", "mask"]),
8791
8788
  !__props.disabled && !hasInputValue.value ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
8792
8789
  key: 0,
8793
8790
  name: "search",
@@ -8801,11 +8798,10 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8801
8798
  ])),
8802
8799
  dropdownVisible.value && !singleItemName.value.length && !__props.disabled ? (vue.openBlock(), vue.createElementBlock("div", {
8803
8800
  key: 2,
8801
+ ref_key: "dropdownRef",
8802
+ ref: dropdownRef,
8804
8803
  class: vue.normalizeClass(listWrapperClasses.value),
8805
- style: vue.normalizeStyle(listWrapperStyle.value),
8806
- "aria-haspopup": "listbox",
8807
- "aria-expanded": "false",
8808
- "aria-controls": "select-dropdown"
8804
+ style: vue.normalizeStyle(listWrapperStyle.value)
8809
8805
  }, [
8810
8806
  __props.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
8811
8807
  vue.createVNode(_sfc_main$o, {
@@ -8813,43 +8809,43 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8813
8809
  size: "48px"
8814
8810
  })
8815
8811
  ])) : displayedItems.value && displayedItems.value.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
8816
- searchTerm.value && searchTerm.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, vue.toDisplayString(displayedItems.value.length) + " " + vue.toDisplayString(__props.searchContext.linkWord) + " " + vue.toDisplayString(totalCount.value) + " " + vue.toDisplayString(__props.searchContext.context), 1)) : !searchTerm.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, vue.toDisplayString(totalCount.value) + " " + vue.toDisplayString(__props.searchContext.context), 1)) : vue.createCommentVNode("", true),
8812
+ searchTerm.value && searchTerm.value.length ? (vue.openBlock(), vue.createElementBlock("div", {
8813
+ key: 0,
8814
+ class: vue.normalizeClass(headerClasses.value)
8815
+ }, vue.toDisplayString(displayedItems.value.length) + " " + vue.toDisplayString(__props.searchContext.linkWord) + " " + vue.toDisplayString(totalCount.value) + " " + vue.toDisplayString(__props.searchContext.context), 3)) : !searchTerm.value.length ? (vue.openBlock(), vue.createElementBlock("div", {
8816
+ key: 1,
8817
+ class: vue.normalizeClass(headerClasses.value)
8818
+ }, vue.toDisplayString(totalCount.value) + " " + vue.toDisplayString(__props.searchContext.context), 3)) : vue.createCommentVNode("", true),
8817
8819
  vue.createElementVNode("ul", {
8818
8820
  class: "block m-0 list-none p-0",
8819
8821
  role: "listbox",
8820
- id: "select-dropdown",
8822
+ id: listboxId,
8821
8823
  onKeydown: handleListKeyDown
8822
8824
  }, [
8823
8825
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayedItems.value, (item, index) => {
8824
8826
  return vue.openBlock(), vue.createElementBlock("li", {
8825
8827
  key: index,
8826
8828
  id: `search-select-item-${index}`,
8827
- class: vue.normalizeClass(["block m-0 hover:outline-none focus:outline-2 focus:outline-blue-500 -outline-offset-2", [focusedIndex.value === index && "outline-dashed outline-2 outline-blue-500 -outline-offset-2 "]]),
8829
+ class: vue.normalizeClass(listItemWrapperClasses.value),
8828
8830
  role: "option",
8829
- "aria-selected": focusedIndex.value === index,
8830
- tabindex: dropdownVisible.value && focusedIndex.value === index ? 0 : -1,
8831
- onMouseup: (e) => handleClick(e, item),
8832
- onMouseenter: ($event) => focusedIndex.value = index,
8833
- onKeydown: [
8834
- vue.withKeys((e) => handleClick(e, item), ["enter"]),
8835
- vue.withKeys(vue.withModifiers((e) => handleClick(e, item), ["prevent"]), ["space"])
8836
- ]
8831
+ onMouseup: (e) => handleClick(e, item)
8837
8832
  }, [
8838
- (vue.openBlock(), vue.createElementBlock("input", {
8833
+ vue.createElementVNode("input", {
8839
8834
  type: "radio",
8840
8835
  id: `search-select-radio-${index}`,
8841
- name: "social-account",
8836
+ name: "search-select-radio-group",
8842
8837
  class: "absolute left-0 opacity-0",
8843
- checked: focusedIndex.value === index,
8844
- key: `radio-${index}-${focusedIndex.value}`,
8845
- tabindex: "-1"
8846
- }, null, 8, _hoisted_10)),
8838
+ onKeydown: [
8839
+ vue.withKeys((e) => handleClick(e, item), ["enter"]),
8840
+ vue.withKeys(vue.withModifiers((e) => handleClick(e, item), ["prevent"]), ["space"])
8841
+ ]
8842
+ }, null, 40, _hoisted_8$1),
8847
8843
  vue.createElementVNode("label", {
8848
8844
  for: `search-select-radio-${index}`,
8849
- class: vue.normalizeClass(["block p-4 text-gray-700 cursor-pointer no-underline", listItemClasses.value]),
8845
+ class: vue.normalizeClass([labelClasses.value, listItemClasses.value]),
8850
8846
  innerHTML: handleMatchingString(item)
8851
- }, null, 10, _hoisted_11)
8852
- ], 42, _hoisted_9$1);
8847
+ }, null, 10, _hoisted_9$1)
8848
+ ], 42, _hoisted_7$2);
8853
8849
  }), 128))
8854
8850
  ], 32),
8855
8851
  __props.page !== void 0 && totalPages.value !== null && totalPages.value > 1 ? (vue.openBlock(), vue.createBlock(_sfc_main$g, {
@@ -8859,8 +8855,8 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
8859
8855
  onPaginate: handlePagination,
8860
8856
  class: "my-4! px-2"
8861
8857
  }, null, 8, ["current", "max"])) : vue.createCommentVNode("", true)
8862
- ], 64)) : !__props.loading ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_12, [
8863
- vue.createElementVNode("li", _hoisted_13, vue.toDisplayString(__props.noResultPrompt), 1)
8858
+ ], 64)) : !__props.loading ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_10, [
8859
+ vue.createElementVNode("li", _hoisted_11, vue.toDisplayString(__props.noResultPrompt), 1)
8864
8860
  ])) : vue.createCommentVNode("", true)
8865
8861
  ], 6)) : vue.createCommentVNode("", true)
8866
8862
  ])
@@ -9335,7 +9331,6 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
9335
9331
  return {
9336
9332
  ...filtered,
9337
9333
  id: inputId.value,
9338
- class: props.class ?? attrs.class,
9339
9334
  "data-testid": props.dataTestid ?? void 0
9340
9335
  };
9341
9336
  });
@@ -9507,7 +9502,6 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
9507
9502
  ...filtered,
9508
9503
  id: inputId.value,
9509
9504
  name: props.name ?? attrs.name,
9510
- class: props.class ?? attrs.class,
9511
9505
  "data-testid": props.dataTestid ?? void 0
9512
9506
  };
9513
9507
  });
@@ -10884,6 +10878,34 @@ function _sfc_render(_ctx, _cache) {
10884
10878
  return vue.openBlock(), vue.createElementBlock("hr", _hoisted_1);
10885
10879
  }
10886
10880
  const FdsSeparator = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
10881
+ function useFileValidation(options = {}) {
10882
+ const defaultOptions = {
10883
+ allowedExtensions: [],
10884
+ allowedMimeTypes: []
10885
+ };
10886
+ const config = { ...defaultOptions, ...options };
10887
+ const validateFile = (file) => {
10888
+ if (!file) {
10889
+ return { isValid: false, error: "No file provided" };
10890
+ }
10891
+ const fileName = file.name.toLowerCase();
10892
+ const fileExtension = fileName.substring(fileName.lastIndexOf("."));
10893
+ const fileMimeType = file.type;
10894
+ const isValidExtension = config.allowedExtensions.length === 0 || config.allowedExtensions.some((ext) => ext.toLowerCase() === fileExtension);
10895
+ const isValidMimeType = config.allowedMimeTypes.length === 0 || config.allowedMimeTypes.includes(fileMimeType);
10896
+ const isValid = isValidExtension || isValidMimeType;
10897
+ if (!isValid) {
10898
+ return {
10899
+ isValid: false,
10900
+ error: `File type not allowed. Allowed types: ${config.allowedExtensions.join(", ")}`
10901
+ };
10902
+ }
10903
+ return { isValid: true };
10904
+ };
10905
+ return {
10906
+ validateFile
10907
+ };
10908
+ }
10887
10909
  const logoFeelgoodColored = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='83'%20xmlns:v='https://vecta.io/nano'%3e%3cpath%20fill='%230c4899'%20d='M39.389%2011.947L36.139%2026h.001%208.038v3H35.55l-2.575%2012.093c-.813%203.982-1.716%207.964-2.711%2011.857-1.625%206.336-5.781%2017.378-9.576%2022.628C16.804%2081.009%2013.641%2083%206.866%2083%203.433%2083%200%2080.375%200%2076.845c0-2.353%201.806-4.344%204.246-4.344%202.078%200%204.246%201.266%204.246%203.62%200%201.086-.361%201.72-.723%202.172s-.722.724-.722%201.267c0%201.177%201.535%201.177%202.348%201.177%202.982%200%205.692-2.263%207.77-9.052%201.445-4.706%202.259-9.684%203.162-14.481L25.948%2029h-8.421l-.001-3h9.258s-.076.268%200%200c2.628-9.359%206.73-20.689%2016.038-24.824C44.268.543%2045.984%200%2048.514%200%2052.85%200%2058%202.262%2058%207.241c0%203.077-1.897%204.706-4.879%204.706-2.62%200-3.975-1.629-4.246-4.163-.18-1.448.813-2.897%201.626-3.62%201.988-1.72-1.626-1.902-2.529-1.902-4.427%200-7.318%204.254-8.583%209.685zm9.227%2028.868h8.559v-4.608c0-5.186-2.222-5.432-4.279-5.432-2.881%200-4.28%201.727-4.28%205.679v4.361zm17.53%201.976h-17.53v7.571c0%205.926%202.222%208.807%205.926%208.807%204.938%200%208.888-2.634%209.958-8.231h1.975c-1.317%206.337-5.843%2010.452-12.427%2010.452-9.547%200-14.978-7.242-14.978-16.295%200-8.148%205.596-16.049%2014.319-16.049%207.654%200%2012.757%206.584%2012.757%2013.745zm12.403-1.976h8.559v-4.608c0-5.186-2.222-5.432-4.279-5.432-2.881%200-4.28%201.727-4.28%205.679v4.361zm17.53%201.976h-17.53v7.571c0%205.926%202.222%208.807%205.926%208.807%204.938%200%208.888-2.634%209.958-8.231h1.975c-1.317%206.337-5.843%2010.452-12.427%2010.452-9.547%200-14.979-7.242-14.979-16.295%200-8.148%205.597-16.049%2014.32-16.049%207.654%200%2012.757%206.584%2012.757%2013.745zM101.159%209h-3.457V7h12.181v52h3.456v2H98v-2h3.159V9z'/%3e%3cpath%20fill='%23e31c0d'%20d='M126.892%2050.691h-2.469c-4.115%200-5.679%201.646-5.679%203.539%200%201.482.905%202.716%204.773%202.716l9.547-.164c6.749-.165%209.959%203.209%209.959%208.394%200%206.584-4.527%2014.156-15.308%2014.156-10.287%200-12.098-5.761-12.098-7.655%200-3.867%201.811-5.348%206.007-7.653-4.032-1.152-6.089-3.703-6.089-7.983%200-3.704%203.456-6.172%206.584-6.749v-.164c-3.869-1.4-6.502-5.103-6.502-9.547%200-2.716%202.387-10.535%2012.344-10.535%202.799%200%205.515%201.071%207.82%202.634.822-1.728%202.632-3.704%204.69-3.704%201.811%200%203.374.905%203.374%202.881%200%201.563-.987%202.469-2.551%202.469-1.316%200-2.221-.493-2.798-1.728a5.2%205.2%200%200%200-1.81%201.152c2.14%201.81%203.127%204.526%203.127%207.325%200%204.937-2.881%2010.616-12.921%2010.616zm-3.292-9.958c0%206.502.823%208.23%204.279%208.23%203.21%200%203.704-1.399%203.704-10.699%200-6.749-1.07-7.489-3.622-7.489-3.949%200-4.361%201.893-4.361%209.958zm10.369%2023.62h-11.11c-.988%201.729-1.564%202.634-1.564%204.774%200%205.267%203.128%207.9%208.231%207.9%205.513%200%2010.863-3.868%2010.863-8.888%200-2.386-.658-3.786-6.42-3.786zm19.418-26.912v14.814c0%205.349%201.234%207.572%204.773%207.572%203.951%200%204.774-2.223%204.774-7.49V37.441c0-6.09-2.305-6.831-4.774-6.831s-4.773.741-4.773%206.831zm4.773%2023.949c-9.628%200-14.237-8.065-14.237-16.131%200-8.147%204.609-16.213%2014.237-16.213s14.239%208.066%2014.239%2016.213c0%208.066-4.61%2016.131-14.239%2016.131zm27.217-23.949v14.814c0%205.349%201.234%207.572%204.773%207.572%203.951%200%204.774-2.223%204.774-7.49V37.441c0-6.09-2.305-6.831-4.774-6.831s-4.773.741-4.773%206.831zm4.773%2023.949c-9.628%200-14.238-8.065-14.238-16.131%200-8.147%204.61-16.213%2014.238-16.213s14.239%208.066%2014.239%2016.213c0%208.066-4.61%2016.131-14.239%2016.131zm37.505-12.592v-5.103c0-5.678-1.234-12.674-7.078-12.674-3.539%200-3.621%205.349-3.621%208.724v12.839c0%202.963.247%206.83%203.786%206.83%203.292%200%206.831-2.88%206.913-10.616zM236.379%2059H240v2h-12.263v-4.301h-.164c-1.317%202.881-4.444%204.692-7.819%204.692-8.806%200-12.098-8.23-12.098-15.802%200-10.287%204.855-16.542%2012.427-16.542%203.292%200%206.009%202.222%207.407%204.773h.165V8.883h-3.95V7h12.674v52z'/%3e%3c/svg%3e";
10888
10910
  const logoFeelgoodLight = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='83'%20xmlns:v='https://vecta.io/nano'%3e%3cpath%20fill='%23fff'%20d='M39.389%2011.947L36.139%2026h.001%208.038v3H35.55l-2.575%2012.093c-.813%203.982-1.716%207.964-2.711%2011.857-1.625%206.336-5.781%2017.378-9.576%2022.628C16.804%2081.009%2013.641%2083%206.866%2083%203.433%2083%200%2080.375%200%2076.845c0-2.353%201.806-4.344%204.246-4.344%202.078%200%204.246%201.266%204.246%203.62%200%201.086-.361%201.72-.723%202.172s-.722.724-.722%201.267c0%201.177%201.535%201.177%202.348%201.177%202.982%200%205.692-2.263%207.77-9.052%201.445-4.706%202.259-9.684%203.162-14.481L25.948%2029h-8.421l-.001-3h9.258s-.076.268%200%200c2.628-9.359%206.73-20.689%2016.038-24.824C44.268.543%2045.984%200%2048.514%200%2052.85%200%2058%202.262%2058%207.241c0%203.077-1.897%204.706-4.879%204.706-2.62%200-3.975-1.629-4.246-4.163-.18-1.448.813-2.897%201.626-3.62%201.988-1.72-1.626-1.902-2.529-1.902-4.427%200-7.318%204.254-8.583%209.685zm9.227%2028.868h8.559v-4.608c0-5.186-2.222-5.432-4.279-5.432-2.881%200-4.28%201.727-4.28%205.679v4.361zm17.53%201.976h-17.53v7.571c0%205.926%202.222%208.807%205.926%208.807%204.938%200%208.888-2.634%209.958-8.231h1.975c-1.317%206.337-5.843%2010.452-12.427%2010.452-9.547%200-14.978-7.242-14.978-16.295%200-8.148%205.596-16.049%2014.319-16.049%207.654%200%2012.757%206.584%2012.757%2013.745zm12.403-1.976h8.559v-4.608c0-5.186-2.222-5.432-4.279-5.432-2.881%200-4.28%201.727-4.28%205.679v4.361zm17.53%201.976h-17.53v7.571c0%205.926%202.222%208.807%205.926%208.807%204.938%200%208.888-2.634%209.958-8.231h1.975c-1.317%206.337-5.843%2010.452-12.427%2010.452-9.547%200-14.979-7.242-14.979-16.295%200-8.148%205.597-16.049%2014.32-16.049%207.654%200%2012.757%206.584%2012.757%2013.745zM101.159%209h-3.457V7h12.181v52h3.456v2H98v-2h3.159V9zm25.733%2041.691h-2.469c-4.115%200-5.679%201.646-5.679%203.539%200%201.482.905%202.716%204.773%202.716%203.21%200%206.42-.082%209.547-.164%206.749-.165%209.959%203.209%209.959%208.394%200%206.584-4.527%2014.156-15.308%2014.156-10.287%200-12.098-5.761-12.098-7.655%200-3.867%201.811-5.348%206.007-7.653-4.032-1.152-6.089-3.703-6.089-7.983%200-3.704%203.456-6.172%206.584-6.749v-.164c-3.869-1.4-6.502-5.103-6.502-9.547%200-2.716%202.387-10.535%2012.344-10.535%202.799%200%205.515%201.071%207.82%202.634.822-1.728%202.632-3.704%204.69-3.704%201.811%200%203.374.905%203.374%202.881%200%201.563-.987%202.469-2.551%202.469-1.316%200-2.221-.493-2.798-1.728a5.2%205.2%200%200%200-1.81%201.152c2.14%201.81%203.127%204.526%203.127%207.325%200%204.937-2.881%2010.616-12.921%2010.616zm-3.292-9.958c0%206.502.823%208.23%204.279%208.23%203.21%200%203.704-1.399%203.704-10.699%200-6.749-1.07-7.489-3.622-7.489-3.949%200-4.361%201.893-4.361%209.958zm10.369%2023.62h-11.11c-.988%201.729-1.564%202.634-1.564%204.774%200%205.267%203.128%207.9%208.231%207.9%205.513%200%2010.863-3.868%2010.863-8.888%200-2.386-.658-3.786-6.42-3.786zm19.418-26.912v14.814c0%205.349%201.234%207.572%204.773%207.572%203.951%200%204.774-2.223%204.774-7.49V37.441c0-6.09-2.305-6.831-4.774-6.831s-4.773.741-4.773%206.831zm4.773%2023.949c-9.628%200-14.237-8.065-14.237-16.131%200-8.147%204.609-16.213%2014.237-16.213s14.239%208.066%2014.239%2016.213c0%208.066-4.61%2016.131-14.239%2016.131zm27.217-23.949v14.814c0%205.349%201.234%207.572%204.773%207.572%203.951%200%204.774-2.223%204.774-7.49V37.441c0-6.09-2.305-6.831-4.774-6.831s-4.773.741-4.773%206.831zm4.773%2023.949c-9.628%200-14.238-8.065-14.238-16.131%200-8.147%204.61-16.213%2014.238-16.213s14.239%208.066%2014.239%2016.213c0%208.066-4.61%2016.131-14.239%2016.131zm37.505-12.592v-5.103c0-5.678-1.234-12.674-7.078-12.674-3.539%200-3.621%205.349-3.621%208.724v12.839c0%202.963.247%206.83%203.786%206.83%203.292%200%206.831-2.88%206.913-10.616zM236.379%2059H240v2h-12.263v-4.301h-.164c-1.317%202.881-4.444%204.692-7.819%204.692-8.806%200-12.098-8.23-12.098-15.802%200-10.287%204.855-16.542%2012.427-16.542%203.292%200%206.009%202.222%207.407%204.773h.165V8.883h-3.95V7h12.674v52z'/%3e%3c/svg%3e";
10889
10911
  const bankid = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='85'%20height='80'%20fill='%23193e4f'%20xmlns:v='https://vecta.io/nano'%3e%3cpath%20d='M26.693%2041.74l3.534-22.276h-3.775c-1.767%200-4.043-.991-4.712-2.811-.214-.616-.723-2.731%202.195-4.793%201.044-.723%201.714-1.526%201.847-2.142.134-.643-.027-1.205-.482-1.633-.643-.616-1.901-.964-3.507-.964-2.704%200-4.605%201.553-4.792%202.677-.134.83.509%201.499%201.071%201.928%201.687%201.258%202.088%203.079%201.044%204.793-1.071%201.767-3.4%202.918-5.89%202.945H9.371L3.4%2057.51h20.83l2.463-15.77zM2.276%2065.221h8.541c3.641%200%204.525%201.847%204.257%203.534-.214%201.366-1.151%202.383-2.758%203.052%202.035.776%202.838%201.981%202.544%203.882-.375%202.383-2.436%204.15-5.141%204.15H0l2.276-14.618zm5.649%206.051c1.66%200%202.436-.884%202.597-1.928.161-1.124-.348-1.901-2.008-1.901H7.042l-.589%203.829h1.473zm-.91%206.292c1.714%200%202.704-.696%202.945-2.115.187-1.232-.509-1.954-2.169-1.954h-1.66l-.643%204.096h1.526v-.027zm19.812%202.383c-2.222.161-3.293-.08-3.829-1.044-1.178.723-2.49%201.098-3.882%201.098-2.517%200-3.4-1.312-3.159-2.758.107-.696.509-1.365%201.151-1.928%201.392-1.205%204.819-1.365%206.158-2.276.107-1.017-.294-1.392-1.553-1.392-1.473%200-2.704.482-4.819%201.928l.509-3.32c1.821-1.312%203.588-1.928%205.623-1.928%202.597%200%204.9%201.071%204.471%203.909l-.509%203.213c-.187%201.124-.134%201.473%201.125%201.499l-1.285%202.999zm-3.855-5.06c-1.178.75-3.373.616-3.615%202.169-.107.723.348%201.258%201.071%201.258.696%200%201.553-.294%202.249-.776-.054-.268-.027-.535.053-1.044l.241-1.606zm8.005-6.373h4.445l-.241%201.472c1.419-1.205%202.49-1.66%203.882-1.66%202.49%200%203.641%201.526%203.24%204.016l-1.151%207.47h-4.444l.964-6.185c.187-1.124-.161-1.66-1.017-1.66-.696%200-1.339.375-1.955%201.205l-1.017%206.613h-4.444l1.74-11.272zm14.806-3.293h4.445l-1.125%207.175%204.257-3.882h5.489l-5.462%204.819%204.391%206.479h-5.596l-3.373-5.248h-.054l-.803%205.221h-4.444l2.276-14.565zm15.716%200h5.114l-2.249%2014.592H59.25l2.249-14.592zm7.604%200h7.309c5.649%200%207.282%204.096%206.747%207.497-.509%203.32-3.133%207.095-8.086%207.095h-8.246l2.276-14.592zm4.739%2011.111c2.49%200%203.855-1.232%204.257-3.829.294-1.928-.295-3.829-3.052-3.829h-1.365l-1.178%207.657h1.339zM54.699%200H33.414l-2.838%2018.019h3.614c1.981%200%203.855-.91%204.659-2.222.268-.428.375-.803.375-1.151%200-.75-.509-1.312-1.017-1.687-1.392-1.044-1.687-2.142-1.687-2.918%200-.161%200-.295.027-.428.294-1.901%202.865-3.963%206.265-3.963%202.035%200%203.588.482%204.525%201.365.83.776%201.151%201.874.91%203.025-.294%201.365-1.66%202.49-2.436%203.052-2.062%201.446-1.794%202.704-1.66%203.079.428%201.124%202.062%201.847%203.32%201.847h5.515v.027c7.497.054%2011.513%203.507%2010.254%2011.54-1.178%207.47-6.908%2010.683-13.735%2010.736l-2.704%2017.242h3.989c16.841%200%2030.602-10.817%2033.307-27.898C87.443%208.461%2073.976%200%2054.699%200z'/%3e%3c/svg%3e";
@@ -10962,6 +10984,7 @@ exports.logoFeelgoodColored = logoFeelgoodColored;
10962
10984
  exports.logoFeelgoodLight = logoFeelgoodLight;
10963
10985
  exports.useBoldQuery = useBoldQuery;
10964
10986
  exports.useDownload = useDownload;
10987
+ exports.useFileValidation = useFileValidation;
10965
10988
  exports.useIsPid = useIsPid;
10966
10989
  exports.useTreeState = useTreeState;
10967
10990
  //# sourceMappingURL=fds-vue-core.cjs.js.map