fds-vue-core 2.1.47 → 2.1.49
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.
- package/dist/fds-vue-core.cjs.js +410 -224
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +1 -1
- package/dist/fds-vue-core.es.js +411 -225
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +3 -2
- package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.vue +7 -1
- package/src/components/Blocks/FdsBlockAlert/types.ts +1 -0
- package/src/components/Blocks/FdsBlockContent/FdsBlockContent.vue +10 -1
- package/src/components/Blocks/FdsBlockContent/types.ts +1 -0
- package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.vue +11 -2
- package/src/components/Blocks/FdsBlockExpander/types.ts +1 -0
- package/src/components/Blocks/FdsBlockInfo/FdsBlockInfo.vue +10 -1
- package/src/components/Blocks/FdsBlockInfo/types.ts +1 -0
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.vue +2 -0
- package/src/components/Blocks/FdsBlockLink/types.ts +1 -0
- package/src/components/Buttons/ButtonBaseProps.ts +1 -0
- package/src/components/Buttons/FdsButtonCopy/FdsButtonCopy.vue +2 -0
- package/src/components/Buttons/FdsButtonCopy/types.ts +1 -0
- package/src/components/Buttons/FdsButtonDownload/FdsButtonDownload.vue +12 -1
- package/src/components/Buttons/FdsButtonDownload/types.ts +1 -0
- package/src/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue +27 -8
- package/src/components/Buttons/FdsButtonIcon/types.ts +1 -0
- package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue +2 -0
- package/src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.vue +2 -0
- package/src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue +2 -0
- package/src/components/FdsIcon/FdsIcon.vue +10 -0
- package/src/components/FdsIcon/types.ts +1 -0
- package/src/components/FdsModal/FdsModal.vue +10 -1
- package/src/components/FdsModal/types.ts +1 -0
- package/src/components/FdsPagination/FdsPagination.vue +22 -1
- package/src/components/FdsPagination/types.ts +2 -0
- package/src/components/FdsSearchSelect/FdsSearchSelect.vue +18 -2
- package/src/components/FdsSearchSelect/types.ts +4 -1
- package/src/components/FdsSpinner/FdsSpinner.vue +11 -1
- package/src/components/FdsSpinner/types.ts +1 -0
- package/src/components/FdsSticker/FdsSticker.vue +10 -1
- package/src/components/FdsSticker/types.ts +1 -0
- package/src/components/FdsTreeView/FdsTreeView.vue +10 -1
- package/src/components/FdsTreeView/types.ts +1 -0
- package/src/components/FdsTruncatedText/FdsTruncatedText.vue +10 -1
- package/src/components/FdsTruncatedText/types.ts +1 -0
- package/src/components/Form/FdsCheckbox/FdsCheckbox.vue +3 -1
- package/src/components/Form/FdsCheckbox/types.ts +1 -0
- package/src/components/Form/FdsInput/FdsInput.vue +5 -1
- package/src/components/Form/FdsInput/types.ts +2 -0
- package/src/components/Form/FdsRadio/FdsRadio.vue +3 -1
- package/src/components/Form/FdsRadio/types.ts +1 -0
- package/src/components/Form/FdsSelect/FdsSelect.vue +3 -1
- package/src/components/Form/FdsSelect/types.ts +1 -0
- package/src/components/Form/FdsTextarea/FdsTextarea.vue +3 -1
- package/src/components/Form/FdsTextarea/types.ts +1 -0
- package/src/components/Table/FdsTable/FdsTable.vue +10 -1
- package/src/components/Table/FdsTable/types.ts +1 -0
- package/src/components/Table/FdsTableHead/FdsTableHead.vue +10 -1
- package/src/components/Table/FdsTableHead/types.ts +1 -0
- package/src/components/Tabs/FdsTabs/FdsTabs.vue +10 -1
- package/src/components/Tabs/FdsTabs/types.ts +1 -0
- package/src/components/Tabs/FdsTabsItem/FdsTabsItem.vue +3 -1
- package/src/components/Tabs/FdsTabsItem/types.ts +1 -0
- package/src/components/Typography/FdsHeading/FdsHeading.vue +10 -0
- package/src/components/Typography/FdsHeading/types.ts +1 -0
- package/src/components/Typography/FdsListHeading/FdsListHeading.vue +10 -1
- package/src/components/Typography/FdsListHeading/types.ts +1 -0
- package/src/components/Typography/FdsText/FdsText.vue +10 -1
- package/src/components/Typography/FdsText/types.ts +1 -0
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -548,13 +548,14 @@ const icons = {
|
|
|
548
548
|
</defs>
|
|
549
549
|
</svg>`
|
|
550
550
|
};
|
|
551
|
-
const _hoisted_1$
|
|
551
|
+
const _hoisted_1$o = ["innerHTML"];
|
|
552
552
|
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
553
553
|
__name: "FdsIcon",
|
|
554
554
|
props: {
|
|
555
555
|
name: {},
|
|
556
556
|
size: { default: 24 },
|
|
557
|
-
title: { default: void 0 }
|
|
557
|
+
title: { default: void 0 },
|
|
558
|
+
dataTestid: { default: void 0 }
|
|
558
559
|
},
|
|
559
560
|
setup(__props) {
|
|
560
561
|
const props = __props;
|
|
@@ -570,12 +571,18 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
|
570
571
|
return normalizeSvg(withTitle);
|
|
571
572
|
});
|
|
572
573
|
const pixelSize = vue.computed(() => typeof props.size === "number" ? `${props.size}px` : props.size);
|
|
574
|
+
const rootAttrs = vue.computed(() => {
|
|
575
|
+
const attrs = {};
|
|
576
|
+
if (props.dataTestid) {
|
|
577
|
+
attrs["data-testid"] = props.dataTestid;
|
|
578
|
+
}
|
|
579
|
+
return attrs;
|
|
580
|
+
});
|
|
573
581
|
return (_ctx, _cache) => {
|
|
574
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
582
|
+
return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({
|
|
575
583
|
class: "inline-flex items-center justify-center align-middle",
|
|
576
|
-
style:
|
|
577
|
-
|
|
578
|
-
}, null, 12, _hoisted_1$p);
|
|
584
|
+
style: { width: pixelSize.value, height: pixelSize.value }
|
|
585
|
+
}, rootAttrs.value, { innerHTML: svgHtml.value }), null, 16, _hoisted_1$o);
|
|
579
586
|
};
|
|
580
587
|
}
|
|
581
588
|
});
|
|
@@ -584,18 +591,27 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
584
591
|
props: {
|
|
585
592
|
icon: {},
|
|
586
593
|
size: { default: 24 },
|
|
587
|
-
loading: { type: Boolean, default: false }
|
|
594
|
+
loading: { type: Boolean, default: false },
|
|
595
|
+
dataTestid: { default: void 0 }
|
|
588
596
|
},
|
|
589
597
|
emits: ["click"],
|
|
590
598
|
setup(__props, { emit: __emit }) {
|
|
591
599
|
const props = __props;
|
|
592
600
|
const { disabled, attrs } = useAttrsWithDefaults(props);
|
|
593
|
-
const
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
601
|
+
const generateAriaLabel = (iconName) => iconName.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
602
|
+
const buttonAttrs = vue.computed(() => {
|
|
603
|
+
const providedAriaLabel = typeof attrs["aria-label"] === "string" ? attrs["aria-label"] : void 0;
|
|
604
|
+
const ariaLabel = providedAriaLabel || (props.loading ? "Loading" : generateAriaLabel(props.icon));
|
|
605
|
+
const result = {
|
|
606
|
+
...attrs,
|
|
607
|
+
type: props.type,
|
|
608
|
+
disabled: disabled.value,
|
|
609
|
+
"aria-label": ariaLabel,
|
|
610
|
+
"aria-disabled": disabled.value || props.loading ? true : void 0,
|
|
611
|
+
"data-testid": props.dataTestid ?? void 0
|
|
612
|
+
};
|
|
613
|
+
return result;
|
|
614
|
+
});
|
|
599
615
|
const iconSize = vue.computed(() => props.size - 4);
|
|
600
616
|
const emit = __emit;
|
|
601
617
|
const buttonClasses = vue.computed(() => [
|
|
@@ -617,23 +633,24 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
617
633
|
!__props.loading ? (vue.openBlock(), vue.createBlock(_sfc_main$w, {
|
|
618
634
|
key: 0,
|
|
619
635
|
size: iconSize.value,
|
|
620
|
-
name: __props.icon
|
|
636
|
+
name: __props.icon,
|
|
637
|
+
"aria-hidden": "true"
|
|
621
638
|
}, null, 8, ["size", "name"])) : (vue.openBlock(), vue.createBlock(_sfc_main$w, {
|
|
622
639
|
key: 1,
|
|
623
640
|
size: iconSize.value,
|
|
624
641
|
name: "spinner",
|
|
625
|
-
class: "animate-spin"
|
|
642
|
+
class: "animate-spin",
|
|
643
|
+
"aria-hidden": "true"
|
|
626
644
|
}, null, 8, ["size"]))
|
|
627
645
|
], 16);
|
|
628
646
|
};
|
|
629
647
|
}
|
|
630
648
|
});
|
|
631
|
-
const _hoisted_1$
|
|
632
|
-
const _hoisted_2$
|
|
633
|
-
const _hoisted_3$b = { class: "
|
|
634
|
-
const _hoisted_4$a = { class: "
|
|
635
|
-
const _hoisted_5$9 = {
|
|
636
|
-
const _hoisted_6$6 = {
|
|
649
|
+
const _hoisted_1$n = { class: "flex items-start gap-2" };
|
|
650
|
+
const _hoisted_2$i = { class: "h-7 flex items-center" };
|
|
651
|
+
const _hoisted_3$b = { class: "leading-7" };
|
|
652
|
+
const _hoisted_4$a = { class: "relative h-7" };
|
|
653
|
+
const _hoisted_5$9 = {
|
|
637
654
|
key: 1,
|
|
638
655
|
class: "fds-block-alert-slot mb-0-last-child"
|
|
639
656
|
};
|
|
@@ -646,7 +663,8 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
646
663
|
expanded: { type: Boolean, default: false },
|
|
647
664
|
label: { default: "" },
|
|
648
665
|
locale: { default: "sv" },
|
|
649
|
-
icon: {}
|
|
666
|
+
icon: {},
|
|
667
|
+
dataTestid: { default: void 0 }
|
|
650
668
|
},
|
|
651
669
|
emits: ["close", "toggle", "update:visible"],
|
|
652
670
|
setup(__props, { emit: __emit }) {
|
|
@@ -671,6 +689,10 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
671
689
|
]);
|
|
672
690
|
const autoId = `fds-alert-${Math.random().toString(36).slice(2, 9)}`;
|
|
673
691
|
const alertId = vue.computed(() => id.value ?? autoId);
|
|
692
|
+
const rootAttrs = vue.computed(() => ({
|
|
693
|
+
id: alertId.value,
|
|
694
|
+
...props.dataTestid && { "data-testid": props.dataTestid }
|
|
695
|
+
}));
|
|
674
696
|
function handleClose() {
|
|
675
697
|
isVisible.value = false;
|
|
676
698
|
emit("update:visible", false);
|
|
@@ -681,28 +703,24 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
681
703
|
emit("toggle");
|
|
682
704
|
}
|
|
683
705
|
return (_ctx, _cache) => {
|
|
684
|
-
return isVisible.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
685
|
-
key: 0,
|
|
686
|
-
id: alertId.value,
|
|
687
|
-
class: vue.normalizeClass(alertClasses.value)
|
|
688
|
-
}, [
|
|
706
|
+
return isVisible.value ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ key: 0 }, rootAttrs.value, { class: alertClasses.value }), [
|
|
689
707
|
vue.createElementVNode("div", null, [
|
|
690
708
|
vue.createElementVNode("div", null, [
|
|
691
709
|
__props.label ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
692
710
|
key: 0,
|
|
693
711
|
class: vue.normalizeClass(["font-bold w-full justify-between items-start flex gap-2", { "mb-4": (isExpanded.value || !__props.collapsable) && vue.unref(hasSlot) }])
|
|
694
712
|
}, [
|
|
695
|
-
vue.createElementVNode("div",
|
|
696
|
-
vue.createElementVNode("div",
|
|
713
|
+
vue.createElementVNode("div", _hoisted_1$n, [
|
|
714
|
+
vue.createElementVNode("div", _hoisted_2$i, [
|
|
697
715
|
vue.createVNode(_sfc_main$w, {
|
|
698
716
|
name: "alert",
|
|
699
717
|
size: 24,
|
|
700
718
|
class: "fill-yellow-700"
|
|
701
719
|
})
|
|
702
720
|
]),
|
|
703
|
-
vue.createElementVNode("span",
|
|
721
|
+
vue.createElementVNode("span", _hoisted_3$b, vue.toDisplayString(__props.label), 1)
|
|
704
722
|
]),
|
|
705
|
-
vue.createElementVNode("div",
|
|
723
|
+
vue.createElementVNode("div", _hoisted_4$a, [
|
|
706
724
|
__props.closeable ? (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
|
|
707
725
|
key: 0,
|
|
708
726
|
icon: "cross",
|
|
@@ -723,17 +741,17 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
723
741
|
}), null, 16, ["class"])) : vue.createCommentVNode("", true)
|
|
724
742
|
])
|
|
725
743
|
], 2)) : vue.createCommentVNode("", true),
|
|
726
|
-
isExpanded.value || !__props.collapsable ? (vue.openBlock(), vue.createElementBlock("div",
|
|
744
|
+
isExpanded.value || !__props.collapsable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$9, [
|
|
727
745
|
vue.renderSlot(_ctx.$slots, "default")
|
|
728
746
|
])) : vue.createCommentVNode("", true)
|
|
729
747
|
])
|
|
730
748
|
])
|
|
731
|
-
],
|
|
749
|
+
], 16)) : vue.createCommentVNode("", true);
|
|
732
750
|
};
|
|
733
751
|
}
|
|
734
752
|
});
|
|
735
|
-
const _hoisted_1$
|
|
736
|
-
const _hoisted_2$
|
|
753
|
+
const _hoisted_1$m = ["id"];
|
|
754
|
+
const _hoisted_2$h = {
|
|
737
755
|
key: 0,
|
|
738
756
|
class: "flex items-start justify-between gap-4"
|
|
739
757
|
};
|
|
@@ -745,7 +763,8 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
745
763
|
props: {
|
|
746
764
|
heading: { default: void 0 },
|
|
747
765
|
borderLeft: { default: void 0 },
|
|
748
|
-
tight: { type: Boolean, default: false }
|
|
766
|
+
tight: { type: Boolean, default: false },
|
|
767
|
+
dataTestid: { default: void 0 }
|
|
749
768
|
},
|
|
750
769
|
setup(__props) {
|
|
751
770
|
const props = __props;
|
|
@@ -770,13 +789,20 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
770
789
|
});
|
|
771
790
|
const autoId = `fds-content-block-${Math.random().toString(36).slice(2, 9)}`;
|
|
772
791
|
const contentBlockId = vue.computed(() => id.value ?? autoId);
|
|
792
|
+
const rootAttrs = vue.computed(() => {
|
|
793
|
+
const attrs = {};
|
|
794
|
+
if (props.dataTestid) {
|
|
795
|
+
attrs["data-testid"] = props.dataTestid;
|
|
796
|
+
}
|
|
797
|
+
return attrs;
|
|
798
|
+
});
|
|
773
799
|
return (_ctx, _cache) => {
|
|
774
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
800
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
775
801
|
id: contentBlockId.value,
|
|
776
|
-
class:
|
|
777
|
-
style:
|
|
778
|
-
}, [
|
|
779
|
-
__props.heading ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_2$
|
|
802
|
+
class: contentClasses.value,
|
|
803
|
+
style: borderLeftStyle.value
|
|
804
|
+
}, rootAttrs.value), [
|
|
805
|
+
__props.heading ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_2$h, [
|
|
780
806
|
vue.createElementVNode("div", _hoisted_3$a, [
|
|
781
807
|
vue.createElementVNode("h3", {
|
|
782
808
|
class: vue.normalizeClass(headerClasses.value)
|
|
@@ -789,7 +815,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
789
815
|
vue.createElementVNode("div", _hoisted_5$8, [
|
|
790
816
|
vue.renderSlot(_ctx.$slots, "default")
|
|
791
817
|
])
|
|
792
|
-
],
|
|
818
|
+
], 16, _hoisted_1$m);
|
|
793
819
|
};
|
|
794
820
|
}
|
|
795
821
|
});
|
|
@@ -797,7 +823,8 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
797
823
|
__name: "FdsSticker",
|
|
798
824
|
props: {
|
|
799
825
|
variant: { default: "blue" },
|
|
800
|
-
bullet: { type: Boolean, default: false }
|
|
826
|
+
bullet: { type: Boolean, default: false },
|
|
827
|
+
dataTestid: { default: void 0 }
|
|
801
828
|
},
|
|
802
829
|
setup(__props) {
|
|
803
830
|
const props = __props;
|
|
@@ -822,21 +849,26 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
822
849
|
props.variant === "gray" && "bg-gray-400",
|
|
823
850
|
props.variant === "t_blue" && "bg-blue-200 border border-blue-300"
|
|
824
851
|
]);
|
|
852
|
+
const rootAttrs = vue.computed(() => {
|
|
853
|
+
const attrs = {};
|
|
854
|
+
if (props.dataTestid) {
|
|
855
|
+
attrs["data-testid"] = props.dataTestid;
|
|
856
|
+
}
|
|
857
|
+
return attrs;
|
|
858
|
+
});
|
|
825
859
|
return (_ctx, _cache) => {
|
|
826
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
827
|
-
class: vue.normalizeClass(stickerClasses.value)
|
|
828
|
-
}, [
|
|
860
|
+
return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({ class: stickerClasses.value }, rootAttrs.value), [
|
|
829
861
|
__props.bullet ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
830
862
|
key: 0,
|
|
831
863
|
class: vue.normalizeClass(bulletDotClasses.value)
|
|
832
864
|
}, null, 2)) : vue.createCommentVNode("", true),
|
|
833
865
|
vue.renderSlot(_ctx.$slots, "default")
|
|
834
|
-
],
|
|
866
|
+
], 16);
|
|
835
867
|
};
|
|
836
868
|
}
|
|
837
869
|
});
|
|
838
|
-
const _hoisted_1$
|
|
839
|
-
const _hoisted_2$
|
|
870
|
+
const _hoisted_1$l = { class: "w-full flex justify-between items-start" };
|
|
871
|
+
const _hoisted_2$g = { class: "inline-flex items-center" };
|
|
840
872
|
const _hoisted_3$9 = {
|
|
841
873
|
key: 0,
|
|
842
874
|
class: "flex items-center mr-4"
|
|
@@ -846,7 +878,7 @@ const _hoisted_5$7 = {
|
|
|
846
878
|
key: 0,
|
|
847
879
|
class: "w-full flex mt-2"
|
|
848
880
|
};
|
|
849
|
-
const _hoisted_6$
|
|
881
|
+
const _hoisted_6$4 = ["aria-hidden"];
|
|
850
882
|
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
851
883
|
...{
|
|
852
884
|
inheritAttrs: false
|
|
@@ -858,7 +890,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
858
890
|
open: { type: Boolean, default: false },
|
|
859
891
|
preIcon: { default: void 0 },
|
|
860
892
|
stickerColor: { default: void 0 },
|
|
861
|
-
stickerText: { default: void 0 }
|
|
893
|
+
stickerText: { default: void 0 },
|
|
894
|
+
dataTestid: { default: void 0 }
|
|
862
895
|
},
|
|
863
896
|
emits: ["toggle"],
|
|
864
897
|
setup(__props, { emit: __emit }) {
|
|
@@ -877,6 +910,13 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
877
910
|
};
|
|
878
911
|
});
|
|
879
912
|
const wrapperClass = vue.computed(() => attrs.class);
|
|
913
|
+
const rootAttrs = vue.computed(() => {
|
|
914
|
+
const attrs2 = {};
|
|
915
|
+
if (props.dataTestid) {
|
|
916
|
+
attrs2["data-testid"] = props.dataTestid;
|
|
917
|
+
}
|
|
918
|
+
return attrs2;
|
|
919
|
+
});
|
|
880
920
|
vue.watch(
|
|
881
921
|
() => props.open,
|
|
882
922
|
(newValue) => {
|
|
@@ -899,9 +939,9 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
899
939
|
emit("toggle");
|
|
900
940
|
}
|
|
901
941
|
return (_ctx, _cache) => {
|
|
902
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
903
|
-
class:
|
|
904
|
-
}, [
|
|
942
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
943
|
+
class: [expanderClasses.value, wrapperClass.value]
|
|
944
|
+
}, rootAttrs.value), [
|
|
905
945
|
vue.createElementVNode("button", vue.mergeProps(buttonAttrs.value, {
|
|
906
946
|
type: "button",
|
|
907
947
|
class: headerClasses.value,
|
|
@@ -910,8 +950,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
910
950
|
vue.createElementVNode("span", {
|
|
911
951
|
class: vue.normalizeClass(buttonRowClasses.value)
|
|
912
952
|
}, [
|
|
913
|
-
vue.createElementVNode("span", _hoisted_1$
|
|
914
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
953
|
+
vue.createElementVNode("span", _hoisted_1$l, [
|
|
954
|
+
vue.createElementVNode("span", _hoisted_2$g, [
|
|
915
955
|
__props.preIcon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$9, [
|
|
916
956
|
vue.createVNode(_sfc_main$w, {
|
|
917
957
|
name: __props.preIcon,
|
|
@@ -921,7 +961,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
921
961
|
])) : vue.createCommentVNode("", true),
|
|
922
962
|
vue.createElementVNode("span", _hoisted_4$8, [
|
|
923
963
|
vue.createElementVNode("span", {
|
|
924
|
-
class: vue.normalizeClass(["font-bold font-heading text-lg leading-md", { "text-gray-
|
|
964
|
+
class: vue.normalizeClass(["font-bold font-heading text-lg leading-md", { "text-gray-700": __props.disabled }])
|
|
925
965
|
}, vue.toDisplayString(__props.label), 3)
|
|
926
966
|
])
|
|
927
967
|
]),
|
|
@@ -952,15 +992,15 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
952
992
|
class: "mb-0-last-child block px-4 pb-6 rounded-b-2xl bg-white"
|
|
953
993
|
}, [
|
|
954
994
|
vue.renderSlot(_ctx.$slots, "default")
|
|
955
|
-
], 8, _hoisted_6$
|
|
995
|
+
], 8, _hoisted_6$4), [
|
|
956
996
|
[vue.vShow, isOpen.value]
|
|
957
997
|
])
|
|
958
|
-
],
|
|
998
|
+
], 16);
|
|
959
999
|
};
|
|
960
1000
|
}
|
|
961
1001
|
});
|
|
962
|
-
const _hoisted_1$
|
|
963
|
-
const _hoisted_2$
|
|
1002
|
+
const _hoisted_1$k = ["id"];
|
|
1003
|
+
const _hoisted_2$f = {
|
|
964
1004
|
key: 0,
|
|
965
1005
|
class: "flex items-start gap-4"
|
|
966
1006
|
};
|
|
@@ -970,7 +1010,7 @@ const _hoisted_4$7 = {
|
|
|
970
1010
|
class: "mb-1"
|
|
971
1011
|
};
|
|
972
1012
|
const _hoisted_5$6 = { class: "flex items-start justify-between gap-4" };
|
|
973
|
-
const _hoisted_6$
|
|
1013
|
+
const _hoisted_6$3 = { class: "m-0 text-base font-main font-bold tracking-wide" };
|
|
974
1014
|
const _hoisted_7$3 = { class: "flex items-start gap-3" };
|
|
975
1015
|
const _hoisted_8$2 = {
|
|
976
1016
|
key: 1,
|
|
@@ -989,7 +1029,8 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
989
1029
|
props: {
|
|
990
1030
|
heading: { default: void 0 },
|
|
991
1031
|
icon: { default: void 0 },
|
|
992
|
-
size: { default: "small" }
|
|
1032
|
+
size: { default: "small" },
|
|
1033
|
+
dataTestid: { default: void 0 }
|
|
993
1034
|
},
|
|
994
1035
|
setup(__props) {
|
|
995
1036
|
const props = __props;
|
|
@@ -1003,12 +1044,19 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
1003
1044
|
]);
|
|
1004
1045
|
const autoId = `fds-content-block-${Math.random().toString(36).slice(2, 9)}`;
|
|
1005
1046
|
const contentBlockId = vue.computed(() => props.id ?? autoId);
|
|
1047
|
+
const rootAttrs = vue.computed(() => {
|
|
1048
|
+
const attrs = {};
|
|
1049
|
+
if (props.dataTestid) {
|
|
1050
|
+
attrs["data-testid"] = props.dataTestid;
|
|
1051
|
+
}
|
|
1052
|
+
return attrs;
|
|
1053
|
+
});
|
|
1006
1054
|
return (_ctx, _cache) => {
|
|
1007
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1055
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
1008
1056
|
id: contentBlockId.value,
|
|
1009
|
-
class:
|
|
1010
|
-
}, [
|
|
1011
|
-
__props.size === "large" && __props.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
1057
|
+
class: contentClasses.value
|
|
1058
|
+
}, rootAttrs.value), [
|
|
1059
|
+
__props.size === "large" && __props.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$f, [
|
|
1012
1060
|
vue.createVNode(_sfc_main$w, {
|
|
1013
1061
|
name: __props.icon,
|
|
1014
1062
|
size: largeIconSize,
|
|
@@ -1017,7 +1065,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
1017
1065
|
vue.createElementVNode("div", _hoisted_3$8, [
|
|
1018
1066
|
__props.heading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$7, [
|
|
1019
1067
|
vue.createElementVNode("header", _hoisted_5$6, [
|
|
1020
|
-
vue.createElementVNode("h3", _hoisted_6$
|
|
1068
|
+
vue.createElementVNode("h3", _hoisted_6$3, vue.toDisplayString(__props.heading), 1),
|
|
1021
1069
|
vue.createElementVNode("div", _hoisted_7$3, [
|
|
1022
1070
|
vue.renderSlot(_ctx.$slots, "headerInfo")
|
|
1023
1071
|
])
|
|
@@ -1051,12 +1099,12 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
1051
1099
|
vue.renderSlot(_ctx.$slots, "default")
|
|
1052
1100
|
])
|
|
1053
1101
|
]))
|
|
1054
|
-
],
|
|
1102
|
+
], 16, _hoisted_1$k);
|
|
1055
1103
|
};
|
|
1056
1104
|
}
|
|
1057
1105
|
});
|
|
1058
|
-
const _hoisted_1$
|
|
1059
|
-
const _hoisted_2$
|
|
1106
|
+
const _hoisted_1$j = { class: "mb-0-last-child" };
|
|
1107
|
+
const _hoisted_2$e = {
|
|
1060
1108
|
key: 0,
|
|
1061
1109
|
class: "flex items-end"
|
|
1062
1110
|
};
|
|
@@ -1075,7 +1123,8 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
1075
1123
|
icon: { default: void 0 },
|
|
1076
1124
|
interactive: { type: Boolean, default: true },
|
|
1077
1125
|
as: { default: "router-link" },
|
|
1078
|
-
disabled: { type: Boolean, default: false }
|
|
1126
|
+
disabled: { type: Boolean, default: false },
|
|
1127
|
+
dataTestid: { default: void 0 }
|
|
1079
1128
|
},
|
|
1080
1129
|
emits: ["click"],
|
|
1081
1130
|
setup(__props, { emit: __emit }) {
|
|
@@ -1140,6 +1189,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
1140
1189
|
download: componentType.value === "a" ? vue.unref(download) : void 0,
|
|
1141
1190
|
disabled: componentType.value === "button" ? props.disabled : void 0,
|
|
1142
1191
|
"aria-disabled": props.disabled,
|
|
1192
|
+
"data-testid": __props.dataTestid,
|
|
1143
1193
|
onClick: handleClick,
|
|
1144
1194
|
onKeydown: handleKeydown
|
|
1145
1195
|
}), {
|
|
@@ -1166,10 +1216,10 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
1166
1216
|
vue.createElementVNode("div", {
|
|
1167
1217
|
class: vue.normalizeClass(slotWrapperClasses.value)
|
|
1168
1218
|
}, [
|
|
1169
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
1219
|
+
vue.createElementVNode("div", _hoisted_1$j, [
|
|
1170
1220
|
vue.renderSlot(_ctx.$slots, "default")
|
|
1171
1221
|
]),
|
|
1172
|
-
vue.unref(hasStickerSlot) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
1222
|
+
vue.unref(hasStickerSlot) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$e, [
|
|
1173
1223
|
vue.renderSlot(_ctx.$slots, "sticker")
|
|
1174
1224
|
])) : vue.createCommentVNode("", true)
|
|
1175
1225
|
], 2)
|
|
@@ -1183,18 +1233,19 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
1183
1233
|
}, null, 8, ["class"])) : vue.createCommentVNode("", true)
|
|
1184
1234
|
]),
|
|
1185
1235
|
_: 3
|
|
1186
|
-
}, 16, ["id", "class", "target", "rel", "download", "disabled", "aria-disabled"]);
|
|
1236
|
+
}, 16, ["id", "class", "target", "rel", "download", "disabled", "aria-disabled", "data-testid"]);
|
|
1187
1237
|
};
|
|
1188
1238
|
}
|
|
1189
1239
|
});
|
|
1190
|
-
const _hoisted_1$
|
|
1240
|
+
const _hoisted_1$i = ["aria-label"];
|
|
1191
1241
|
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
1192
1242
|
__name: "FdsSpinner",
|
|
1193
1243
|
props: {
|
|
1194
1244
|
size: { default: "48px" },
|
|
1195
1245
|
color: { default: "inherit" },
|
|
1196
1246
|
label: { default: "" },
|
|
1197
|
-
labelPosition: { default: "bottom" }
|
|
1247
|
+
labelPosition: { default: "bottom" },
|
|
1248
|
+
dataTestid: { default: void 0 }
|
|
1198
1249
|
},
|
|
1199
1250
|
setup(__props) {
|
|
1200
1251
|
const props = __props;
|
|
@@ -1215,12 +1266,19 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
1215
1266
|
const wrapperClasses = vue.computed(
|
|
1216
1267
|
() => props.label ? props.labelPosition === "right" ? "flex items-center gap-2" : "inline-flex flex-col items-center gap-2" : "inline-block"
|
|
1217
1268
|
);
|
|
1269
|
+
const rootAttrs = vue.computed(() => {
|
|
1270
|
+
const attrs = {};
|
|
1271
|
+
if (props.dataTestid) {
|
|
1272
|
+
attrs["data-testid"] = props.dataTestid;
|
|
1273
|
+
}
|
|
1274
|
+
return attrs;
|
|
1275
|
+
});
|
|
1218
1276
|
return (_ctx, _cache) => {
|
|
1219
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1220
|
-
class:
|
|
1277
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
1278
|
+
class: wrapperClasses.value,
|
|
1221
1279
|
role: "status",
|
|
1222
1280
|
"aria-label": __props.label || "Laddar"
|
|
1223
|
-
}, [
|
|
1281
|
+
}, rootAttrs.value), [
|
|
1224
1282
|
vue.createElementVNode("div", {
|
|
1225
1283
|
class: "relative",
|
|
1226
1284
|
style: vue.normalizeStyle(boxStyle.value)
|
|
@@ -1260,12 +1318,12 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
1260
1318
|
key: 0,
|
|
1261
1319
|
class: vue.normalizeClass(__props.labelPosition === "bottom" ? "font-bold" : "")
|
|
1262
1320
|
}, vue.toDisplayString(__props.label), 3)) : vue.createCommentVNode("", true)
|
|
1263
|
-
],
|
|
1321
|
+
], 16, _hoisted_1$i);
|
|
1264
1322
|
};
|
|
1265
1323
|
}
|
|
1266
1324
|
});
|
|
1267
|
-
const _hoisted_1$
|
|
1268
|
-
const _hoisted_2$
|
|
1325
|
+
const _hoisted_1$h = ["aria-disabled"];
|
|
1326
|
+
const _hoisted_2$d = { class: "pt-0.5" };
|
|
1269
1327
|
const elBase$2 = "box-border appearance-none inline-flex items-start justify-center w-fit shadow-none p-0.5 text-base select-none m-0 rounded-md text-left align-start no-underline transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
|
|
1270
1328
|
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
1271
1329
|
...{
|
|
@@ -1287,7 +1345,8 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
1287
1345
|
href: {},
|
|
1288
1346
|
target: {},
|
|
1289
1347
|
rel: {},
|
|
1290
|
-
type: { default: "button" }
|
|
1348
|
+
type: { default: "button" },
|
|
1349
|
+
dataTestid: { default: void 0 }
|
|
1291
1350
|
},
|
|
1292
1351
|
emits: ["click"],
|
|
1293
1352
|
setup(__props, { emit: __emit }) {
|
|
@@ -1336,6 +1395,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
1336
1395
|
disabled: __props.as === "button" ? vue.unref(disabled) : void 0,
|
|
1337
1396
|
target: __props.as === "a" ? vue.unref(target) : void 0,
|
|
1338
1397
|
rel: __props.as === "a" ? vue.unref(rel) : void 0,
|
|
1398
|
+
"data-testid": __props.dataTestid,
|
|
1339
1399
|
class: buttonClasses.value,
|
|
1340
1400
|
onClick
|
|
1341
1401
|
}), {
|
|
@@ -1356,15 +1416,15 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
1356
1416
|
size: 24
|
|
1357
1417
|
}, null, 8, ["class", "name"])
|
|
1358
1418
|
], 2)) : vue.createCommentVNode("", true),
|
|
1359
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
1419
|
+
vue.createElementVNode("span", _hoisted_2$d, vue.toDisplayString(__props.text), 1)
|
|
1360
1420
|
]),
|
|
1361
1421
|
_: 1
|
|
1362
|
-
}, 16, ["type", "disabled", "target", "rel", "class"]))
|
|
1363
|
-
], 10, _hoisted_1$
|
|
1422
|
+
}, 16, ["type", "disabled", "target", "rel", "data-testid", "class"]))
|
|
1423
|
+
], 10, _hoisted_1$h);
|
|
1364
1424
|
};
|
|
1365
1425
|
}
|
|
1366
1426
|
});
|
|
1367
|
-
const _hoisted_1$
|
|
1427
|
+
const _hoisted_1$g = {
|
|
1368
1428
|
key: 0,
|
|
1369
1429
|
class: "flex items-center gap-2 h-7"
|
|
1370
1430
|
};
|
|
@@ -1376,7 +1436,8 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
1376
1436
|
label: { default: "Kopiera" },
|
|
1377
1437
|
copiedLabel: { default: "Kopierat!" },
|
|
1378
1438
|
timeoutMs: { default: 800 },
|
|
1379
|
-
disabled: { type: Boolean, default: false }
|
|
1439
|
+
disabled: { type: Boolean, default: false },
|
|
1440
|
+
dataTestid: { default: void 0 }
|
|
1380
1441
|
},
|
|
1381
1442
|
setup(__props) {
|
|
1382
1443
|
const props = __props;
|
|
@@ -1429,7 +1490,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
1429
1490
|
}
|
|
1430
1491
|
});
|
|
1431
1492
|
return (_ctx, _cache) => {
|
|
1432
|
-
return isCopied.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1493
|
+
return isCopied.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
|
|
1433
1494
|
vue.createVNode(_sfc_main$w, { name: "bigSuccess" }),
|
|
1434
1495
|
vue.createElementVNode("span", null, vue.toDisplayString(props.copiedLabel), 1)
|
|
1435
1496
|
])) : (vue.openBlock(), vue.createBlock(_sfc_main$n, {
|
|
@@ -1438,8 +1499,9 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
1438
1499
|
disabled: props.disabled,
|
|
1439
1500
|
icon: "copy",
|
|
1440
1501
|
text: isCopied.value ? props.copiedLabel : props.label,
|
|
1502
|
+
dataTestid: __props.dataTestid,
|
|
1441
1503
|
onClick
|
|
1442
|
-
}, null, 8, ["disabled", "text"]));
|
|
1504
|
+
}, null, 8, ["disabled", "text", "dataTestid"]));
|
|
1443
1505
|
};
|
|
1444
1506
|
}
|
|
1445
1507
|
});
|
|
@@ -4066,7 +4128,7 @@ function useDownload() {
|
|
|
4066
4128
|
isDownloading
|
|
4067
4129
|
};
|
|
4068
4130
|
}
|
|
4069
|
-
const _hoisted_1$
|
|
4131
|
+
const _hoisted_1$f = ["disabled", "aria-disabled"];
|
|
4070
4132
|
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
4071
4133
|
__name: "FdsButtonDownload",
|
|
4072
4134
|
props: {
|
|
@@ -4075,7 +4137,8 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
4075
4137
|
href: { default: void 0 },
|
|
4076
4138
|
downloadOptions: { default: void 0 },
|
|
4077
4139
|
text: { default: "" },
|
|
4078
|
-
disabled: { type: Boolean, default: false }
|
|
4140
|
+
disabled: { type: Boolean, default: false },
|
|
4141
|
+
dataTestid: { default: void 0 }
|
|
4079
4142
|
},
|
|
4080
4143
|
emits: ["click"],
|
|
4081
4144
|
setup(__props, { emit: __emit }) {
|
|
@@ -4146,8 +4209,17 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
4146
4209
|
emit("click", ev);
|
|
4147
4210
|
}
|
|
4148
4211
|
};
|
|
4212
|
+
const buttonAttrs = vue.computed(() => {
|
|
4213
|
+
const result = {
|
|
4214
|
+
...attrs
|
|
4215
|
+
};
|
|
4216
|
+
if (props.dataTestid) {
|
|
4217
|
+
result["data-testid"] = props.dataTestid;
|
|
4218
|
+
}
|
|
4219
|
+
return result;
|
|
4220
|
+
});
|
|
4149
4221
|
return (_ctx, _cache) => {
|
|
4150
|
-
return vue.openBlock(), vue.createElementBlock("button", vue.mergeProps(
|
|
4222
|
+
return vue.openBlock(), vue.createElementBlock("button", vue.mergeProps(buttonAttrs.value, {
|
|
4151
4223
|
class: buttonClasses.value,
|
|
4152
4224
|
disabled: vue.unref(disabled) || __props.loading || vue.unref(isDownloading),
|
|
4153
4225
|
type: "button",
|
|
@@ -4165,12 +4237,12 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
4165
4237
|
}, null, 8, ["class"])
|
|
4166
4238
|
], 2),
|
|
4167
4239
|
vue.createTextVNode(" " + vue.toDisplayString(__props.text), 1)
|
|
4168
|
-
], 16, _hoisted_1$
|
|
4240
|
+
], 16, _hoisted_1$f);
|
|
4169
4241
|
};
|
|
4170
4242
|
}
|
|
4171
4243
|
});
|
|
4172
|
-
const _hoisted_1$
|
|
4173
|
-
const _hoisted_2$
|
|
4244
|
+
const _hoisted_1$e = ["aria-disabled"];
|
|
4245
|
+
const _hoisted_2$c = { key: 2 };
|
|
4174
4246
|
const elBase$1 = "box-border appearance-none inline-flex items-center justify-center select-none w-full min-h-0 min-w-12 m-0 rounded-lg text-center align-middle whitespace-nowrap no-underline shadow-[0_2px_4px_rgba(12,72,153,0.12)] transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
|
|
4175
4247
|
const variantClasses$1 = "bg-red-600 border border-red-700 text-white hover:bg-red-700 active:bg-red-800 active:border-red-800";
|
|
4176
4248
|
const iconFillClass$1 = "fill-white";
|
|
@@ -4194,7 +4266,8 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
4194
4266
|
target: {},
|
|
4195
4267
|
rel: {},
|
|
4196
4268
|
type: { default: "button" },
|
|
4197
|
-
invert: { type: Boolean }
|
|
4269
|
+
invert: { type: Boolean },
|
|
4270
|
+
dataTestid: { default: void 0 }
|
|
4198
4271
|
},
|
|
4199
4272
|
emits: ["click"],
|
|
4200
4273
|
setup(__props, { emit: __emit }) {
|
|
@@ -4243,6 +4316,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
4243
4316
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.as), vue.mergeProps(componentAttrs.value, {
|
|
4244
4317
|
type: __props.as === "button" ? props.type : void 0,
|
|
4245
4318
|
disabled: __props.as === "button" ? vue.unref(disabled) : void 0,
|
|
4319
|
+
"data-testid": __props.dataTestid,
|
|
4246
4320
|
class: buttonClasses.value,
|
|
4247
4321
|
onClick
|
|
4248
4322
|
}), {
|
|
@@ -4262,16 +4336,16 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
4262
4336
|
size: 24
|
|
4263
4337
|
}, null, 8, ["name"])
|
|
4264
4338
|
], 2)) : vue.createCommentVNode("", true),
|
|
4265
|
-
__props.text ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
4339
|
+
__props.text ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$c, vue.toDisplayString(__props.text), 1)) : vue.createCommentVNode("", true)
|
|
4266
4340
|
]),
|
|
4267
4341
|
_: 1
|
|
4268
|
-
}, 16, ["type", "disabled", "class"]))
|
|
4269
|
-
], 10, _hoisted_1$
|
|
4342
|
+
}, 16, ["type", "disabled", "data-testid", "class"]))
|
|
4343
|
+
], 10, _hoisted_1$e);
|
|
4270
4344
|
};
|
|
4271
4345
|
}
|
|
4272
4346
|
});
|
|
4273
|
-
const _hoisted_1$
|
|
4274
|
-
const _hoisted_2$
|
|
4347
|
+
const _hoisted_1$d = ["aria-disabled"];
|
|
4348
|
+
const _hoisted_2$b = { key: 2 };
|
|
4275
4349
|
const elBase = "box-border appearance-none inline-flex items-center justify-center select-none w-full min-h-0 min-w-12 m-0 rounded-lg text-center align-middle whitespace-nowrap no-underline shadow-[0_2px_4px_rgba(12,72,153,0.12)] transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
|
|
4276
4350
|
const variantClasses = "bg-white border-2 border-blue-500 text-blue-600 hover:border-blue-600 active:bg-blue-600 active:border-blue-600 active:text-white";
|
|
4277
4351
|
const iconFillClass = "fill-blue-500";
|
|
@@ -4295,7 +4369,8 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
4295
4369
|
target: {},
|
|
4296
4370
|
rel: {},
|
|
4297
4371
|
type: { default: "button" },
|
|
4298
|
-
invert: { type: Boolean }
|
|
4372
|
+
invert: { type: Boolean },
|
|
4373
|
+
dataTestid: { default: void 0 }
|
|
4299
4374
|
},
|
|
4300
4375
|
emits: ["click"],
|
|
4301
4376
|
setup(__props, { emit: __emit }) {
|
|
@@ -4344,6 +4419,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
4344
4419
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.as), vue.mergeProps(componentAttrs.value, {
|
|
4345
4420
|
type: __props.as === "button" ? props.type : void 0,
|
|
4346
4421
|
disabled: __props.as === "button" ? vue.unref(disabled) : void 0,
|
|
4422
|
+
"data-testid": __props.dataTestid,
|
|
4347
4423
|
class: buttonClasses.value,
|
|
4348
4424
|
onClick
|
|
4349
4425
|
}), {
|
|
@@ -4363,16 +4439,16 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
4363
4439
|
size: 24
|
|
4364
4440
|
}, null, 8, ["name"])
|
|
4365
4441
|
], 2)) : vue.createCommentVNode("", true),
|
|
4366
|
-
__props.text ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
4442
|
+
__props.text ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$b, vue.toDisplayString(__props.text), 1)) : vue.createCommentVNode("", true)
|
|
4367
4443
|
]),
|
|
4368
4444
|
_: 1
|
|
4369
|
-
}, 16, ["type", "disabled", "class"]))
|
|
4370
|
-
], 10, _hoisted_1$
|
|
4445
|
+
}, 16, ["type", "disabled", "data-testid", "class"]))
|
|
4446
|
+
], 10, _hoisted_1$d);
|
|
4371
4447
|
};
|
|
4372
4448
|
}
|
|
4373
4449
|
});
|
|
4374
|
-
const _hoisted_1$
|
|
4375
|
-
const _hoisted_2$
|
|
4450
|
+
const _hoisted_1$c = { class: "flex justify-between mb-4" };
|
|
4451
|
+
const _hoisted_2$a = { class: "mb-0-last-child" };
|
|
4376
4452
|
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
4377
4453
|
__name: "FdsModal",
|
|
4378
4454
|
props: {
|
|
@@ -4386,6 +4462,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4386
4462
|
lockScroll: { type: Boolean, default: false },
|
|
4387
4463
|
info: { default: void 0 },
|
|
4388
4464
|
locale: { default: "sv" },
|
|
4465
|
+
dataTestid: { default: void 0 },
|
|
4389
4466
|
onClose: {}
|
|
4390
4467
|
},
|
|
4391
4468
|
emits: ["close", "update:open"],
|
|
@@ -4537,6 +4614,13 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4537
4614
|
cleanupFocusTrap();
|
|
4538
4615
|
}
|
|
4539
4616
|
});
|
|
4617
|
+
const modalAttrs = vue.computed(() => {
|
|
4618
|
+
const attrs = {};
|
|
4619
|
+
if (props.dataTestid) {
|
|
4620
|
+
attrs["data-testid"] = props.dataTestid;
|
|
4621
|
+
}
|
|
4622
|
+
return attrs;
|
|
4623
|
+
});
|
|
4540
4624
|
return (_ctx, _cache) => {
|
|
4541
4625
|
return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
4542
4626
|
isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -4545,14 +4629,15 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4545
4629
|
class: vue.normalizeClass(modalOuterClasses.value)
|
|
4546
4630
|
}, [
|
|
4547
4631
|
_cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "fixed top-0 left-0 w-full h-full bg-black/34 z-99" }, null, -1)),
|
|
4548
|
-
vue.createElementVNode("div", {
|
|
4549
|
-
class:
|
|
4632
|
+
vue.createElementVNode("div", vue.mergeProps({
|
|
4633
|
+
class: ["fds-modal-inner", modalInnerClasses.value],
|
|
4550
4634
|
role: "alertdialog",
|
|
4551
|
-
"aria-modal": "true"
|
|
4635
|
+
"aria-modal": "true"
|
|
4636
|
+
}, modalAttrs.value, {
|
|
4552
4637
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
4553
4638
|
}, ["stop"]))
|
|
4554
|
-
}, [
|
|
4555
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
4639
|
+
}), [
|
|
4640
|
+
vue.createElementVNode("div", _hoisted_1$c, [
|
|
4556
4641
|
vue.createElementVNode("h3", {
|
|
4557
4642
|
tabindex: "-1",
|
|
4558
4643
|
class: vue.normalizeClass(headerTitleClasses.value)
|
|
@@ -4572,7 +4657,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4572
4657
|
onClick: _cache[0] || (_cache[0] = ($event) => handleClose("icon"))
|
|
4573
4658
|
}, { "aria-label": closeLabel.value }, { class: "ml-4" }), null, 16)) : vue.createCommentVNode("", true)
|
|
4574
4659
|
]),
|
|
4575
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4660
|
+
vue.createElementVNode("div", _hoisted_2$a, [
|
|
4576
4661
|
vue.renderSlot(_ctx.$slots, "default")
|
|
4577
4662
|
]),
|
|
4578
4663
|
vue.unref(hasFooterSlot) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -4581,7 +4666,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4581
4666
|
}, [
|
|
4582
4667
|
vue.renderSlot(_ctx.$slots, "modal-footer")
|
|
4583
4668
|
], 2)) : vue.createCommentVNode("", true)
|
|
4584
|
-
],
|
|
4669
|
+
], 16)
|
|
4585
4670
|
], 2)) : vue.createCommentVNode("", true)
|
|
4586
4671
|
]);
|
|
4587
4672
|
};
|
|
@@ -7758,9 +7843,9 @@ try {
|
|
|
7758
7843
|
globalThis.IMask = IMask;
|
|
7759
7844
|
} catch {
|
|
7760
7845
|
}
|
|
7761
|
-
const _hoisted_1$
|
|
7762
|
-
const _hoisted_2$
|
|
7763
|
-
const _hoisted_3$7 = ["type", "required", "value", "disabled", "tabindex", "aria-invalid"];
|
|
7846
|
+
const _hoisted_1$b = ["for"];
|
|
7847
|
+
const _hoisted_2$9 = { class: "relative" };
|
|
7848
|
+
const _hoisted_3$7 = ["type", "required", "value", "disabled", "tabindex", "aria-invalid", "aria-label"];
|
|
7764
7849
|
const _hoisted_4$6 = {
|
|
7765
7850
|
key: 0,
|
|
7766
7851
|
class: "text-red-600 font-bold mt-1"
|
|
@@ -7792,6 +7877,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
7792
7877
|
autocomplete: {},
|
|
7793
7878
|
autofocus: { type: Boolean },
|
|
7794
7879
|
readonly: { type: Boolean },
|
|
7880
|
+
ariaLabel: { default: void 0 },
|
|
7795
7881
|
onClearInput: {},
|
|
7796
7882
|
maskOptions: { default: void 0 },
|
|
7797
7883
|
modelModifiers: { default: () => ({}) },
|
|
@@ -7800,6 +7886,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
7800
7886
|
tabindex: {},
|
|
7801
7887
|
id: {},
|
|
7802
7888
|
name: {},
|
|
7889
|
+
dataTestid: { default: void 0 },
|
|
7803
7890
|
onInput: {},
|
|
7804
7891
|
onChange: {},
|
|
7805
7892
|
onFocus: {},
|
|
@@ -7840,7 +7927,8 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
7840
7927
|
return {
|
|
7841
7928
|
...filtered,
|
|
7842
7929
|
id: inputId.value,
|
|
7843
|
-
class: props.class ?? attrs.class
|
|
7930
|
+
class: props.class ?? attrs.class,
|
|
7931
|
+
"data-testid": props.dataTestid ?? void 0
|
|
7844
7932
|
};
|
|
7845
7933
|
});
|
|
7846
7934
|
const clearButtonLabel = vue.computed(() => props.locale === "sv" ? "Rensa input" : "Clear input");
|
|
@@ -7973,7 +8061,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
7973
8061
|
key: 0,
|
|
7974
8062
|
for: inputId.value,
|
|
7975
8063
|
class: ["block font-bold text-gray-900 cursor-pointer", { "mb-0": props.meta, "mb-1": !props.meta }]
|
|
7976
|
-
}, labelAttrs.value), vue.toDisplayString(props.label), 17, _hoisted_1$
|
|
8064
|
+
}, labelAttrs.value), vue.toDisplayString(props.label), 17, _hoisted_1$b)) : vue.createCommentVNode("", true),
|
|
7977
8065
|
props.meta ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
7978
8066
|
key: 1,
|
|
7979
8067
|
class: vue.normalizeClass(["font-thin", { "mb-1": !props.labelLeft }])
|
|
@@ -7982,7 +8070,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
7982
8070
|
vue.createElementVNode("div", {
|
|
7983
8071
|
class: vue.normalizeClass({ "flex-1": props.labelLeft })
|
|
7984
8072
|
}, [
|
|
7985
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
8073
|
+
vue.createElementVNode("div", _hoisted_2$9, [
|
|
7986
8074
|
vue.createElementVNode("input", vue.mergeProps({
|
|
7987
8075
|
ref_key: "inputRef",
|
|
7988
8076
|
ref: inputRef,
|
|
@@ -7993,7 +8081,8 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
7993
8081
|
tabindex: props.disabled ? -1 : void 0,
|
|
7994
8082
|
"aria-invalid": props.valid === false ? "true" : void 0,
|
|
7995
8083
|
class: inputClasses.value,
|
|
7996
|
-
style: inputStyle.value
|
|
8084
|
+
style: inputStyle.value,
|
|
8085
|
+
"aria-label": props.ariaLabel
|
|
7997
8086
|
}, inputAttrs.value, {
|
|
7998
8087
|
onInput: handleInputChange,
|
|
7999
8088
|
onChange: handleInputChange,
|
|
@@ -8034,8 +8123,8 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
8034
8123
|
};
|
|
8035
8124
|
}
|
|
8036
8125
|
});
|
|
8037
|
-
const _hoisted_1$
|
|
8038
|
-
const _hoisted_2$
|
|
8126
|
+
const _hoisted_1$a = ["id"];
|
|
8127
|
+
const _hoisted_2$8 = { class: "flex items-center justify-start gap-1 w-[100px]" };
|
|
8039
8128
|
const _hoisted_3$6 = { class: "flex items-center justify-center w-auto gap-2 order-0 sm:order-0" };
|
|
8040
8129
|
const _hoisted_4$5 = { class: "whitespace-nowrap" };
|
|
8041
8130
|
const _hoisted_5$5 = { class: "flex items-center justify-end gap-1 order-2 sm:order-0 w-[100px]" };
|
|
@@ -8045,6 +8134,8 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
8045
8134
|
current: {},
|
|
8046
8135
|
max: {},
|
|
8047
8136
|
loading: { type: Boolean, default: false },
|
|
8137
|
+
locale: { default: "sv" },
|
|
8138
|
+
dataTestid: { default: void 0 },
|
|
8048
8139
|
onPaginate: {}
|
|
8049
8140
|
},
|
|
8050
8141
|
emits: ["paginate"],
|
|
@@ -8056,7 +8147,19 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
8056
8147
|
const internalValue = vue.ref(props.current);
|
|
8057
8148
|
const autoId = `fds-pagination-${Math.random().toString(36).slice(2, 9)}`;
|
|
8058
8149
|
const inputId = vue.computed(() => id.value ?? autoId);
|
|
8150
|
+
const rootAttrs = vue.computed(() => {
|
|
8151
|
+
const attrs = {};
|
|
8152
|
+
if (props.dataTestid) {
|
|
8153
|
+
attrs["data-testid"] = props.dataTestid;
|
|
8154
|
+
}
|
|
8155
|
+
return attrs;
|
|
8156
|
+
});
|
|
8059
8157
|
const inputValue = vue.computed(() => String(internalValue.value));
|
|
8158
|
+
const nextPageLabel = vue.computed(() => props.locale === "sv" ? "Gå till nästa sida" : "Go to next page");
|
|
8159
|
+
const prevPageLabel = vue.computed(() => props.locale === "sv" ? "Gå till föregående sida" : "Go to previous page");
|
|
8160
|
+
const firstPageLabel = vue.computed(() => props.locale === "sv" ? "Gå till första sidan" : "Go to first page");
|
|
8161
|
+
const lastPageLabel = vue.computed(() => props.locale === "sv" ? "Gå till sista sidan" : "Go to last page");
|
|
8162
|
+
const inputAriaLabel = vue.computed(() => props.locale === "sv" ? "Aktuell sida" : "Current page");
|
|
8060
8163
|
vue.watch(
|
|
8061
8164
|
() => props.current,
|
|
8062
8165
|
(newValue) => {
|
|
@@ -8118,33 +8221,35 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
8118
8221
|
emit("paginate", { target: { id: inputId.value }, detail: page });
|
|
8119
8222
|
};
|
|
8120
8223
|
return (_ctx, _cache) => {
|
|
8121
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
8224
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
8122
8225
|
class: "my-6 flex items-between justify-between gap-2",
|
|
8123
8226
|
id: inputId.value
|
|
8124
|
-
}, [
|
|
8125
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
8227
|
+
}, rootAttrs.value), [
|
|
8228
|
+
vue.createElementVNode("div", _hoisted_2$8, [
|
|
8126
8229
|
__props.loading && loadingIndicator.value === "start" ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
8127
8230
|
key: 0,
|
|
8128
8231
|
size: "32px",
|
|
8129
8232
|
color: "blue"
|
|
8130
8233
|
})) : (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({ key: 1 }, { "aria-disabled": __props.current === 1 }, {
|
|
8234
|
+
"aria-label": firstPageLabel.value,
|
|
8131
8235
|
icon: "first",
|
|
8132
8236
|
size: 28,
|
|
8133
8237
|
disabled: __props.current === 1,
|
|
8134
8238
|
class: [{ "hidden!": __props.current === 1 }, "w-8 h-8 sm:w-12 sm:h-12"],
|
|
8135
8239
|
onClick: _cache[0] || (_cache[0] = ($event) => handlePagination("start"))
|
|
8136
|
-
}), null, 16, ["disabled", "class"])),
|
|
8240
|
+
}), null, 16, ["aria-label", "disabled", "class"])),
|
|
8137
8241
|
__props.loading && loadingIndicator.value === "prev" ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
8138
8242
|
key: 2,
|
|
8139
8243
|
size: "24px",
|
|
8140
8244
|
color: "blue"
|
|
8141
8245
|
})) : (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({ key: 3 }, { "aria-disabled": __props.current === 1 }, {
|
|
8246
|
+
"aria-label": prevPageLabel.value,
|
|
8142
8247
|
icon: "arrowLeft",
|
|
8143
8248
|
size: 28,
|
|
8144
8249
|
disabled: __props.current === 1,
|
|
8145
8250
|
class: [{ "hidden!": __props.current === 1 }, "w-8 h-8 sm:w-12 sm:h-12"],
|
|
8146
8251
|
onClick: _cache[1] || (_cache[1] = ($event) => handlePagination("prev"))
|
|
8147
|
-
}), null, 16, ["disabled", "class"]))
|
|
8252
|
+
}), null, 16, ["aria-label", "disabled", "class"]))
|
|
8148
8253
|
]),
|
|
8149
8254
|
vue.createElementVNode("div", _hoisted_3$6, [
|
|
8150
8255
|
__props.loading && loadingIndicator.value === "input" ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
@@ -8160,9 +8265,10 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
8160
8265
|
type: "text",
|
|
8161
8266
|
size: __props.max.toString().length,
|
|
8162
8267
|
maxlength: __props.max.toString().length,
|
|
8268
|
+
ariaLabel: inputAriaLabel.value,
|
|
8163
8269
|
onInput: vue.unref(handlePageChange),
|
|
8164
8270
|
class: "mb-0!"
|
|
8165
|
-
}, null, 8, ["value", "size", "maxlength", "onInput"]),
|
|
8271
|
+
}, null, 8, ["value", "size", "maxlength", "ariaLabel", "onInput"]),
|
|
8166
8272
|
vue.createElementVNode("div", _hoisted_4$5, "/ " + vue.toDisplayString(__props.max), 1)
|
|
8167
8273
|
], 64))
|
|
8168
8274
|
]),
|
|
@@ -8173,28 +8279,30 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
8173
8279
|
color: "blue"
|
|
8174
8280
|
})) : (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
|
|
8175
8281
|
key: 1,
|
|
8282
|
+
"aria-label": nextPageLabel.value,
|
|
8176
8283
|
icon: "arrowRight",
|
|
8177
8284
|
size: 28,
|
|
8178
8285
|
disabled: __props.current === __props.max
|
|
8179
8286
|
}, { "aria-disabled": __props.current === __props.max }, {
|
|
8180
8287
|
class: [{ "hidden!": __props.current === __props.max }, "w-8 h-8 sm:w-12 sm:h-12"],
|
|
8181
8288
|
onClick: _cache[2] || (_cache[2] = ($event) => handlePagination("next"))
|
|
8182
|
-
}), null, 16, ["disabled", "class"])),
|
|
8289
|
+
}), null, 16, ["aria-label", "disabled", "class"])),
|
|
8183
8290
|
__props.loading && loadingIndicator.value === "end" ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
8184
8291
|
key: 2,
|
|
8185
8292
|
size: "24px",
|
|
8186
8293
|
color: "blue"
|
|
8187
8294
|
})) : (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
|
|
8188
8295
|
key: 3,
|
|
8296
|
+
"aria-label": lastPageLabel.value,
|
|
8189
8297
|
icon: "last",
|
|
8190
8298
|
size: 28,
|
|
8191
8299
|
disabled: __props.current === __props.max
|
|
8192
8300
|
}, { "aria-disabled": __props.current === __props.max }, {
|
|
8193
8301
|
class: [{ "hidden!": __props.current === __props.max }, "w-8 h-8 sm:w-12 sm:h-12"],
|
|
8194
8302
|
onClick: _cache[3] || (_cache[3] = ($event) => handlePagination("end"))
|
|
8195
|
-
}), null, 16, ["disabled", "class"]))
|
|
8303
|
+
}), null, 16, ["aria-label", "disabled", "class"]))
|
|
8196
8304
|
])
|
|
8197
|
-
],
|
|
8305
|
+
], 16, _hoisted_1$a);
|
|
8198
8306
|
};
|
|
8199
8307
|
}
|
|
8200
8308
|
});
|
|
@@ -8237,15 +8345,15 @@ function useIsPid(value) {
|
|
|
8237
8345
|
isPid
|
|
8238
8346
|
};
|
|
8239
8347
|
}
|
|
8240
|
-
const _hoisted_1$
|
|
8241
|
-
const _hoisted_2$
|
|
8348
|
+
const _hoisted_1$9 = { class: "relative block" };
|
|
8349
|
+
const _hoisted_2$7 = {
|
|
8242
8350
|
key: 0,
|
|
8243
8351
|
class: "relative"
|
|
8244
8352
|
};
|
|
8245
8353
|
const _hoisted_3$5 = { class: "relative" };
|
|
8246
8354
|
const _hoisted_4$4 = { key: 1 };
|
|
8247
8355
|
const _hoisted_5$4 = { class: "font-bold mb-2 tracking-wide" };
|
|
8248
|
-
const _hoisted_6$
|
|
8356
|
+
const _hoisted_6$2 = {
|
|
8249
8357
|
key: 0,
|
|
8250
8358
|
class: "flex justify-center p-4"
|
|
8251
8359
|
};
|
|
@@ -8291,12 +8399,15 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
8291
8399
|
maxListHeight: { default: void 0 },
|
|
8292
8400
|
locale: { default: "sv" },
|
|
8293
8401
|
clearTrigger: { type: Boolean, default: false },
|
|
8402
|
+
dataTestid: { default: void 0 },
|
|
8294
8403
|
onChange: {},
|
|
8404
|
+
onClearInput: {},
|
|
8295
8405
|
onSearchSelected: {},
|
|
8296
8406
|
onPaginate: {},
|
|
8297
|
-
onTotal: {}
|
|
8407
|
+
onTotal: {},
|
|
8408
|
+
onInput: {}
|
|
8298
8409
|
},
|
|
8299
|
-
emits: ["searchSelected", "paginate", "total", "change"],
|
|
8410
|
+
emits: ["searchSelected", "paginate", "total", "change", "input", "clearInput"],
|
|
8300
8411
|
setup(__props, { emit: __emit }) {
|
|
8301
8412
|
const props = __props;
|
|
8302
8413
|
const searchFields = vue.computed(() => props.searchFields ?? []);
|
|
@@ -8389,7 +8500,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
8389
8500
|
selectedItem.value = null;
|
|
8390
8501
|
valid.value = null;
|
|
8391
8502
|
emit("searchSelected", null);
|
|
8392
|
-
|
|
8503
|
+
emit("clearInput", new Event("clearInput"));
|
|
8393
8504
|
filterAndPaginate();
|
|
8394
8505
|
};
|
|
8395
8506
|
vue.watch(
|
|
@@ -8424,6 +8535,9 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
8424
8535
|
const formattedValue = formatPidWithDash(value);
|
|
8425
8536
|
emit("change", formattedValue);
|
|
8426
8537
|
}, 500);
|
|
8538
|
+
const debouncedEmitInput = debounce((ev) => {
|
|
8539
|
+
emit("input", ev);
|
|
8540
|
+
}, 500);
|
|
8427
8541
|
vue.watch(
|
|
8428
8542
|
() => searchTerm.value,
|
|
8429
8543
|
(newValue) => {
|
|
@@ -8470,6 +8584,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
8470
8584
|
focusedIndex.value = -1;
|
|
8471
8585
|
valid.value = null;
|
|
8472
8586
|
filterAndPaginate();
|
|
8587
|
+
debouncedEmitInput(e);
|
|
8473
8588
|
};
|
|
8474
8589
|
const { isPid } = useIsPid(searchTerm);
|
|
8475
8590
|
const { boldQuery } = useBoldQuery(searchTerm);
|
|
@@ -8639,14 +8754,21 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
8639
8754
|
input.removeEventListener("focus", handleInputFocus);
|
|
8640
8755
|
}
|
|
8641
8756
|
});
|
|
8757
|
+
const rootAttrs = vue.computed(() => {
|
|
8758
|
+
const attrs = {};
|
|
8759
|
+
if (props.dataTestid) {
|
|
8760
|
+
attrs["data-testid"] = props.dataTestid;
|
|
8761
|
+
}
|
|
8762
|
+
return attrs;
|
|
8763
|
+
});
|
|
8642
8764
|
return (_ctx, _cache) => {
|
|
8643
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
8765
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
8644
8766
|
ref_key: "componentRef",
|
|
8645
8767
|
ref: componentRef,
|
|
8646
8768
|
class: "fds-search-select block mb-6"
|
|
8647
|
-
}, [
|
|
8648
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
8649
|
-
!singleItemName.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
8769
|
+
}, rootAttrs.value), [
|
|
8770
|
+
vue.createElementVNode("div", _hoisted_1$9, [
|
|
8771
|
+
!singleItemName.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
|
|
8650
8772
|
vue.createElementVNode("div", _hoisted_3$5, [
|
|
8651
8773
|
vue.createVNode(_sfc_main$h, {
|
|
8652
8774
|
label: __props.label,
|
|
@@ -8685,7 +8807,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
8685
8807
|
"aria-expanded": "false",
|
|
8686
8808
|
"aria-controls": "select-dropdown"
|
|
8687
8809
|
}, [
|
|
8688
|
-
__props.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$
|
|
8810
|
+
__props.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
|
|
8689
8811
|
vue.createVNode(_sfc_main$o, {
|
|
8690
8812
|
color: "blue",
|
|
8691
8813
|
size: "48px"
|
|
@@ -8742,7 +8864,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
8742
8864
|
])) : vue.createCommentVNode("", true)
|
|
8743
8865
|
], 6)) : vue.createCommentVNode("", true)
|
|
8744
8866
|
])
|
|
8745
|
-
],
|
|
8867
|
+
], 16);
|
|
8746
8868
|
};
|
|
8747
8869
|
}
|
|
8748
8870
|
});
|
|
@@ -9149,8 +9271,8 @@ const useTreeState = (options = {}) => {
|
|
|
9149
9271
|
isEmptySearchResult
|
|
9150
9272
|
};
|
|
9151
9273
|
};
|
|
9152
|
-
const _hoisted_1$
|
|
9153
|
-
const _hoisted_2$
|
|
9274
|
+
const _hoisted_1$8 = ["for"];
|
|
9275
|
+
const _hoisted_2$6 = ["value", "disabled", "required"];
|
|
9154
9276
|
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
9155
9277
|
...{
|
|
9156
9278
|
inheritAttrs: false
|
|
@@ -9170,6 +9292,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9170
9292
|
autofocus: { type: Boolean },
|
|
9171
9293
|
id: {},
|
|
9172
9294
|
name: {},
|
|
9295
|
+
dataTestid: { default: void 0 },
|
|
9173
9296
|
onInput: {},
|
|
9174
9297
|
onChange: {},
|
|
9175
9298
|
onFocus: {},
|
|
@@ -9212,7 +9335,8 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9212
9335
|
return {
|
|
9213
9336
|
...filtered,
|
|
9214
9337
|
id: inputId.value,
|
|
9215
|
-
class: props.class ?? attrs.class
|
|
9338
|
+
class: props.class ?? attrs.class,
|
|
9339
|
+
"data-testid": props.dataTestid ?? void 0
|
|
9216
9340
|
};
|
|
9217
9341
|
});
|
|
9218
9342
|
const hasLabelSlot = useHasSlot();
|
|
@@ -9306,7 +9430,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9306
9430
|
required: props.required,
|
|
9307
9431
|
type: "checkbox",
|
|
9308
9432
|
class: [checkboxClasses.value]
|
|
9309
|
-
}, inputAttrs.value), null, 16, _hoisted_2$
|
|
9433
|
+
}, inputAttrs.value), null, 16, _hoisted_2$6), [
|
|
9310
9434
|
[vue.vModelCheckbox, internalChecked.value]
|
|
9311
9435
|
]),
|
|
9312
9436
|
vue.unref(hasLabelSlot) || props.label ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
@@ -9317,13 +9441,13 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
9317
9441
|
vue.createTextVNode(vue.toDisplayString(props.label), 1)
|
|
9318
9442
|
], 64)) : vue.createCommentVNode("", true)
|
|
9319
9443
|
], 2)) : vue.createCommentVNode("", true)
|
|
9320
|
-
], 16, _hoisted_1$
|
|
9444
|
+
], 16, _hoisted_1$8)
|
|
9321
9445
|
], 2);
|
|
9322
9446
|
};
|
|
9323
9447
|
}
|
|
9324
9448
|
});
|
|
9325
|
-
const _hoisted_1$
|
|
9326
|
-
const _hoisted_2$
|
|
9449
|
+
const _hoisted_1$7 = ["for"];
|
|
9450
|
+
const _hoisted_2$5 = ["value", "checked", "disabled", "required"];
|
|
9327
9451
|
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
9328
9452
|
...{
|
|
9329
9453
|
inheritAttrs: false
|
|
@@ -9338,6 +9462,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
9338
9462
|
value: { type: [String, Number, Boolean, null], default: void 0 },
|
|
9339
9463
|
name: { default: void 0 },
|
|
9340
9464
|
id: { default: void 0 },
|
|
9465
|
+
dataTestid: { default: void 0 },
|
|
9341
9466
|
class: { default: void 0 },
|
|
9342
9467
|
style: {},
|
|
9343
9468
|
tabindex: {},
|
|
@@ -9382,7 +9507,8 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
9382
9507
|
...filtered,
|
|
9383
9508
|
id: inputId.value,
|
|
9384
9509
|
name: props.name ?? attrs.name,
|
|
9385
|
-
class: props.class ?? attrs.class
|
|
9510
|
+
class: props.class ?? attrs.class,
|
|
9511
|
+
"data-testid": props.dataTestid ?? void 0
|
|
9386
9512
|
};
|
|
9387
9513
|
});
|
|
9388
9514
|
const hasLabelSlot = useHasSlot();
|
|
@@ -9441,7 +9567,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
9441
9567
|
required: props.required,
|
|
9442
9568
|
type: "radio",
|
|
9443
9569
|
class: [inputClasses.value, "m-[2px]"]
|
|
9444
|
-
}), null, 16, _hoisted_2$
|
|
9570
|
+
}), null, 16, _hoisted_2$5),
|
|
9445
9571
|
vue.unref(hasLabelSlot) || props.label ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
9446
9572
|
key: 0,
|
|
9447
9573
|
class: vue.normalizeClass(["relative inline-block leading-6 pl-1 select-none", { "cursor-not-allowed": props.disabled }])
|
|
@@ -9450,17 +9576,17 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
9450
9576
|
vue.createTextVNode(vue.toDisplayString(props.label), 1)
|
|
9451
9577
|
], 64)) : vue.createCommentVNode("", true)
|
|
9452
9578
|
], 2)) : vue.createCommentVNode("", true)
|
|
9453
|
-
], 16, _hoisted_1$
|
|
9579
|
+
], 16, _hoisted_1$7)
|
|
9454
9580
|
], 2);
|
|
9455
9581
|
};
|
|
9456
9582
|
}
|
|
9457
9583
|
});
|
|
9458
|
-
const _hoisted_1$
|
|
9459
|
-
const _hoisted_2$
|
|
9584
|
+
const _hoisted_1$6 = { class: "flex items-start" };
|
|
9585
|
+
const _hoisted_2$4 = { class: "flex-1 flex" };
|
|
9460
9586
|
const _hoisted_3$4 = ["innerHTML"];
|
|
9461
9587
|
const _hoisted_4$3 = { key: 1 };
|
|
9462
9588
|
const _hoisted_5$3 = { key: 0 };
|
|
9463
|
-
const _hoisted_6$
|
|
9589
|
+
const _hoisted_6$1 = {
|
|
9464
9590
|
key: 2,
|
|
9465
9591
|
class: "items-center max-h-[28px]"
|
|
9466
9592
|
};
|
|
@@ -9505,7 +9631,8 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
9505
9631
|
searchCountTemplateUnfiltered: {},
|
|
9506
9632
|
titleTemplate: {},
|
|
9507
9633
|
onGetSearchContainerHeight: {},
|
|
9508
|
-
selectedNodes: {}
|
|
9634
|
+
selectedNodes: {},
|
|
9635
|
+
dataTestid: {}
|
|
9509
9636
|
},
|
|
9510
9637
|
setup(__props) {
|
|
9511
9638
|
const props = __props;
|
|
@@ -9670,7 +9797,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
9670
9797
|
style: vue.normalizeStyle(indent.value),
|
|
9671
9798
|
class: vue.normalizeClass("pt-2 pb-2")
|
|
9672
9799
|
}, [
|
|
9673
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
9800
|
+
vue.createElementVNode("div", _hoisted_1$6, [
|
|
9674
9801
|
hasChildrenNodes.value ? (vue.openBlock(), vue.createBlock(_sfc_main$v, vue.mergeProps({
|
|
9675
9802
|
key: 0,
|
|
9676
9803
|
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(treeState)?.toggleExpandNode(props.nodeId))
|
|
@@ -9683,7 +9810,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
9683
9810
|
key: 1,
|
|
9684
9811
|
style: vue.normalizeStyle({ minWidth: `${__props.indentation}px` })
|
|
9685
9812
|
}, null, 4)) : vue.createCommentVNode("", true),
|
|
9686
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
9813
|
+
vue.createElementVNode("div", _hoisted_2$4, [
|
|
9687
9814
|
vue.createVNode(_sfc_main$e, {
|
|
9688
9815
|
id: `checkbox-${props.nodeId}`,
|
|
9689
9816
|
checked: vue.unref(treeState)?.isNodeSelected(props.nodeId),
|
|
@@ -9702,7 +9829,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
9702
9829
|
_: 1
|
|
9703
9830
|
}, 8, ["id", "checked", "indeterminate"])
|
|
9704
9831
|
]),
|
|
9705
|
-
vue.unref(treeState)?.isParentOrChildrenSelected(props.nodeId) && !(vue.unref(treeState)?.isNodeIndeterminateById(props.nodeId) ?? false) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$
|
|
9832
|
+
vue.unref(treeState)?.isParentOrChildrenSelected(props.nodeId) && !(vue.unref(treeState)?.isNodeIndeterminateById(props.nodeId) ?? false) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, [
|
|
9706
9833
|
vue.createVNode(_sfc_main$v, vue.mergeProps({
|
|
9707
9834
|
ref_key: "triggerRef",
|
|
9708
9835
|
ref: triggerRef,
|
|
@@ -9828,7 +9955,8 @@ function useElementFinalSize(elementRef, onFinalSize, delay = 100) {
|
|
|
9828
9955
|
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
9829
9956
|
__name: "FdsText",
|
|
9830
9957
|
props: {
|
|
9831
|
-
type: { default: "default" }
|
|
9958
|
+
type: { default: "default" },
|
|
9959
|
+
dataTestid: { default: void 0 }
|
|
9832
9960
|
},
|
|
9833
9961
|
setup(__props) {
|
|
9834
9962
|
const props = __props;
|
|
@@ -9842,17 +9970,22 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
9842
9970
|
}
|
|
9843
9971
|
return baseClasses;
|
|
9844
9972
|
});
|
|
9973
|
+
const rootAttrs = vue.computed(() => {
|
|
9974
|
+
const attrs = {};
|
|
9975
|
+
if (props.dataTestid) {
|
|
9976
|
+
attrs["data-testid"] = props.dataTestid;
|
|
9977
|
+
}
|
|
9978
|
+
return attrs;
|
|
9979
|
+
});
|
|
9845
9980
|
return (_ctx, _cache) => {
|
|
9846
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
9847
|
-
class: vue.normalizeClass(textClasses.value)
|
|
9848
|
-
}, [
|
|
9981
|
+
return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps({ class: textClasses.value }, rootAttrs.value), [
|
|
9849
9982
|
vue.renderSlot(_ctx.$slots, "default")
|
|
9850
|
-
],
|
|
9983
|
+
], 16);
|
|
9851
9984
|
};
|
|
9852
9985
|
}
|
|
9853
9986
|
});
|
|
9854
|
-
const _hoisted_1$
|
|
9855
|
-
const _hoisted_2$
|
|
9987
|
+
const _hoisted_1$5 = { key: 0 };
|
|
9988
|
+
const _hoisted_2$3 = {
|
|
9856
9989
|
key: 0,
|
|
9857
9990
|
class: "text-xl"
|
|
9858
9991
|
};
|
|
@@ -9889,6 +10022,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
9889
10022
|
titleTemplate: { default: "[[title]]" },
|
|
9890
10023
|
onGetSearchContainerHeight: {},
|
|
9891
10024
|
selectedNodes: {},
|
|
10025
|
+
dataTestid: { default: void 0 },
|
|
9892
10026
|
data: {}
|
|
9893
10027
|
},
|
|
9894
10028
|
emits: ["update:selectedNodes", "getSearchContainerHeight"],
|
|
@@ -9931,8 +10065,15 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
9931
10065
|
{ deep: true }
|
|
9932
10066
|
);
|
|
9933
10067
|
const totalNodeCount = vue.computed(() => 1 + (treeState?.totalNodeCount.value ?? 0));
|
|
10068
|
+
const rootAttrs = vue.computed(() => {
|
|
10069
|
+
const attrs = {};
|
|
10070
|
+
if (props.dataTestid) {
|
|
10071
|
+
attrs["data-testid"] = props.dataTestid;
|
|
10072
|
+
}
|
|
10073
|
+
return attrs;
|
|
10074
|
+
});
|
|
9934
10075
|
return (_ctx, _cache) => {
|
|
9935
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
10076
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.guardReactiveProps(rootAttrs.value)), [
|
|
9936
10077
|
props.searchEnabled ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
9937
10078
|
key: 0,
|
|
9938
10079
|
ref_key: "searchContainerRef",
|
|
@@ -9952,8 +10093,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
9952
10093
|
])]),
|
|
9953
10094
|
_: 1
|
|
9954
10095
|
}, 8, ["value", "label"]),
|
|
9955
|
-
props.searchCountTemplate || props.searchCountTemplateUnfiltered ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
9956
|
-
props.searchCountTemplate && vue.unref(treeState)?.searchTerm?.value && String(vue.unref(treeState)?.searchTerm?.value || "").trim().length >= (vue.unref(treeState)?.triggerLength ?? 1) ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_2$
|
|
10096
|
+
props.searchCountTemplate || props.searchCountTemplateUnfiltered ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
|
|
10097
|
+
props.searchCountTemplate && vue.unref(treeState)?.searchTerm?.value && String(vue.unref(treeState)?.searchTerm?.value || "").trim().length >= (vue.unref(treeState)?.triggerLength ?? 1) ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_2$3, vue.toDisplayString(props.searchCountTemplate.replace("[[filteredNodes]]", vue.unref(treeState)?.filteredMatchCount.value.toString()).replace("[[totalNodes]]", totalNodeCount.value.toString())), 1)) : (vue.openBlock(), vue.createElementBlock("h2", _hoisted_3$3, vue.toDisplayString(props.searchCountTemplateUnfiltered?.replace("[[totalNodes]]", totalNodeCount.value.toString()).replace("[[totalNodes]]", totalNodeCount.value.toString())), 1))
|
|
9957
10098
|
])) : vue.createCommentVNode("", true)
|
|
9958
10099
|
], 512)) : vue.createCommentVNode("", true),
|
|
9959
10100
|
vue.unref(treeState)?.isEmptySearchResult?.value ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
@@ -10003,18 +10144,18 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
10003
10144
|
popoverLabels: props.popoverLabels
|
|
10004
10145
|
}, null, 8, ["nodes", "title", "nodeId", "data", "indentation", "showNodeDescription", "showChildrenCount", "expandChildrenOnSelect", "showIndeterminate", "expandChildrenOnParentCheck", "expandAllChildrenOnParentCheck", "showIndeterminateOnlyOnChildrenSelection", "searchEnabled", "searchLabel", "searchExpandNodes", "searchMatchParams", "horizontalScroll", "nodeExpandIcon", "nodeCollapseIcon", "searchHighlighting", "titleTemplate", "popoverLabels"])) : vue.createCommentVNode("", true)
|
|
10005
10146
|
], 2)
|
|
10006
|
-
]);
|
|
10147
|
+
], 16);
|
|
10007
10148
|
};
|
|
10008
10149
|
}
|
|
10009
10150
|
});
|
|
10010
|
-
const _hoisted_1$5 = { class: "block mb-4" };
|
|
10011
10151
|
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
10012
10152
|
__name: "FdsTruncatedText",
|
|
10013
10153
|
props: {
|
|
10014
10154
|
open: { type: Boolean, default: false },
|
|
10015
10155
|
content: {},
|
|
10016
10156
|
btnExpand: { default: "Visa mer" },
|
|
10017
|
-
btnCollapse: { default: "Visa mindre" }
|
|
10157
|
+
btnCollapse: { default: "Visa mindre" },
|
|
10158
|
+
dataTestid: { default: void 0 }
|
|
10018
10159
|
},
|
|
10019
10160
|
emits: ["toggleHandler"],
|
|
10020
10161
|
setup(__props, { emit: __emit }) {
|
|
@@ -10059,8 +10200,15 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10059
10200
|
}
|
|
10060
10201
|
}
|
|
10061
10202
|
});
|
|
10203
|
+
const rootAttrs = vue.computed(() => {
|
|
10204
|
+
const attrs = {};
|
|
10205
|
+
if (props.dataTestid) {
|
|
10206
|
+
attrs["data-testid"] = props.dataTestid;
|
|
10207
|
+
}
|
|
10208
|
+
return attrs;
|
|
10209
|
+
});
|
|
10062
10210
|
return (_ctx, _cache) => {
|
|
10063
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
10211
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "block mb-4" }, rootAttrs.value), [
|
|
10064
10212
|
vue.unref(hasSlotContent) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
10065
10213
|
key: 0,
|
|
10066
10214
|
ref_key: "slotContentRef",
|
|
@@ -10083,12 +10231,12 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10083
10231
|
text: isOpen.value ? __props.btnCollapse : __props.btnExpand,
|
|
10084
10232
|
onClick: toggleComponent
|
|
10085
10233
|
}, null, 8, ["icon", "text"])) : vue.createCommentVNode("", true)
|
|
10086
|
-
]);
|
|
10234
|
+
], 16);
|
|
10087
10235
|
};
|
|
10088
10236
|
}
|
|
10089
10237
|
});
|
|
10090
10238
|
const _hoisted_1$4 = ["for"];
|
|
10091
|
-
const _hoisted_2$
|
|
10239
|
+
const _hoisted_2$2 = {
|
|
10092
10240
|
key: 1,
|
|
10093
10241
|
class: "font-thin mb-1"
|
|
10094
10242
|
};
|
|
@@ -10099,7 +10247,7 @@ const _hoisted_4$2 = {
|
|
|
10099
10247
|
disabled: ""
|
|
10100
10248
|
};
|
|
10101
10249
|
const _hoisted_5$2 = ["value", "disabled"];
|
|
10102
|
-
const _hoisted_6
|
|
10250
|
+
const _hoisted_6 = { class: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none" };
|
|
10103
10251
|
const _hoisted_7 = {
|
|
10104
10252
|
key: 2,
|
|
10105
10253
|
class: "text-red-600 font-bold mt-1"
|
|
@@ -10117,6 +10265,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10117
10265
|
invalidMessage: { default: void 0 },
|
|
10118
10266
|
options: { default: void 0 },
|
|
10119
10267
|
modelValue: {},
|
|
10268
|
+
dataTestid: { default: void 0 },
|
|
10120
10269
|
value: { default: void 0 }
|
|
10121
10270
|
}, {
|
|
10122
10271
|
"modelValue": { default: void 0, required: false },
|
|
@@ -10151,7 +10300,8 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10151
10300
|
...filtered,
|
|
10152
10301
|
id: selectId.value,
|
|
10153
10302
|
disabled: disabled.value,
|
|
10154
|
-
"aria-invalid": props.valid === false ? "true" : void 0
|
|
10303
|
+
"aria-invalid": props.valid === false ? "true" : void 0,
|
|
10304
|
+
"data-testid": props.dataTestid ?? void 0
|
|
10155
10305
|
};
|
|
10156
10306
|
});
|
|
10157
10307
|
const slots = vue.useSlots();
|
|
@@ -10190,7 +10340,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10190
10340
|
for: selectId.value,
|
|
10191
10341
|
class: ["block font-bold text-gray-900 cursor-pointer", { "mb-0": __props.meta, "mb-1": !__props.meta }]
|
|
10192
10342
|
}, labelAttrs.value), vue.toDisplayString(__props.label), 17, _hoisted_1$4)) : vue.createCommentVNode("", true),
|
|
10193
|
-
__props.meta ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
10343
|
+
__props.meta ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, vue.toDisplayString(__props.meta), 1)) : vue.createCommentVNode("", true),
|
|
10194
10344
|
vue.createElementVNode("div", _hoisted_3$2, [
|
|
10195
10345
|
vue.withDirectives(vue.createElementVNode("select", vue.mergeProps({
|
|
10196
10346
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => internalValue.value = $event),
|
|
@@ -10210,7 +10360,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10210
10360
|
], 16), [
|
|
10211
10361
|
[vue.vModelSelect, internalValue.value]
|
|
10212
10362
|
]),
|
|
10213
|
-
vue.createElementVNode("div", _hoisted_6
|
|
10363
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
10214
10364
|
vue.createVNode(_sfc_main$w, {
|
|
10215
10365
|
name: "arrowDown",
|
|
10216
10366
|
size: 24,
|
|
@@ -10228,7 +10378,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10228
10378
|
}
|
|
10229
10379
|
});
|
|
10230
10380
|
const _hoisted_1$3 = ["for"];
|
|
10231
|
-
const _hoisted_2$
|
|
10381
|
+
const _hoisted_2$1 = {
|
|
10232
10382
|
key: 1,
|
|
10233
10383
|
class: "font-thin mb-1"
|
|
10234
10384
|
};
|
|
@@ -10251,6 +10401,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10251
10401
|
invalidMessage: {},
|
|
10252
10402
|
modelValue: {},
|
|
10253
10403
|
modelModifiers: { default: () => ({}) },
|
|
10404
|
+
dataTestid: { default: void 0 },
|
|
10254
10405
|
value: { default: void 0 }
|
|
10255
10406
|
}, {
|
|
10256
10407
|
"modelValue": { default: void 0, required: false },
|
|
@@ -10286,7 +10437,8 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10286
10437
|
...filtered,
|
|
10287
10438
|
id: textareaId.value,
|
|
10288
10439
|
rows: rows.value ?? 4,
|
|
10289
|
-
"aria-invalid": props.valid === false ? true : void 0
|
|
10440
|
+
"aria-invalid": props.valid === false ? true : void 0,
|
|
10441
|
+
"data-testid": props.dataTestid ?? void 0
|
|
10290
10442
|
};
|
|
10291
10443
|
});
|
|
10292
10444
|
const isLazy = vue.computed(() => props.modelModifiers?.lazy === true);
|
|
@@ -10331,7 +10483,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10331
10483
|
for: textareaId.value,
|
|
10332
10484
|
class: ["block font-bold text-gray-900 cursor-pointer", { "mb-0": __props.meta, "mb-1": !__props.meta }]
|
|
10333
10485
|
}, labelAttrs.value), vue.toDisplayString(__props.label), 17, _hoisted_1$3)) : vue.createCommentVNode("", true),
|
|
10334
|
-
__props.meta ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
10486
|
+
__props.meta ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, vue.toDisplayString(__props.meta), 1)) : vue.createCommentVNode("", true),
|
|
10335
10487
|
vue.createElementVNode("div", _hoisted_3$1, [
|
|
10336
10488
|
vue.createElementVNode("textarea", vue.mergeProps({
|
|
10337
10489
|
value: internalValue.value,
|
|
@@ -10364,7 +10516,8 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10364
10516
|
__name: "FdsTable",
|
|
10365
10517
|
props: {
|
|
10366
10518
|
bordered: { type: Boolean, default: false },
|
|
10367
|
-
compact: { type: Boolean, default: false }
|
|
10519
|
+
compact: { type: Boolean, default: false },
|
|
10520
|
+
dataTestid: { default: void 0 }
|
|
10368
10521
|
},
|
|
10369
10522
|
setup(__props) {
|
|
10370
10523
|
const props = __props;
|
|
@@ -10373,27 +10526,32 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10373
10526
|
props.bordered && "fds-table-wrapper--bordered",
|
|
10374
10527
|
props.compact && "fds-table-wrapper--compact"
|
|
10375
10528
|
]);
|
|
10529
|
+
const rootAttrs = vue.computed(() => {
|
|
10530
|
+
const attrs = {};
|
|
10531
|
+
if (props.dataTestid) {
|
|
10532
|
+
attrs["data-testid"] = props.dataTestid;
|
|
10533
|
+
}
|
|
10534
|
+
return attrs;
|
|
10535
|
+
});
|
|
10376
10536
|
return (_ctx, _cache) => {
|
|
10377
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
10378
|
-
class: vue.normalizeClass(wrapperClasses.value)
|
|
10379
|
-
}, [
|
|
10537
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: wrapperClasses.value }, rootAttrs.value), [
|
|
10380
10538
|
vue.renderSlot(_ctx.$slots, "default")
|
|
10381
|
-
],
|
|
10539
|
+
], 16);
|
|
10382
10540
|
};
|
|
10383
10541
|
}
|
|
10384
10542
|
});
|
|
10385
|
-
const _hoisted_1$2 =
|
|
10386
|
-
const _hoisted_2
|
|
10387
|
-
const _hoisted_3 = { key:
|
|
10388
|
-
const _hoisted_4 = { key:
|
|
10389
|
-
const _hoisted_5 = { key:
|
|
10390
|
-
const _hoisted_6 = { key: 1 };
|
|
10543
|
+
const _hoisted_1$2 = ["onKeydown"];
|
|
10544
|
+
const _hoisted_2 = { key: 0 };
|
|
10545
|
+
const _hoisted_3 = { key: 1 };
|
|
10546
|
+
const _hoisted_4 = { key: 0 };
|
|
10547
|
+
const _hoisted_5 = { key: 1 };
|
|
10391
10548
|
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
10392
10549
|
__name: "FdsTableHead",
|
|
10393
10550
|
props: {
|
|
10394
10551
|
heading: { default: void 0 },
|
|
10395
10552
|
align: { default: "left" },
|
|
10396
|
-
icon: { default: void 0 }
|
|
10553
|
+
icon: { default: void 0 },
|
|
10554
|
+
dataTestid: { default: void 0 }
|
|
10397
10555
|
},
|
|
10398
10556
|
emits: ["sort"],
|
|
10399
10557
|
setup(__props, { emit: __emit }) {
|
|
@@ -10410,8 +10568,15 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10410
10568
|
const handleSort = (ev) => {
|
|
10411
10569
|
emit("sort", ev);
|
|
10412
10570
|
};
|
|
10571
|
+
const rootAttrs = vue.computed(() => {
|
|
10572
|
+
const attrs = {};
|
|
10573
|
+
if (props.dataTestid) {
|
|
10574
|
+
attrs["data-testid"] = props.dataTestid;
|
|
10575
|
+
}
|
|
10576
|
+
return attrs;
|
|
10577
|
+
});
|
|
10413
10578
|
return (_ctx, _cache) => {
|
|
10414
|
-
return vue.openBlock(), vue.createElementBlock("th",
|
|
10579
|
+
return vue.openBlock(), vue.createElementBlock("th", vue.mergeProps({ class: "fds-table-head" }, rootAttrs.value), [
|
|
10415
10580
|
iconName.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
10416
10581
|
key: 0,
|
|
10417
10582
|
class: vue.normalizeClass(headerClasses.value),
|
|
@@ -10421,23 +10586,23 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10421
10586
|
vue.withKeys(vue.withModifiers(handleSort, ["prevent"]), ["space"])
|
|
10422
10587
|
]
|
|
10423
10588
|
}, [
|
|
10424
|
-
vue.unref(hasSlot) ? (vue.openBlock(), vue.createElementBlock("span",
|
|
10589
|
+
vue.unref(hasSlot) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, [
|
|
10425
10590
|
vue.renderSlot(_ctx.$slots, "default")
|
|
10426
|
-
])) : (vue.openBlock(), vue.createElementBlock("span",
|
|
10591
|
+
])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, vue.toDisplayString(__props.heading), 1)),
|
|
10427
10592
|
vue.createVNode(_sfc_main$w, {
|
|
10428
10593
|
name: iconName.value,
|
|
10429
10594
|
size: "24px",
|
|
10430
10595
|
class: "fill-blue-500"
|
|
10431
10596
|
}, null, 8, ["name"])
|
|
10432
|
-
], 42,
|
|
10597
|
+
], 42, _hoisted_1$2)) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
10433
10598
|
key: 1,
|
|
10434
10599
|
class: vue.normalizeClass(headerClasses.value)
|
|
10435
10600
|
}, [
|
|
10436
|
-
vue.unref(hasSlot) ? (vue.openBlock(), vue.createElementBlock("span",
|
|
10601
|
+
vue.unref(hasSlot) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, [
|
|
10437
10602
|
vue.renderSlot(_ctx.$slots, "default")
|
|
10438
|
-
])) : (vue.openBlock(), vue.createElementBlock("span",
|
|
10603
|
+
])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_5, vue.toDisplayString(__props.heading), 1))
|
|
10439
10604
|
], 2))
|
|
10440
|
-
]);
|
|
10605
|
+
], 16);
|
|
10441
10606
|
};
|
|
10442
10607
|
}
|
|
10443
10608
|
});
|
|
@@ -10445,7 +10610,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10445
10610
|
__name: "FdsTabs",
|
|
10446
10611
|
props: {
|
|
10447
10612
|
block: { type: Boolean, default: false },
|
|
10448
|
-
variant: { default: "primary" }
|
|
10613
|
+
variant: { default: "primary" },
|
|
10614
|
+
dataTestid: { default: void 0 }
|
|
10449
10615
|
},
|
|
10450
10616
|
setup(__props) {
|
|
10451
10617
|
const props = __props;
|
|
@@ -10457,14 +10623,19 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10457
10623
|
"gap-2 mb-4": props.variant === "secondary"
|
|
10458
10624
|
}
|
|
10459
10625
|
]);
|
|
10626
|
+
const rootAttrs = vue.computed(() => {
|
|
10627
|
+
const attrs = {};
|
|
10628
|
+
if (props.dataTestid) {
|
|
10629
|
+
attrs["data-testid"] = props.dataTestid;
|
|
10630
|
+
}
|
|
10631
|
+
return attrs;
|
|
10632
|
+
});
|
|
10460
10633
|
vue.provide("tabsVariant", props.variant);
|
|
10461
10634
|
vue.provide("tabsBlock", props.block);
|
|
10462
10635
|
return (_ctx, _cache) => {
|
|
10463
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
10464
|
-
class: vue.normalizeClass(tabsClasses.value)
|
|
10465
|
-
}, [
|
|
10636
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: tabsClasses.value }, rootAttrs.value), [
|
|
10466
10637
|
vue.renderSlot(_ctx.$slots, "default")
|
|
10467
|
-
],
|
|
10638
|
+
], 16);
|
|
10468
10639
|
};
|
|
10469
10640
|
}
|
|
10470
10641
|
});
|
|
@@ -10480,7 +10651,8 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10480
10651
|
active: { type: Boolean, default: void 0 },
|
|
10481
10652
|
exact: { type: Boolean, default: false },
|
|
10482
10653
|
disabled: { type: Boolean, default: false },
|
|
10483
|
-
label: { default: void 0 }
|
|
10654
|
+
label: { default: void 0 },
|
|
10655
|
+
dataTestid: { default: void 0 }
|
|
10484
10656
|
},
|
|
10485
10657
|
emits: ["click"],
|
|
10486
10658
|
setup(__props, { emit: __emit }) {
|
|
@@ -10556,7 +10728,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10556
10728
|
} else {
|
|
10557
10729
|
return [
|
|
10558
10730
|
"text-blue-700 py-1 px-2 rounded-md border-none",
|
|
10559
|
-
isActive.value ? "bg-blue-
|
|
10731
|
+
isActive.value ? "bg-blue-600 text-white" : "hover:bg-blue_t-100 active:bg-blue_t-200",
|
|
10560
10732
|
"focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-blue-500",
|
|
10561
10733
|
"tracking-[0.002em]"
|
|
10562
10734
|
];
|
|
@@ -10570,6 +10742,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10570
10742
|
disabled: componentType.value === "button" ? props.disabled : void 0,
|
|
10571
10743
|
"aria-disabled": props.disabled ? "true" : void 0,
|
|
10572
10744
|
"aria-current": isActive.value ? "page" : void 0,
|
|
10745
|
+
"data-testid": __props.dataTestid,
|
|
10573
10746
|
onClick: handleClick
|
|
10574
10747
|
}), {
|
|
10575
10748
|
default: vue.withCtx(() => [
|
|
@@ -10577,7 +10750,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10577
10750
|
vue.renderSlot(_ctx.$slots, "default")
|
|
10578
10751
|
]),
|
|
10579
10752
|
_: 3
|
|
10580
|
-
}, 16, ["class", "disabled", "aria-disabled", "aria-current"]);
|
|
10753
|
+
}, 16, ["class", "disabled", "aria-disabled", "aria-current", "data-testid"]);
|
|
10581
10754
|
};
|
|
10582
10755
|
}
|
|
10583
10756
|
});
|
|
@@ -10586,7 +10759,8 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10586
10759
|
props: {
|
|
10587
10760
|
type: {},
|
|
10588
10761
|
size: { default: "responsive" },
|
|
10589
|
-
text: {}
|
|
10762
|
+
text: {},
|
|
10763
|
+
dataTestid: { default: void 0 }
|
|
10590
10764
|
},
|
|
10591
10765
|
setup(__props) {
|
|
10592
10766
|
const props = __props;
|
|
@@ -10619,20 +10793,24 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10619
10793
|
};
|
|
10620
10794
|
return responsiveMap[element];
|
|
10621
10795
|
}
|
|
10796
|
+
const rootAttrs = vue.computed(() => {
|
|
10797
|
+
const attrs = {};
|
|
10798
|
+
if (props.dataTestid) {
|
|
10799
|
+
attrs["data-testid"] = props.dataTestid;
|
|
10800
|
+
}
|
|
10801
|
+
return attrs;
|
|
10802
|
+
});
|
|
10622
10803
|
return (_ctx, _cache) => {
|
|
10623
|
-
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.type), {
|
|
10624
|
-
class: vue.normalizeClass(headingClasses.value)
|
|
10625
|
-
}, {
|
|
10804
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.type), vue.mergeProps({ class: headingClasses.value }, rootAttrs.value), {
|
|
10626
10805
|
default: vue.withCtx(() => [
|
|
10627
10806
|
vue.createTextVNode(vue.toDisplayString(__props.text), 1)
|
|
10628
10807
|
]),
|
|
10629
10808
|
_: 1
|
|
10630
|
-
},
|
|
10809
|
+
}, 16, ["class"]);
|
|
10631
10810
|
};
|
|
10632
10811
|
}
|
|
10633
10812
|
});
|
|
10634
|
-
const _hoisted_1$1 = {
|
|
10635
|
-
const _hoisted_2 = {
|
|
10813
|
+
const _hoisted_1$1 = {
|
|
10636
10814
|
key: 1,
|
|
10637
10815
|
class: "heading font-heading text-xl m-0"
|
|
10638
10816
|
};
|
|
@@ -10644,7 +10822,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10644
10822
|
total: {},
|
|
10645
10823
|
unfiltered: {},
|
|
10646
10824
|
text: {},
|
|
10647
|
-
language: { default: "sv" }
|
|
10825
|
+
language: { default: "sv" },
|
|
10826
|
+
dataTestid: { default: void 0 }
|
|
10648
10827
|
},
|
|
10649
10828
|
setup(__props) {
|
|
10650
10829
|
const props = __props;
|
|
@@ -10672,16 +10851,23 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10672
10851
|
}
|
|
10673
10852
|
return props.language === "sv" ? "Laddar..." : "Loading...";
|
|
10674
10853
|
};
|
|
10854
|
+
const rootAttrs = vue.computed(() => {
|
|
10855
|
+
const attrs = {};
|
|
10856
|
+
if (props.dataTestid) {
|
|
10857
|
+
attrs["data-testid"] = props.dataTestid;
|
|
10858
|
+
}
|
|
10859
|
+
return attrs;
|
|
10860
|
+
});
|
|
10675
10861
|
return (_ctx, _cache) => {
|
|
10676
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
10862
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "inline-block mb-3 h-7 font-bold text-xl" }, rootAttrs.value), [
|
|
10677
10863
|
__props.loading ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
10678
10864
|
key: 0,
|
|
10679
10865
|
size: "24px",
|
|
10680
10866
|
color: "blue",
|
|
10681
10867
|
label: handleLoadingText(),
|
|
10682
10868
|
"label-position": "right"
|
|
10683
|
-
}, null, 8, ["label"])) : (vue.openBlock(), vue.createElementBlock("h3",
|
|
10684
|
-
]);
|
|
10869
|
+
}, null, 8, ["label"])) : (vue.openBlock(), vue.createElementBlock("h3", _hoisted_1$1, vue.toDisplayString(headingText.value), 1))
|
|
10870
|
+
], 16);
|
|
10685
10871
|
};
|
|
10686
10872
|
}
|
|
10687
10873
|
});
|