fds-vue-core 2.1.10 → 2.1.15
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/components.d.ts +5 -3
- package/dist/fds-vue-core.cjs.js +174 -79
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.es.js +175 -80
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +12 -12
- package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.stories.ts +60 -33
- package/src/components/Blocks/FdsBlockAlert/FdsBlockAlert.vue +5 -1
- package/src/components/Blocks/FdsBlockContent/FdsBlockContent.stories.ts +44 -41
- package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.stories.ts +33 -30
- package/src/components/Blocks/FdsBlockExpander/FdsBlockExpander.vue +51 -16
- package/src/components/Blocks/FdsBlockExpander/types.ts +2 -0
- package/src/components/Blocks/FdsBlockInfo/FdsBlockInfo.stories.ts +42 -39
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.stories.ts +42 -39
- package/src/components/Blocks/FdsBlockLink/FdsBlockLink.vue +13 -1
- package/src/components/Blocks/FdsBlockLink/types.ts +2 -0
- package/src/components/Buttons/ButtonBaseProps.ts +5 -0
- package/src/components/Buttons/FdsButtonCopy/FdsButtonCopy.stories.ts +1 -1
- package/src/components/Buttons/FdsButtonCopy/types.ts +1 -0
- package/src/components/Buttons/FdsButtonDownload/FdsButtonDownload.stories.ts +4 -4
- package/src/components/Buttons/FdsButtonDownload/FdsButtonDownload.vue +14 -16
- package/src/components/Buttons/FdsButtonDownload/types.ts +22 -0
- package/src/components/Buttons/FdsButtonIcon/FdsButtonIcon.stories.ts +2 -2
- package/src/components/Buttons/FdsButtonIcon/FdsButtonIcon.vue +1 -1
- package/src/components/Buttons/FdsButtonIcon/types.ts +1 -0
- package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.stories.ts +2 -2
- package/src/components/Buttons/FdsButtonMinor/FdsButtonMinor.vue +4 -1
- package/src/components/Buttons/FdsButtonPrimary/FdsButtonPrimary.stories.ts +4 -4
- package/src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.stories.ts +2 -2
- package/src/components/Buttons/FdsButtonSecondary/FdsButtonSecondary.vue +1 -1
- package/src/components/FdsIcon/FdsIcon.stories.ts +1 -1
- package/src/components/FdsModal/FdsModal.stories.ts +7 -7
- package/src/components/FdsModal/FdsModal.vue +6 -1
- package/src/components/FdsModal/types.ts +1 -0
- package/src/components/FdsPagination/FdsPagination.stories.ts +5 -5
- package/src/components/FdsPagination/types.ts +3 -0
- package/src/components/FdsSearchSelect/FdsSearchSelect.stories.ts +9 -9
- package/src/components/FdsSearchSelect/FdsSearchSelect.vue +7 -30
- package/src/components/FdsSearchSelect/types.ts +7 -0
- package/src/components/FdsSpinner/FdsSpinner.stories.ts +1 -1
- package/src/components/FdsSticker/FdsSticker.stories.ts +23 -20
- package/src/components/FdsSticker/FdsSticker.vue +6 -5
- package/src/components/FdsTreeView/FdsTreeView.stories.ts +1 -1
- package/src/components/FdsTreeView/types.ts +4 -1
- package/src/components/FdsTruncatedText/FdsTruncatedText.stories.ts +4 -4
- package/src/components/FdsTruncatedText/FdsTruncatedText.vue +6 -7
- package/src/components/Form/FdsCheckbox/FdsCheckbox.stories.ts +4 -4
- package/src/components/Form/FdsCheckbox/FdsCheckbox.vue +6 -6
- package/src/components/Form/FdsCheckbox/types.ts +2 -0
- package/src/components/Form/FdsInput/FdsInput.stories.ts +5 -5
- package/src/components/Form/FdsInput/FdsInput.vue +14 -19
- package/src/components/Form/FdsInput/types.ts +4 -0
- package/src/components/Form/FdsRadio/FdsRadio.stories.ts +1 -1
- package/src/components/Form/FdsRadio/FdsRadio.vue +6 -6
- package/src/components/Form/FdsRadio/types.ts +1 -0
- package/src/components/Form/FdsSelect/FdsSelect.stories.ts +4 -4
- package/src/components/Form/FdsSelect/FdsSelect.vue +5 -1
- package/src/components/Form/FdsTextarea/FdsTextarea.stories.ts +2 -2
- package/src/components/Table/FdsTable/FdsTable.stories.ts +3 -3
- package/src/components/Table/FdsTableHead/FdsTableHead.stories.ts +6 -6
- package/src/components/Table/FdsTableHead/FdsTableHead.vue +9 -15
- package/src/components/Table/FdsTableHead/types.ts +1 -0
- package/src/components/Tabs/FdsTabs/FdsTabs.stories.ts +9 -9
- package/src/components/Tabs/FdsTabs/FdsTabs.vue +5 -1
- package/src/components/Tabs/FdsTabsItem/FdsTabsItem.vue +26 -2
- package/src/components/Tabs/FdsTabsItem/types.ts +2 -0
- package/src/components/Typography/FdsText/FdsText.stories.ts +14 -14
- package/src/components/Typography/FdsText/FdsText.vue +18 -2
- package/src/components/Typography/FdsText/types.ts +1 -0
- package/src/index.ts +1 -1
- package/src/.DS_Store +0 -0
package/components.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export * from './src/index'
|
|
5
5
|
export { default } from './src/index'
|
|
6
6
|
|
|
7
|
+
import type { DefineComponent } from 'vue'
|
|
7
8
|
import type { FdsAlertBlockProps } from './src/components/Blocks/FdsBlockAlert/types'
|
|
8
9
|
import type { FdsContentBlockProps } from './src/components/Blocks/FdsBlockContent/types'
|
|
9
10
|
import type { FdsExpanderBlockProps } from './src/components/Blocks/FdsBlockExpander/types'
|
|
@@ -11,6 +12,7 @@ import type { FdsBlockInfoProps } from './src/components/Blocks/FdsBlockInfo/typ
|
|
|
11
12
|
import type { FdsInteractionBlockProps } from './src/components/Blocks/FdsBlockLink/types'
|
|
12
13
|
import type { FdsButtonBaseProps } from './src/components/Buttons/ButtonBaseProps'
|
|
13
14
|
import type { FdsCopyButtonProps } from './src/components/Buttons/FdsButtonCopy/types'
|
|
15
|
+
import type { FdsButtonDownloadProps } from './src/components/Buttons/FdsButtonDownload/types'
|
|
14
16
|
import type { FdsIconButtonProps } from './src/components/Buttons/FdsButtonIcon/types'
|
|
15
17
|
import type { FdsIconProps } from './src/components/FdsIcon/types'
|
|
16
18
|
import type { FdsModalProps } from './src/components/FdsModal/types'
|
|
@@ -18,7 +20,7 @@ import type { FdsPaginationProps } from './src/components/FdsPagination/types'
|
|
|
18
20
|
import type { FdsSearchSelectProps } from './src/components/FdsSearchSelect/types'
|
|
19
21
|
import type { FdsSpinnerProps } from './src/components/FdsSpinner/types'
|
|
20
22
|
import type { FdsStickerProps } from './src/components/FdsSticker/types'
|
|
21
|
-
import type {
|
|
23
|
+
import type { WrapperProps } from './src/components/FdsTreeView/types'
|
|
22
24
|
import type { FdsTruncatedTextProps } from './src/components/FdsTruncatedText/types'
|
|
23
25
|
import type { FdsCheckboxProps } from './src/components/Form/FdsCheckbox/types'
|
|
24
26
|
import type { FdsInputProps } from './src/components/Form/FdsInput/types'
|
|
@@ -36,13 +38,13 @@ import type { FdsTextProps } from './src/components/Typography/FdsText/types'
|
|
|
36
38
|
// Global component declarations visible in consuming projects
|
|
37
39
|
declare module '@vue/runtime-core' {
|
|
38
40
|
export interface GlobalComponents {
|
|
39
|
-
FdsTreeView: DefineComponent<
|
|
41
|
+
FdsTreeView: DefineComponent<WrapperProps>
|
|
40
42
|
FdsButtonPrimary: DefineComponent<FdsButtonBaseProps>
|
|
41
43
|
FdsButtonSecondary: DefineComponent<FdsButtonBaseProps>
|
|
42
44
|
FdsButtonMinor: DefineComponent<FdsButtonBaseProps>
|
|
43
45
|
FdsButtonIcon: DefineComponent<FdsIconButtonProps>
|
|
44
46
|
FdsButtonCopy: DefineComponent<FdsCopyButtonProps>
|
|
45
|
-
FdsButtonDownload: DefineComponent<
|
|
47
|
+
FdsButtonDownload: DefineComponent<FdsButtonDownloadProps>
|
|
46
48
|
FdsIcon: DefineComponent<FdsIconProps>
|
|
47
49
|
FdsSpinner: DefineComponent<FdsSpinnerProps>
|
|
48
50
|
FdsRadio: DefineComponent<FdsRadioProps>
|
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -564,7 +564,8 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
564
564
|
type: { default: "button" },
|
|
565
565
|
ariaLabel: { default: void 0 },
|
|
566
566
|
id: {},
|
|
567
|
-
ariaDisabled: { type: Boolean }
|
|
567
|
+
ariaDisabled: { type: Boolean },
|
|
568
|
+
onClick: {}
|
|
568
569
|
},
|
|
569
570
|
emits: ["click"],
|
|
570
571
|
setup(__props, { emit: __emit }) {
|
|
@@ -575,13 +576,13 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
575
576
|
"inline-flex items-center justify-center rounded-md p-[2px] max-w-[48px] max-h-[48px] transition-colors duration-200 fill-blue-500 hover:bg-blue_t-100 active:bg-blue_t-200 focus-visible:outline-dashed focus-visible:outline-2 outline-blue-500",
|
|
576
577
|
props.disabled ? "opacity-20 cursor-not-allowed" : "cursor-pointer"
|
|
577
578
|
]);
|
|
578
|
-
|
|
579
|
+
const onClick = (ev) => {
|
|
579
580
|
if (props.disabled || props.loading) {
|
|
580
581
|
ev.preventDefault();
|
|
581
582
|
return;
|
|
582
583
|
}
|
|
583
584
|
emit("click", ev);
|
|
584
|
-
}
|
|
585
|
+
};
|
|
585
586
|
return (_ctx, _cache) => {
|
|
586
587
|
return vue.openBlock(), vue.createElementBlock("button", {
|
|
587
588
|
id: __props.id,
|
|
@@ -715,7 +716,7 @@ const _hoisted_2$j = {
|
|
|
715
716
|
};
|
|
716
717
|
const _hoisted_3$a = { class: "flex items-center gap-3" };
|
|
717
718
|
const _hoisted_4$9 = { class: "flex items-start gap-3" };
|
|
718
|
-
const _hoisted_5$
|
|
719
|
+
const _hoisted_5$9 = { class: "mb-0-last-child" };
|
|
719
720
|
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
720
721
|
__name: "FdsBlockContent",
|
|
721
722
|
props: {
|
|
@@ -762,33 +763,47 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
762
763
|
vue.renderSlot(_ctx.$slots, "headerInfo")
|
|
763
764
|
])
|
|
764
765
|
])) : vue.createCommentVNode("", true),
|
|
765
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
766
|
+
vue.createElementVNode("div", _hoisted_5$9, [
|
|
766
767
|
vue.renderSlot(_ctx.$slots, "default")
|
|
767
768
|
])
|
|
768
769
|
], 14, _hoisted_1$n);
|
|
769
770
|
};
|
|
770
771
|
}
|
|
771
772
|
});
|
|
772
|
-
const _hoisted_1$m = { class: "
|
|
773
|
-
const _hoisted_2$i = {
|
|
773
|
+
const _hoisted_1$m = { class: "w-full flex justify-between items-start" };
|
|
774
|
+
const _hoisted_2$i = { class: "inline-flex items-center" };
|
|
775
|
+
const _hoisted_3$9 = {
|
|
774
776
|
key: 0,
|
|
775
777
|
class: "flex items-center mr-4"
|
|
776
778
|
};
|
|
777
|
-
const
|
|
778
|
-
const
|
|
779
|
+
const _hoisted_4$8 = { class: "inline-flex items-center" };
|
|
780
|
+
const _hoisted_5$8 = {
|
|
781
|
+
key: 0,
|
|
782
|
+
class: "w-full flex mt-2"
|
|
783
|
+
};
|
|
784
|
+
const _hoisted_6$5 = ["aria-hidden"];
|
|
779
785
|
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
786
|
+
...{
|
|
787
|
+
inheritAttrs: false
|
|
788
|
+
},
|
|
780
789
|
__name: "FdsBlockExpander",
|
|
781
790
|
props: {
|
|
782
791
|
disabled: { type: Boolean, default: false },
|
|
783
792
|
label: { default: "" },
|
|
784
793
|
open: { type: Boolean, default: false },
|
|
785
|
-
preIcon: { default: void 0 }
|
|
794
|
+
preIcon: { default: void 0 },
|
|
795
|
+
id: { default: void 0 },
|
|
796
|
+
dataTestid: { default: void 0 }
|
|
786
797
|
},
|
|
787
798
|
emits: ["toggle"],
|
|
788
799
|
setup(__props, { emit: __emit }) {
|
|
800
|
+
const attrs = vue.useAttrs();
|
|
789
801
|
const props = __props;
|
|
802
|
+
const hasExtraRowSlot = useHasSlot("extra-row");
|
|
790
803
|
const emit = __emit;
|
|
791
804
|
const isOpen = vue.ref(props.open);
|
|
805
|
+
const autoId = `fds-block-expander-${Math.random().toString(36).slice(2, 9)}`;
|
|
806
|
+
const blockExpanderId = vue.computed(() => props.id ?? autoId);
|
|
792
807
|
vue.watch(
|
|
793
808
|
() => props.open,
|
|
794
809
|
(newValue) => {
|
|
@@ -800,10 +815,17 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
800
815
|
props.disabled && "shadow-none border-2 border-gray-200 border-dashed"
|
|
801
816
|
]);
|
|
802
817
|
const headerClasses = vue.computed(() => [
|
|
803
|
-
"flex w-full
|
|
818
|
+
"flex w-full flex-col text-left bg-white text-blue-600 rounded-2xl p-[calc(1rem-2px)] border-2 border-white transition-colors border-2 border-white hover:border-blue-500 active:bg-blue_t-100 active:border-white focus-visible:border-blue-500 focus-visible:border-dashed focus-visible:outline-0",
|
|
804
819
|
props.disabled ? "cursor-not-allowed hover:border-2 hover:border-transparent active:bg-white" : "cursor-pointer",
|
|
805
|
-
isOpen.value ? "rounded-b-none" : "rounded-b-2xl"
|
|
820
|
+
isOpen.value ? "rounded-b-none" : "rounded-b-2xl",
|
|
821
|
+
hasExtraRowSlot.value ? "" : ""
|
|
806
822
|
]);
|
|
823
|
+
const buttonRowClasses = vue.computed(() => ["flex justify-between items-start w-full", hasExtraRowSlot.value ? "" : ""]);
|
|
824
|
+
const buttonAttrs = vue.computed(() => ({
|
|
825
|
+
...attrs,
|
|
826
|
+
"data-testid": props.dataTestid,
|
|
827
|
+
id: blockExpanderId.value
|
|
828
|
+
}));
|
|
807
829
|
function handleToggle() {
|
|
808
830
|
if (props.disabled) return;
|
|
809
831
|
isOpen.value = !isOpen.value;
|
|
@@ -813,37 +835,46 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
813
835
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
814
836
|
class: vue.normalizeClass(expanderClasses.value)
|
|
815
837
|
}, [
|
|
816
|
-
vue.createElementVNode("button", {
|
|
838
|
+
vue.createElementVNode("button", vue.mergeProps(buttonAttrs.value, {
|
|
817
839
|
type: "button",
|
|
818
|
-
class:
|
|
840
|
+
class: headerClasses.value,
|
|
819
841
|
onClick: handleToggle
|
|
820
|
-
}, [
|
|
821
|
-
vue.createElementVNode("span",
|
|
822
|
-
|
|
842
|
+
}), [
|
|
843
|
+
vue.createElementVNode("span", {
|
|
844
|
+
class: vue.normalizeClass(buttonRowClasses.value)
|
|
845
|
+
}, [
|
|
846
|
+
vue.createElementVNode("span", _hoisted_1$m, [
|
|
847
|
+
vue.createElementVNode("span", _hoisted_2$i, [
|
|
848
|
+
__props.preIcon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$9, [
|
|
849
|
+
vue.createVNode(_sfc_main$w, {
|
|
850
|
+
name: __props.preIcon,
|
|
851
|
+
size: 24,
|
|
852
|
+
class: vue.normalizeClass(["fill-blue-500", { "fill-gray-500": __props.disabled }])
|
|
853
|
+
}, null, 8, ["name", "class"])
|
|
854
|
+
])) : vue.createCommentVNode("", true),
|
|
855
|
+
vue.createElementVNode("span", _hoisted_4$8, [
|
|
856
|
+
vue.createElementVNode("span", {
|
|
857
|
+
class: vue.normalizeClass(["font-bold font-heading text-lg leading-md", { "text-gray-500": __props.disabled }])
|
|
858
|
+
}, vue.toDisplayString(__props.label), 3)
|
|
859
|
+
])
|
|
860
|
+
]),
|
|
823
861
|
vue.createVNode(_sfc_main$w, {
|
|
824
|
-
name:
|
|
862
|
+
name: "arrowDown",
|
|
825
863
|
size: 24,
|
|
826
|
-
class: vue.normalizeClass(["fill-blue-500", { "fill-gray-500": __props.disabled }])
|
|
827
|
-
}, null, 8, ["
|
|
828
|
-
])) : vue.createCommentVNode("", true),
|
|
829
|
-
vue.createElementVNode("span", _hoisted_3$9, [
|
|
830
|
-
vue.createElementVNode("span", {
|
|
831
|
-
class: vue.normalizeClass(["font-bold font-heading text-lg leading-md", { "text-gray-500": __props.disabled }])
|
|
832
|
-
}, vue.toDisplayString(__props.label), 3)
|
|
864
|
+
class: vue.normalizeClass(["ml-4 transition-transform duration-200 fill-blue-500 min-w-6 min-h-6", { "rotate-180": isOpen.value, "fill-gray-500": __props.disabled }])
|
|
865
|
+
}, null, 8, ["class"])
|
|
833
866
|
])
|
|
834
|
-
]),
|
|
835
|
-
vue.
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
}, null, 8, ["class"])
|
|
840
|
-
], 2),
|
|
867
|
+
], 2),
|
|
868
|
+
vue.unref(hasExtraRowSlot) && !isOpen.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$8, [
|
|
869
|
+
vue.renderSlot(_ctx.$slots, "extra-row")
|
|
870
|
+
])) : vue.createCommentVNode("", true)
|
|
871
|
+
], 16),
|
|
841
872
|
vue.withDirectives(vue.createElementVNode("div", {
|
|
842
873
|
"aria-hidden": !isOpen.value,
|
|
843
874
|
class: "mb-0-last-child block px-4 pb-6 rounded-b-2xl bg-white"
|
|
844
875
|
}, [
|
|
845
876
|
vue.renderSlot(_ctx.$slots, "default")
|
|
846
|
-
], 8,
|
|
877
|
+
], 8, _hoisted_6$5), [
|
|
847
878
|
[vue.vShow, isOpen.value]
|
|
848
879
|
])
|
|
849
880
|
], 2);
|
|
@@ -960,6 +991,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
960
991
|
__name: "FdsBlockLink",
|
|
961
992
|
props: {
|
|
962
993
|
label: {},
|
|
994
|
+
id: { default: void 0 },
|
|
963
995
|
arrow: { type: Boolean, default: false },
|
|
964
996
|
disabled: { type: Boolean, default: false },
|
|
965
997
|
download: { default: void 0 },
|
|
@@ -968,6 +1000,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
968
1000
|
rel: { default: void 0 },
|
|
969
1001
|
icon: { default: void 0 },
|
|
970
1002
|
interactive: { type: Boolean, default: true },
|
|
1003
|
+
dataTestid: { default: void 0 },
|
|
971
1004
|
as: { default: "router-link" }
|
|
972
1005
|
},
|
|
973
1006
|
emits: ["click"],
|
|
@@ -977,6 +1010,8 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
977
1010
|
const hasSlot = useHasSlot();
|
|
978
1011
|
const hasStickerSlot = useHasSlot("sticker");
|
|
979
1012
|
const emit = __emit;
|
|
1013
|
+
const autoId = `fds-block-link-${Math.random().toString(36).slice(2, 9)}`;
|
|
1014
|
+
const blockLinkId = vue.computed(() => props.id ?? autoId);
|
|
980
1015
|
const innerClasses = vue.computed(() => [
|
|
981
1016
|
props.disabled ? "cursor-not-allowed shadow-none hover:border-transparent active:bg-transparent" : "cursor-pointer",
|
|
982
1017
|
!props.interactive && "cursor-auto"
|
|
@@ -1016,7 +1051,8 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
1016
1051
|
});
|
|
1017
1052
|
const componentAttrs = vue.computed(() => ({
|
|
1018
1053
|
...linkAttrs.value,
|
|
1019
|
-
...attrs
|
|
1054
|
+
...attrs,
|
|
1055
|
+
"data-testid": props.dataTestid
|
|
1020
1056
|
}));
|
|
1021
1057
|
const componentType = vue.computed(() => {
|
|
1022
1058
|
if (props.as) return props.as;
|
|
@@ -1024,6 +1060,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
1024
1060
|
});
|
|
1025
1061
|
return (_ctx, _cache) => {
|
|
1026
1062
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(componentType.value), vue.mergeProps(componentAttrs.value, {
|
|
1063
|
+
id: blockLinkId.value,
|
|
1027
1064
|
class: ["box-border appearance-none text-left w-full flex items-start bg-white p-[calc(1rem-2px)] mb-3 text-blue-600 shadow-lg shadow-blue-200 rounded-2xl no-underline border-2 border-transparent transition-all duration-200 hover:border-blue-600 hover:border-2 active:border-transparent active:shadow-none active:bg-blue_t-100 focus-visible:border-blue-500 focus-visible:border-dashed focus-visible:outline-0", innerClasses.value],
|
|
1028
1065
|
target: componentType.value === "a" ? __props.target : void 0,
|
|
1029
1066
|
rel: componentType.value === "a" ? __props.rel : void 0,
|
|
@@ -1073,7 +1110,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
1073
1110
|
}, null, 8, ["class"])) : vue.createCommentVNode("", true)
|
|
1074
1111
|
]),
|
|
1075
1112
|
_: 3
|
|
1076
|
-
}, 16, ["class", "target", "rel", "download", "disabled", "aria-disabled"]);
|
|
1113
|
+
}, 16, ["id", "class", "target", "rel", "download", "disabled", "aria-disabled"]);
|
|
1077
1114
|
};
|
|
1078
1115
|
}
|
|
1079
1116
|
});
|
|
@@ -1177,7 +1214,11 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
1177
1214
|
href: { default: void 0 },
|
|
1178
1215
|
target: { default: void 0 },
|
|
1179
1216
|
rel: { default: void 0 },
|
|
1180
|
-
type: { default: "button" }
|
|
1217
|
+
type: { default: "button" },
|
|
1218
|
+
dataTestid: { default: void 0 },
|
|
1219
|
+
ariaLabel: { default: void 0 },
|
|
1220
|
+
ariaExpanded: { type: Boolean, default: void 0 },
|
|
1221
|
+
onClick: {}
|
|
1181
1222
|
},
|
|
1182
1223
|
emits: ["click"],
|
|
1183
1224
|
setup(__props, { emit: __emit }) {
|
|
@@ -1203,13 +1244,13 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
1203
1244
|
props.textSelection && "select-text"
|
|
1204
1245
|
]);
|
|
1205
1246
|
const iconFillClass2 = vue.computed(() => props.invert ? "fill-white" : "fill-blue-500");
|
|
1206
|
-
|
|
1247
|
+
const onClick = (ev) => {
|
|
1207
1248
|
if (props.disabled || props.loading) {
|
|
1208
1249
|
ev.preventDefault();
|
|
1209
1250
|
return;
|
|
1210
1251
|
}
|
|
1211
1252
|
emit("click", ev);
|
|
1212
|
-
}
|
|
1253
|
+
};
|
|
1213
1254
|
const linkAttrs = vue.computed(() => {
|
|
1214
1255
|
if (props.as === "a") return { href: props.href };
|
|
1215
1256
|
if (props.as === "router-link") return { to: props.href };
|
|
@@ -1269,7 +1310,8 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
1269
1310
|
label: { default: "Kopiera" },
|
|
1270
1311
|
copiedLabel: { default: "Kopierat!" },
|
|
1271
1312
|
timeoutMs: { default: 800 },
|
|
1272
|
-
disabled: { type: Boolean, default: false }
|
|
1313
|
+
disabled: { type: Boolean, default: false },
|
|
1314
|
+
onClick: {}
|
|
1273
1315
|
},
|
|
1274
1316
|
emits: ["click"],
|
|
1275
1317
|
setup(__props) {
|
|
@@ -1345,22 +1387,19 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
1345
1387
|
},
|
|
1346
1388
|
__name: "FdsButtonDownload",
|
|
1347
1389
|
props: {
|
|
1348
|
-
text: {},
|
|
1349
1390
|
loading: { type: Boolean, default: false },
|
|
1350
1391
|
disabled: { type: Boolean, default: false },
|
|
1351
|
-
block: { type: Boolean },
|
|
1352
|
-
state: {},
|
|
1353
1392
|
iconPos: { default: "left" },
|
|
1354
|
-
size: {},
|
|
1355
|
-
textSelection: { type: Boolean },
|
|
1356
1393
|
href: { default: void 0 },
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1394
|
+
downloadOptions: { default: void 0 },
|
|
1395
|
+
text: { default: "" },
|
|
1396
|
+
ariaLabel: { default: void 0 },
|
|
1397
|
+
dataTestid: { default: void 0 },
|
|
1398
|
+
onClick: {}
|
|
1361
1399
|
},
|
|
1362
1400
|
emits: ["click"],
|
|
1363
1401
|
setup(__props, { emit: __emit }) {
|
|
1402
|
+
const attrs = vue.useAttrs();
|
|
1364
1403
|
const props = __props;
|
|
1365
1404
|
const emit = __emit;
|
|
1366
1405
|
const isDownloading = vue.ref(false);
|
|
@@ -1386,6 +1425,11 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
1386
1425
|
isDownloading.value ? "cursor-not-allowed text-gray-500" : "cursor-pointer text-blue-600"
|
|
1387
1426
|
]);
|
|
1388
1427
|
const iconFillClass2 = vue.computed(() => isDownloading.value ? "fill-gray-500" : "fill-blue-500");
|
|
1428
|
+
const buttonAttrs = vue.computed(() => ({
|
|
1429
|
+
...attrs,
|
|
1430
|
+
"data-testid": props.dataTestid,
|
|
1431
|
+
"aria-label": props.ariaLabel
|
|
1432
|
+
}));
|
|
1389
1433
|
async function handleDownload(ev) {
|
|
1390
1434
|
if (props.disabled || props.loading || isDownloading.value) {
|
|
1391
1435
|
ev.preventDefault();
|
|
@@ -1451,7 +1495,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
1451
1495
|
isDownloading.value = false;
|
|
1452
1496
|
}
|
|
1453
1497
|
}
|
|
1454
|
-
|
|
1498
|
+
const onClick = (ev) => {
|
|
1455
1499
|
if (props.downloadOptions) {
|
|
1456
1500
|
handleDownload(ev);
|
|
1457
1501
|
} else {
|
|
@@ -1461,13 +1505,13 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
|
1461
1505
|
}
|
|
1462
1506
|
emit("click", ev);
|
|
1463
1507
|
}
|
|
1464
|
-
}
|
|
1508
|
+
};
|
|
1465
1509
|
return (_ctx, _cache) => {
|
|
1466
1510
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1467
1511
|
class: vue.normalizeClass(rootClasses.value),
|
|
1468
1512
|
"aria-disabled": __props.disabled ? "true" : void 0
|
|
1469
1513
|
}, [
|
|
1470
|
-
vue.createElementVNode("button", vue.mergeProps(
|
|
1514
|
+
vue.createElementVNode("button", vue.mergeProps(buttonAttrs.value, {
|
|
1471
1515
|
class: buttonClasses.value,
|
|
1472
1516
|
disabled: __props.disabled || __props.loading || isDownloading.value,
|
|
1473
1517
|
type: "button",
|
|
@@ -1510,7 +1554,12 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
1510
1554
|
href: { default: void 0 },
|
|
1511
1555
|
target: {},
|
|
1512
1556
|
rel: {},
|
|
1513
|
-
type: { default: "button" }
|
|
1557
|
+
type: { default: "button" },
|
|
1558
|
+
invert: { type: Boolean },
|
|
1559
|
+
dataTestid: {},
|
|
1560
|
+
ariaLabel: {},
|
|
1561
|
+
ariaExpanded: { type: Boolean },
|
|
1562
|
+
onClick: {}
|
|
1514
1563
|
},
|
|
1515
1564
|
emits: ["click"],
|
|
1516
1565
|
setup(__props, { emit: __emit }) {
|
|
@@ -1604,7 +1653,12 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
1604
1653
|
href: { default: void 0 },
|
|
1605
1654
|
target: {},
|
|
1606
1655
|
rel: {},
|
|
1607
|
-
type: { default: "button" }
|
|
1656
|
+
type: { default: "button" },
|
|
1657
|
+
invert: { type: Boolean },
|
|
1658
|
+
dataTestid: {},
|
|
1659
|
+
ariaLabel: {},
|
|
1660
|
+
ariaExpanded: { type: Boolean },
|
|
1661
|
+
onClick: {}
|
|
1608
1662
|
},
|
|
1609
1663
|
emits: ["click"],
|
|
1610
1664
|
setup(__props, { emit: __emit }) {
|
|
@@ -1630,13 +1684,13 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
1630
1684
|
props.textSelection && "select-text",
|
|
1631
1685
|
(props.icon || props.text) && "gap-2"
|
|
1632
1686
|
]);
|
|
1633
|
-
|
|
1687
|
+
const onClick = (ev) => {
|
|
1634
1688
|
if (props.disabled || props.loading) {
|
|
1635
1689
|
ev.preventDefault();
|
|
1636
1690
|
return;
|
|
1637
1691
|
}
|
|
1638
1692
|
emit("click", ev);
|
|
1639
|
-
}
|
|
1693
|
+
};
|
|
1640
1694
|
const linkAttrs = vue.computed(() => {
|
|
1641
1695
|
if (props.as === "a") return { href: props.href };
|
|
1642
1696
|
if (props.as === "router-link") return { to: props.href };
|
|
@@ -1691,7 +1745,8 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
1691
1745
|
strict: { type: Boolean, default: false },
|
|
1692
1746
|
lockScroll: { type: Boolean, default: false },
|
|
1693
1747
|
info: { default: void 0 },
|
|
1694
|
-
locale: { default: "sv" }
|
|
1748
|
+
locale: { default: "sv" },
|
|
1749
|
+
onClose: {}
|
|
1695
1750
|
},
|
|
1696
1751
|
emits: ["close", "update:open"],
|
|
1697
1752
|
setup(__props, { emit: __emit }) {
|
|
@@ -5094,12 +5149,16 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
5094
5149
|
size: {},
|
|
5095
5150
|
maxlength: {},
|
|
5096
5151
|
mask: { default: void 0 },
|
|
5097
|
-
maskOptions: { default: void 0 }
|
|
5152
|
+
maskOptions: { default: void 0 },
|
|
5153
|
+
modelValue: {},
|
|
5154
|
+
onClearInput: {},
|
|
5155
|
+
onKeyup: {},
|
|
5156
|
+
onInput: {}
|
|
5098
5157
|
}, {
|
|
5099
5158
|
"modelValue": { default: void 0, required: false },
|
|
5100
5159
|
"modelModifiers": {}
|
|
5101
5160
|
}),
|
|
5102
|
-
emits: /* @__PURE__ */ vue.mergeModels(["input", "clearInput", "update:value"], ["update:modelValue"]),
|
|
5161
|
+
emits: /* @__PURE__ */ vue.mergeModels(["input", "clearInput", "update:value", "keyup", "keyup.enter"], ["update:modelValue"]),
|
|
5103
5162
|
setup(__props, { emit: __emit }) {
|
|
5104
5163
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
5105
5164
|
const props = __props;
|
|
@@ -5234,7 +5293,11 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
5234
5293
|
"aria-invalid": __props.valid === "false" ? "true" : void 0,
|
|
5235
5294
|
class: inputClasses.value
|
|
5236
5295
|
}, _ctx.$attrs, {
|
|
5237
|
-
onInput: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("input", $event))
|
|
5296
|
+
onInput: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("input", $event)),
|
|
5297
|
+
onKeyup: _cache[2] || (_cache[2] = (ev) => {
|
|
5298
|
+
_ctx.$emit("keyup", ev);
|
|
5299
|
+
if (ev.key === "Enter") _ctx.$emit("keyup.enter", ev);
|
|
5300
|
+
})
|
|
5238
5301
|
}), null, 16, _hoisted_4$6), [
|
|
5239
5302
|
[vue.vModelDynamic, internalValue.value]
|
|
5240
5303
|
]),
|
|
@@ -5282,7 +5345,8 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
5282
5345
|
id: { default: void 0 },
|
|
5283
5346
|
current: {},
|
|
5284
5347
|
max: {},
|
|
5285
|
-
loading: { type: Boolean, default: false }
|
|
5348
|
+
loading: { type: Boolean, default: false },
|
|
5349
|
+
onPaginate: {}
|
|
5286
5350
|
},
|
|
5287
5351
|
emits: ["paginate"],
|
|
5288
5352
|
setup(__props, { emit: __emit }) {
|
|
@@ -5529,7 +5593,11 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
5529
5593
|
marginless: { type: Boolean, default: false },
|
|
5530
5594
|
maxListHeight: { default: void 0 },
|
|
5531
5595
|
locale: { default: "sv" },
|
|
5532
|
-
clearTrigger: { type: Boolean, default: false }
|
|
5596
|
+
clearTrigger: { type: Boolean, default: false },
|
|
5597
|
+
onChange: {},
|
|
5598
|
+
onSearchSelected: {},
|
|
5599
|
+
onPaginate: {},
|
|
5600
|
+
onTotal: {}
|
|
5533
5601
|
},
|
|
5534
5602
|
emits: ["searchSelected", "paginate", "total", "change"],
|
|
5535
5603
|
setup(__props, { emit: __emit }) {
|
|
@@ -6435,7 +6503,9 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
6435
6503
|
value: { default: void 0 },
|
|
6436
6504
|
name: { default: void 0 },
|
|
6437
6505
|
id: { default: void 0 },
|
|
6438
|
-
required: { type: Boolean, default: false }
|
|
6506
|
+
required: { type: Boolean, default: false },
|
|
6507
|
+
modelValue: { type: [Boolean, Array] },
|
|
6508
|
+
onChange: {}
|
|
6439
6509
|
}, {
|
|
6440
6510
|
"modelValue": { type: [Boolean, Array], ...{
|
|
6441
6511
|
default: void 0,
|
|
@@ -6568,6 +6638,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
6568
6638
|
name: { default: void 0 },
|
|
6569
6639
|
id: { default: void 0 },
|
|
6570
6640
|
required: { type: Boolean, default: false },
|
|
6641
|
+
modelValue: {},
|
|
6571
6642
|
onKeydown: {},
|
|
6572
6643
|
onBlur: {},
|
|
6573
6644
|
onChange: {}
|
|
@@ -6686,7 +6757,8 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
|
6686
6757
|
searchCountTemplate: {},
|
|
6687
6758
|
searchCountTemplateUnfiltered: {},
|
|
6688
6759
|
titleTemplate: {},
|
|
6689
|
-
|
|
6760
|
+
onGetSearchContainerHeight: {},
|
|
6761
|
+
selectedNodes: {}
|
|
6690
6762
|
},
|
|
6691
6763
|
setup(__props) {
|
|
6692
6764
|
const props = __props;
|
|
@@ -7010,11 +7082,16 @@ function useElementFinalSize(elementRef, onFinalSize, delay = 100) {
|
|
|
7010
7082
|
});
|
|
7011
7083
|
}
|
|
7012
7084
|
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
7085
|
+
...{
|
|
7086
|
+
inheritAttrs: false
|
|
7087
|
+
},
|
|
7013
7088
|
__name: "FdsText",
|
|
7014
7089
|
props: {
|
|
7015
|
-
type: { default: "default" }
|
|
7090
|
+
type: { default: "default" },
|
|
7091
|
+
dataTestid: { default: void 0 }
|
|
7016
7092
|
},
|
|
7017
7093
|
setup(__props) {
|
|
7094
|
+
const attrs = vue.useAttrs();
|
|
7018
7095
|
const props = __props;
|
|
7019
7096
|
const textClasses = vue.computed(() => {
|
|
7020
7097
|
const baseClasses = "inline-block";
|
|
@@ -7026,12 +7103,14 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
7026
7103
|
}
|
|
7027
7104
|
return baseClasses;
|
|
7028
7105
|
});
|
|
7106
|
+
const spanAttrs = vue.computed(() => ({
|
|
7107
|
+
...attrs,
|
|
7108
|
+
"data-testid": props.dataTestid
|
|
7109
|
+
}));
|
|
7029
7110
|
return (_ctx, _cache) => {
|
|
7030
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
7031
|
-
class: vue.normalizeClass(textClasses.value)
|
|
7032
|
-
}, [
|
|
7111
|
+
return vue.openBlock(), vue.createElementBlock("span", vue.mergeProps(spanAttrs.value, { class: textClasses.value }), [
|
|
7033
7112
|
vue.renderSlot(_ctx.$slots, "default")
|
|
7034
|
-
],
|
|
7113
|
+
], 16);
|
|
7035
7114
|
};
|
|
7036
7115
|
}
|
|
7037
7116
|
});
|
|
@@ -7071,9 +7150,9 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
7071
7150
|
searchCountTemplate: {},
|
|
7072
7151
|
searchCountTemplateUnfiltered: {},
|
|
7073
7152
|
titleTemplate: { default: "[[title]]" },
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7153
|
+
onGetSearchContainerHeight: {},
|
|
7154
|
+
selectedNodes: {},
|
|
7155
|
+
data: {}
|
|
7077
7156
|
},
|
|
7078
7157
|
emits: ["update:selectedNodes", "getSearchContainerHeight"],
|
|
7079
7158
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -7521,9 +7600,10 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7521
7600
|
props: {
|
|
7522
7601
|
heading: { default: void 0 },
|
|
7523
7602
|
align: { default: "left" },
|
|
7524
|
-
icon: { default: void 0 }
|
|
7603
|
+
icon: { default: void 0 },
|
|
7604
|
+
onClick: {}
|
|
7525
7605
|
},
|
|
7526
|
-
emits: ["sort"],
|
|
7606
|
+
emits: ["sort", "click"],
|
|
7527
7607
|
setup(__props) {
|
|
7528
7608
|
const props = __props;
|
|
7529
7609
|
const hasSlot = useHasSlot();
|
|
@@ -7600,10 +7680,25 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7600
7680
|
active: { type: Boolean, default: void 0 },
|
|
7601
7681
|
exact: { type: Boolean, default: false },
|
|
7602
7682
|
disabled: { type: Boolean, default: false },
|
|
7603
|
-
label: { default: void 0 }
|
|
7683
|
+
label: { default: void 0 },
|
|
7684
|
+
onClick: {}
|
|
7604
7685
|
},
|
|
7605
|
-
|
|
7686
|
+
emits: ["click"],
|
|
7687
|
+
setup(__props, { emit: __emit }) {
|
|
7606
7688
|
const attrs = vue.useAttrs();
|
|
7689
|
+
const emit = __emit;
|
|
7690
|
+
const onClick = (ev) => {
|
|
7691
|
+
if (props.disabled) {
|
|
7692
|
+
ev.preventDefault();
|
|
7693
|
+
return;
|
|
7694
|
+
}
|
|
7695
|
+
emit("click", ev);
|
|
7696
|
+
};
|
|
7697
|
+
const handleClick = (ev) => {
|
|
7698
|
+
if (componentType.value === "button" && !props.disabled) {
|
|
7699
|
+
onClick(ev);
|
|
7700
|
+
}
|
|
7701
|
+
};
|
|
7607
7702
|
const instance = vue.getCurrentInstance();
|
|
7608
7703
|
const route = vue.computed(() => {
|
|
7609
7704
|
try {
|
|
@@ -7680,12 +7775,12 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7680
7775
|
class: buttonClasses.value,
|
|
7681
7776
|
disabled: componentType.value === "button" ? __props.disabled : void 0,
|
|
7682
7777
|
"aria-disabled": __props.disabled,
|
|
7683
|
-
"aria-current": isActive.value ? "page" : void 0
|
|
7778
|
+
"aria-current": isActive.value ? "page" : void 0,
|
|
7779
|
+
onClick: handleClick
|
|
7684
7780
|
}), {
|
|
7685
7781
|
default: vue.withCtx(() => [
|
|
7686
|
-
vue.
|
|
7687
|
-
|
|
7688
|
-
])
|
|
7782
|
+
vue.createTextVNode(vue.toDisplayString(__props.label) + " ", 1),
|
|
7783
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
7689
7784
|
]),
|
|
7690
7785
|
_: 3
|
|
7691
7786
|
}, 16, ["class", "disabled", "aria-disabled", "aria-current"]);
|