@knime/kds-components 0.15.1 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accessories/Badge/KdsBadge.vue.d.ts +1 -1
- package/dist/accessories/Badge/KdsBadge.vue.d.ts.map +1 -1
- package/dist/accessories/Badge/types.d.ts +1 -1
- package/dist/accessories/Badge/types.d.ts.map +1 -1
- package/dist/accessories/InlineMessage/KdsInlineMessage.vue.d.ts +1 -1
- package/dist/accessories/InlineMessage/types.d.ts +4 -4
- package/dist/accessories/InlineMessage/types.d.ts.map +1 -1
- package/dist/buttons/KdsMenuButton/KdsMenuButton.vue.d.ts +3 -0
- package/dist/buttons/KdsMenuButton/KdsMenuButton.vue.d.ts.map +1 -0
- package/dist/buttons/KdsMenuButton/index.d.ts +3 -0
- package/dist/buttons/KdsMenuButton/index.d.ts.map +1 -0
- package/dist/buttons/KdsMenuButton/types.d.ts +30 -0
- package/dist/buttons/KdsMenuButton/types.d.ts.map +1 -0
- package/dist/buttons/index.d.ts +2 -0
- package/dist/buttons/index.d.ts.map +1 -1
- package/dist/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts +2 -6
- package/dist/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts.map +1 -1
- package/dist/forms/_helper/List/KdsListItem/KdsListItem.vue.d.ts +4 -3
- package/dist/forms/_helper/List/KdsListItem/KdsListItem.vue.d.ts.map +1 -1
- package/dist/forms/_helper/List/KdsListItem/enums.d.ts +5 -0
- package/dist/forms/_helper/List/KdsListItem/enums.d.ts.map +1 -1
- package/dist/forms/_helper/List/KdsListItem/types.d.ts +4 -1
- package/dist/forms/_helper/List/KdsListItem/types.d.ts.map +1 -1
- package/dist/forms/_helper/List/ListContainer/KdsListContainer.vue.d.ts +2 -0
- package/dist/forms/_helper/List/ListContainer/KdsListContainer.vue.d.ts.map +1 -1
- package/dist/forms/_helper/List/ListContainer/enums.d.ts +6 -0
- package/dist/forms/_helper/List/ListContainer/enums.d.ts.map +1 -0
- package/dist/forms/_helper/List/ListContainer/types.d.ts +23 -2
- package/dist/forms/_helper/List/ListContainer/types.d.ts.map +1 -1
- package/dist/forms/_helper/List/ListItemDivider/ListItemDivider.vue.d.ts +3 -0
- package/dist/forms/_helper/List/ListItemDivider/ListItemDivider.vue.d.ts.map +1 -0
- package/dist/forms/_helper/List/ListItemDivider/index.d.ts +2 -0
- package/dist/forms/_helper/List/ListItemDivider/index.d.ts.map +1 -0
- package/dist/forms/_helper/List/ListItemSectionTitle/ListItemSectionTitle.vue.d.ts +6 -0
- package/dist/forms/_helper/List/ListItemSectionTitle/ListItemSectionTitle.vue.d.ts.map +1 -0
- package/dist/forms/_helper/List/ListItemSectionTitle/index.d.ts +3 -0
- package/dist/forms/_helper/List/ListItemSectionTitle/index.d.ts.map +1 -0
- package/dist/forms/_helper/List/ListItemSectionTitle/types.d.ts +8 -0
- package/dist/forms/_helper/List/ListItemSectionTitle/types.d.ts.map +1 -0
- package/dist/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts +2 -6
- package/dist/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts.map +1 -1
- package/dist/forms/inputs/ColorInput/KdsColorInput.vue.d.ts.map +1 -1
- package/dist/forms/selects/Dropdown/BaseDropdown.vue.d.ts +2 -2
- package/dist/forms/selects/Dropdown/DropdownContainer.vue.d.ts +5 -3
- package/dist/forms/selects/Dropdown/DropdownContainer.vue.d.ts.map +1 -1
- package/dist/forms/selects/Dropdown/KdsDropdown.vue.d.ts.map +1 -1
- package/dist/forms/selects/Dropdown/types.d.ts +4 -0
- package/dist/forms/selects/Dropdown/types.d.ts.map +1 -1
- package/dist/index.css +386 -343
- package/dist/index.js +1480 -1269
- package/dist/index.js.map +1 -1
- package/dist/layouts/EmptyState/KdsEmptyState.vue.d.ts.map +1 -1
- package/dist/layouts/EmptyState/types.d.ts +1 -0
- package/dist/layouts/EmptyState/types.d.ts.map +1 -1
- package/dist/overlays/Modal/KdsModal.vue.d.ts +5 -5
- package/dist/overlays/Modal/KdsModalLayout.vue.d.ts +2 -2
- package/dist/overlays/Modal/enums.d.ts +4 -4
- package/dist/overlays/Modal/types.d.ts +3 -3
- package/dist/overlays/Modal/types.d.ts.map +1 -1
- package/dist/overlays/Modal/useKdsDynamicModal.d.ts +6 -6
- package/dist/overlays/Popover/KdsPopover.vue.d.ts.map +1 -1
- package/dist/overlays/Popover/types.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, createVNode, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels,
|
|
1
|
+
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, createVNode, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels, useId, nextTick, toHandlers, Fragment, renderList, withModifiers, watchEffect, useAttrs, defineAsyncComponent, onBeforeUpdate, normalizeProps, guardReactiveProps, withDirectives, vModelText, createTextVNode, useCssVars, mergeDefaults, createSlots } from 'vue';
|
|
2
2
|
import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useMutationObserver, useElementSize } from '@vueuse/core';
|
|
3
3
|
|
|
4
4
|
import './index.css';const kdsAvatarSize = {
|
|
@@ -9,14 +9,14 @@ import './index.css';const kdsAvatarSize = {
|
|
|
9
9
|
};
|
|
10
10
|
const kdsAvatarSizes = Object.values(kdsAvatarSize);
|
|
11
11
|
|
|
12
|
-
const _hoisted_1$
|
|
13
|
-
const _hoisted_2$
|
|
14
|
-
const _hoisted_3$
|
|
12
|
+
const _hoisted_1$z = ["role", "title", "aria-hidden", "aria-label"];
|
|
13
|
+
const _hoisted_2$i = ["src"];
|
|
14
|
+
const _hoisted_3$b = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "kds-avatar-initials",
|
|
17
17
|
"aria-hidden": "true"
|
|
18
18
|
};
|
|
19
|
-
const _sfc_main$
|
|
19
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
20
20
|
__name: "KdsAvatar",
|
|
21
21
|
props: {
|
|
22
22
|
initials: {},
|
|
@@ -59,10 +59,10 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
alt: "",
|
|
60
60
|
"aria-hidden": "true",
|
|
61
61
|
onError: onImageError
|
|
62
|
-
}, null, 40, _hoisted_2$
|
|
62
|
+
}, null, 40, _hoisted_2$i)) : (openBlock(), createElementBlock("div", _hoisted_3$b, [
|
|
63
63
|
createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)
|
|
64
64
|
]))
|
|
65
|
-
], 10, _hoisted_1$
|
|
65
|
+
], 10, _hoisted_1$z);
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
});
|
|
@@ -75,7 +75,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
75
75
|
return target;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
78
|
+
const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-d6a313f1"]]);
|
|
79
79
|
|
|
80
80
|
const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
81
81
|
const v = glob$1[path$13];
|
|
@@ -111,7 +111,7 @@ const useIcon = ({
|
|
|
111
111
|
return iconComponent;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
const _sfc_main$
|
|
114
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
115
115
|
__name: "KdsIcon",
|
|
116
116
|
props: {
|
|
117
117
|
name: {},
|
|
@@ -137,7 +137,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
|
|
140
|
-
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
140
|
+
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-4da5bf3e"]]);
|
|
141
141
|
|
|
142
142
|
const ID_TO_ICON_MAP = {
|
|
143
143
|
// Flow Variables
|
|
@@ -463,8 +463,8 @@ const kdsDataTypeSize = {
|
|
|
463
463
|
};
|
|
464
464
|
const kdsDataTypeSizes = Object.values(kdsDataTypeSize);
|
|
465
465
|
|
|
466
|
-
const _hoisted_1$
|
|
467
|
-
const _sfc_main$
|
|
466
|
+
const _hoisted_1$y = ["title"];
|
|
467
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
468
468
|
__name: "KdsDataType",
|
|
469
469
|
props: {
|
|
470
470
|
iconName: { default: "unknown-datatype" },
|
|
@@ -505,12 +505,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
505
505
|
"aria-hidden": "true",
|
|
506
506
|
focusable: "false"
|
|
507
507
|
}, null, 8, ["class"]))
|
|
508
|
-
], 10, _hoisted_1$
|
|
508
|
+
], 10, _hoisted_1$y);
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
511
|
});
|
|
512
512
|
|
|
513
|
-
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
513
|
+
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-806087da"]]);
|
|
514
514
|
|
|
515
515
|
const kdsBadgeVariant = {
|
|
516
516
|
NEUTRAL: "neutral",
|
|
@@ -527,14 +527,14 @@ const kdsBadgeSize = {
|
|
|
527
527
|
};
|
|
528
528
|
const kdsBadgeSizes = Object.values(kdsBadgeSize);
|
|
529
529
|
|
|
530
|
-
const _hoisted_1$
|
|
531
|
-
const _sfc_main$
|
|
530
|
+
const _hoisted_1$x = { class: "label-wrapper" };
|
|
531
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
532
532
|
__name: "KdsBadge",
|
|
533
533
|
props: {
|
|
534
534
|
label: {},
|
|
535
535
|
variant: { default: kdsBadgeVariant.NEUTRAL },
|
|
536
536
|
size: { default: kdsBadgeSize.XSMALL },
|
|
537
|
-
|
|
537
|
+
leadingIcon: { default: void 0 }
|
|
538
538
|
},
|
|
539
539
|
setup(__props) {
|
|
540
540
|
const sizeToIconSize = {
|
|
@@ -545,18 +545,18 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
545
545
|
return openBlock(), createElementBlock("span", {
|
|
546
546
|
class: normalizeClass(["kds-badge", __props.size, __props.variant])
|
|
547
547
|
}, [
|
|
548
|
-
__props.
|
|
548
|
+
__props.leadingIcon ? (openBlock(), createBlock(unref(KdsIcon), {
|
|
549
549
|
key: 0,
|
|
550
|
-
name: __props.
|
|
550
|
+
name: __props.leadingIcon,
|
|
551
551
|
size: sizeToIconSize[__props.size]
|
|
552
552
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true),
|
|
553
|
-
createElementVNode("span", _hoisted_1$
|
|
553
|
+
createElementVNode("span", _hoisted_1$x, toDisplayString(__props.label), 1)
|
|
554
554
|
], 2);
|
|
555
555
|
};
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
|
|
559
|
-
const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
559
|
+
const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-0dc42bfc"]]);
|
|
560
560
|
|
|
561
561
|
const kdsColorSwatchType = {
|
|
562
562
|
LEARNER: "learner",
|
|
@@ -575,8 +575,8 @@ const kdsColorSwatchSize = {
|
|
|
575
575
|
};
|
|
576
576
|
const kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
|
|
577
577
|
|
|
578
|
-
const _hoisted_1$
|
|
579
|
-
const _sfc_main$
|
|
578
|
+
const _hoisted_1$w = ["role", "title", "aria-hidden", "aria-label"];
|
|
579
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
580
580
|
__name: "KdsColorSwatch",
|
|
581
581
|
props: {
|
|
582
582
|
color: {},
|
|
@@ -611,12 +611,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
611
611
|
style: normalizeStyle({ backgroundColor: backgroundColor.value }),
|
|
612
612
|
"aria-hidden": hasTitle.value ? void 0 : "true",
|
|
613
613
|
"aria-label": hasTitle.value ? accessibleTitle.value : void 0
|
|
614
|
-
}, null, 14, _hoisted_1$
|
|
614
|
+
}, null, 14, _hoisted_1$w);
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
617
|
});
|
|
618
618
|
|
|
619
|
-
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
619
|
+
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-bdb3dd24"]]);
|
|
620
620
|
|
|
621
621
|
const kdsDarkModeType = {
|
|
622
622
|
LIGHT: "light",
|
|
@@ -736,9 +736,9 @@ function useKdsIsTruncated(elementRef) {
|
|
|
736
736
|
return { isTruncated };
|
|
737
737
|
}
|
|
738
738
|
|
|
739
|
-
const _hoisted_1$
|
|
740
|
-
const _hoisted_2$
|
|
741
|
-
const _sfc_main$
|
|
739
|
+
const _hoisted_1$v = ["title", "aria-label"];
|
|
740
|
+
const _hoisted_2$h = ["title"];
|
|
741
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
742
742
|
__name: "KdsLiveStatus",
|
|
743
743
|
props: {
|
|
744
744
|
status: { default: "red" },
|
|
@@ -767,13 +767,13 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
767
767
|
ref: labelEl,
|
|
768
768
|
class: "label",
|
|
769
769
|
title: unref(isTruncated) ? props.label : void 0
|
|
770
|
-
}, toDisplayString(props.label), 9, _hoisted_2$
|
|
771
|
-
], 10, _hoisted_1$
|
|
770
|
+
}, toDisplayString(props.label), 9, _hoisted_2$h)) : createCommentVNode("", true)
|
|
771
|
+
], 10, _hoisted_1$v);
|
|
772
772
|
};
|
|
773
773
|
}
|
|
774
774
|
});
|
|
775
775
|
|
|
776
|
-
const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
776
|
+
const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-4dec8e94"]]);
|
|
777
777
|
|
|
778
778
|
const kdsLiveStatusStatus = {
|
|
779
779
|
RED: "red",
|
|
@@ -789,8 +789,8 @@ const kdsLiveStatusSize = {
|
|
|
789
789
|
};
|
|
790
790
|
const kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
|
|
791
791
|
|
|
792
|
-
const _hoisted_1$
|
|
793
|
-
const _sfc_main$
|
|
792
|
+
const _hoisted_1$u = ["data-style"];
|
|
793
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
794
794
|
__name: "KdsLoadingSpinner",
|
|
795
795
|
props: {
|
|
796
796
|
size: { default: "medium" },
|
|
@@ -815,12 +815,12 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
815
815
|
cy: "60",
|
|
816
816
|
r: "50"
|
|
817
817
|
}, null, -1)
|
|
818
|
-
])], 10, _hoisted_1$
|
|
818
|
+
])], 10, _hoisted_1$u);
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
821
|
});
|
|
822
822
|
|
|
823
|
-
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
823
|
+
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-74bb7c3d"]]);
|
|
824
824
|
|
|
825
825
|
const kdsLoadingSpinnerVariant = {
|
|
826
826
|
ON_PRIMARY: "onPrimary",
|
|
@@ -830,18 +830,18 @@ const kdsLoadingSpinnerVariants = Object.values(
|
|
|
830
830
|
kdsLoadingSpinnerVariant
|
|
831
831
|
);
|
|
832
832
|
|
|
833
|
-
const _hoisted_1$
|
|
834
|
-
const _hoisted_2$
|
|
835
|
-
const _hoisted_3$
|
|
833
|
+
const _hoisted_1$t = ["role"];
|
|
834
|
+
const _hoisted_2$g = { class: "header" };
|
|
835
|
+
const _hoisted_3$a = { class: "headline" };
|
|
836
836
|
const _hoisted_4$7 = {
|
|
837
837
|
key: 0,
|
|
838
838
|
class: "body"
|
|
839
839
|
};
|
|
840
|
-
const _sfc_main$
|
|
840
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
841
841
|
__name: "KdsInlineMessage",
|
|
842
842
|
props: {
|
|
843
|
-
|
|
844
|
-
|
|
843
|
+
headline: {},
|
|
844
|
+
description: { default: void 0 },
|
|
845
845
|
variant: { default: "info" }
|
|
846
846
|
},
|
|
847
847
|
setup(__props) {
|
|
@@ -868,21 +868,21 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
868
868
|
class: normalizeClass(classes.value),
|
|
869
869
|
role: role.value
|
|
870
870
|
}, [
|
|
871
|
-
createElementVNode("div", _hoisted_2$
|
|
871
|
+
createElementVNode("div", _hoisted_2$g, [
|
|
872
872
|
createVNode(KdsIcon, {
|
|
873
873
|
class: "icon",
|
|
874
874
|
name: iconName.value,
|
|
875
875
|
size: "small"
|
|
876
876
|
}, null, 8, ["name"]),
|
|
877
|
-
createElementVNode("div", _hoisted_3$
|
|
877
|
+
createElementVNode("div", _hoisted_3$a, toDisplayString(props.headline), 1)
|
|
878
878
|
]),
|
|
879
|
-
props.
|
|
880
|
-
], 10, _hoisted_1$
|
|
879
|
+
props.description ? (openBlock(), createElementBlock("div", _hoisted_4$7, toDisplayString(props.description), 1)) : createCommentVNode("", true)
|
|
880
|
+
], 10, _hoisted_1$t);
|
|
881
881
|
};
|
|
882
882
|
}
|
|
883
883
|
});
|
|
884
884
|
|
|
885
|
-
const KdsInlineMessage = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
885
|
+
const KdsInlineMessage = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-3d79be7c"]]);
|
|
886
886
|
|
|
887
887
|
const kdsInlineMessageVariant = {
|
|
888
888
|
ERROR: "error",
|
|
@@ -892,11 +892,11 @@ const kdsInlineMessageVariant = {
|
|
|
892
892
|
};
|
|
893
893
|
const kdsInlineMessageVariants = Object.values(kdsInlineMessageVariant);
|
|
894
894
|
|
|
895
|
-
const _hoisted_1$
|
|
895
|
+
const _hoisted_1$s = {
|
|
896
896
|
key: 0,
|
|
897
897
|
class: "label"
|
|
898
898
|
};
|
|
899
|
-
const _sfc_main$
|
|
899
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
900
900
|
__name: "BaseButton",
|
|
901
901
|
props: {
|
|
902
902
|
size: { default: "medium" },
|
|
@@ -955,7 +955,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
955
955
|
size: iconSize.value
|
|
956
956
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
957
957
|
], true),
|
|
958
|
-
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
958
|
+
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$s, toDisplayString(props.label), 1)) : createCommentVNode("", true),
|
|
959
959
|
props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
|
|
960
960
|
key: 1,
|
|
961
961
|
name: props.trailingIcon,
|
|
@@ -968,9 +968,9 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
968
968
|
}
|
|
969
969
|
});
|
|
970
970
|
|
|
971
|
-
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
971
|
+
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-b0f9559f"]]);
|
|
972
972
|
|
|
973
|
-
const _sfc_main$
|
|
973
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
974
974
|
__name: "KdsButton",
|
|
975
975
|
props: {
|
|
976
976
|
size: {},
|
|
@@ -1023,7 +1023,7 @@ const resolveNuxtLinkComponent = () => {
|
|
|
1023
1023
|
return fallbackComponent;
|
|
1024
1024
|
};
|
|
1025
1025
|
|
|
1026
|
-
const _sfc_main$
|
|
1026
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
1027
1027
|
__name: "KdsLinkButton",
|
|
1028
1028
|
props: {
|
|
1029
1029
|
size: {},
|
|
@@ -1059,7 +1059,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
1059
1059
|
}
|
|
1060
1060
|
});
|
|
1061
1061
|
|
|
1062
|
-
const _sfc_main$
|
|
1062
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
1063
1063
|
__name: "KdsToggleButton",
|
|
1064
1064
|
props: /* @__PURE__ */ mergeModels({
|
|
1065
1065
|
size: {},
|
|
@@ -1094,9 +1094,9 @@ const kdsToggleButtonVariant = {
|
|
|
1094
1094
|
};
|
|
1095
1095
|
const kdsToggleButtonVariants = Object.values(kdsToggleButtonVariant);
|
|
1096
1096
|
|
|
1097
|
-
const _hoisted_1$
|
|
1098
|
-
const _hoisted_2$
|
|
1099
|
-
const _sfc_main$
|
|
1097
|
+
const _hoisted_1$r = ["data-visible"];
|
|
1098
|
+
const _hoisted_2$f = ["data-visible"];
|
|
1099
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
1100
1100
|
__name: "KdsProgressButton",
|
|
1101
1101
|
props: /* @__PURE__ */ mergeModels({
|
|
1102
1102
|
size: { default: "medium" },
|
|
@@ -1159,7 +1159,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
1159
1159
|
name: props.leadingIcon,
|
|
1160
1160
|
size: iconSize.value
|
|
1161
1161
|
}, null, 8, ["name", "size"])
|
|
1162
|
-
], 8, _hoisted_1$
|
|
1162
|
+
], 8, _hoisted_1$r),
|
|
1163
1163
|
createElementVNode("span", {
|
|
1164
1164
|
class: "spinner",
|
|
1165
1165
|
"data-visible": state.value === "progress"
|
|
@@ -1168,7 +1168,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
1168
1168
|
size: iconSize.value,
|
|
1169
1169
|
variant: props.variant === "filled" ? "onPrimary" : "onSurface"
|
|
1170
1170
|
}, null, 8, ["size", "variant"])
|
|
1171
|
-
], 8, _hoisted_2$
|
|
1171
|
+
], 8, _hoisted_2$f)
|
|
1172
1172
|
], 2)
|
|
1173
1173
|
]),
|
|
1174
1174
|
_: 1
|
|
@@ -1177,7 +1177,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
1177
1177
|
}
|
|
1178
1178
|
});
|
|
1179
1179
|
|
|
1180
|
-
const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1180
|
+
const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-ec08a9ba"]]);
|
|
1181
1181
|
|
|
1182
1182
|
const kdsProgressButtonState = {
|
|
1183
1183
|
DEFAULT: "default",
|
|
@@ -1187,384 +1187,1024 @@ const kdsProgressButtonState = {
|
|
|
1187
1187
|
};
|
|
1188
1188
|
const kdsProgressButtonStates = Object.values(kdsProgressButtonState);
|
|
1189
1189
|
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1190
|
+
const _hoisted_1$q = { class: "kds-empty-state" };
|
|
1191
|
+
const _hoisted_2$e = { class: "kds-empty-state-headline" };
|
|
1192
|
+
const _hoisted_3$9 = {
|
|
1193
|
+
key: 1,
|
|
1194
|
+
class: "kds-empty-state-description"
|
|
1195
1195
|
};
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
OUTLINED: "outlined",
|
|
1200
|
-
TRANSPARENT: "transparent"
|
|
1196
|
+
const _hoisted_4$6 = {
|
|
1197
|
+
key: 2,
|
|
1198
|
+
class: "kds-empty-state-action"
|
|
1201
1199
|
};
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1204
|
-
const _hoisted_1$o = { class: "kds-label-wrapper" };
|
|
1205
|
-
const _hoisted_2$c = ["id", "for", "title"];
|
|
1206
|
-
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
1207
|
-
__name: "KdsLabel",
|
|
1200
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
1201
|
+
__name: "KdsEmptyState",
|
|
1208
1202
|
props: {
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
showDescriptionButton: { type: Boolean, default: false }
|
|
1203
|
+
headline: {},
|
|
1204
|
+
description: {},
|
|
1205
|
+
button: {},
|
|
1206
|
+
loadingSpinner: { type: Boolean }
|
|
1214
1207
|
},
|
|
1215
|
-
|
|
1208
|
+
emits: ["buttonClick"],
|
|
1209
|
+
setup(__props, { emit: __emit }) {
|
|
1216
1210
|
const props = __props;
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1211
|
+
const emit = __emit;
|
|
1212
|
+
const isLinkButton = computed(
|
|
1213
|
+
() => props.button && "to" in props.button && props.button.to !== void 0
|
|
1214
|
+
);
|
|
1215
|
+
const buttonComponent = computed(
|
|
1216
|
+
() => isLinkButton.value ? _sfc_main$D : _sfc_main$E
|
|
1219
1217
|
);
|
|
1220
|
-
const labelEl = useTemplateRef("labelEl");
|
|
1221
|
-
const { isTruncated } = useKdsIsTruncated(labelEl);
|
|
1222
1218
|
return (_ctx, _cache) => {
|
|
1223
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1224
|
-
|
|
1225
|
-
id: props.id,
|
|
1226
|
-
ref_key: "labelEl",
|
|
1227
|
-
ref: labelEl,
|
|
1228
|
-
for: props.for,
|
|
1229
|
-
class: "label",
|
|
1230
|
-
title: unref(isTruncated) ? props.label : void 0
|
|
1231
|
-
}, toDisplayString(props.label), 9, _hoisted_2$c),
|
|
1232
|
-
props.description ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
|
|
1219
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
1220
|
+
props.loadingSpinner ? (openBlock(), createBlock(KdsLoadingSpinner, {
|
|
1233
1221
|
key: 0,
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1222
|
+
"data-testid": "loading-spinner",
|
|
1223
|
+
size: "large",
|
|
1224
|
+
variant: "onSurface",
|
|
1225
|
+
"aria-hidden": "true"
|
|
1226
|
+
})) : createCommentVNode("", true),
|
|
1227
|
+
createElementVNode("p", _hoisted_2$e, toDisplayString(props.headline), 1),
|
|
1228
|
+
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$9, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
1229
|
+
props.button ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
1230
|
+
(openBlock(), createBlock(resolveDynamicComponent(buttonComponent.value), mergeProps(props.button, {
|
|
1231
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick", $event))
|
|
1232
|
+
}), null, 16))
|
|
1233
|
+
])) : createCommentVNode("", true)
|
|
1237
1234
|
]);
|
|
1238
1235
|
};
|
|
1239
1236
|
}
|
|
1240
1237
|
});
|
|
1241
1238
|
|
|
1242
|
-
const
|
|
1239
|
+
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-02149081"]]);
|
|
1243
1240
|
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1246
|
-
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
1247
|
-
__name: "KdsSubText",
|
|
1241
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
1242
|
+
__name: "ListItemAccessory",
|
|
1248
1243
|
props: {
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
validating: { type: Boolean, default: false },
|
|
1253
|
-
preserveSubTextSpace: { type: Boolean, default: false }
|
|
1244
|
+
accessory: {},
|
|
1245
|
+
size: {},
|
|
1246
|
+
disabled: { type: Boolean, default: false }
|
|
1254
1247
|
},
|
|
1255
1248
|
setup(__props) {
|
|
1256
1249
|
const props = __props;
|
|
1257
1250
|
return (_ctx, _cache) => {
|
|
1258
|
-
return props.
|
|
1251
|
+
return props.accessory.type === "avatar" ? (openBlock(), createBlock(KdsAvatar, {
|
|
1259
1252
|
key: 0,
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1253
|
+
title: props.accessory.title,
|
|
1254
|
+
src: props.accessory.src,
|
|
1255
|
+
initials: props.accessory.initials,
|
|
1256
|
+
size: props.size
|
|
1257
|
+
}, null, 8, ["title", "src", "initials", "size"])) : props.accessory.type === "colorSwatch" ? (openBlock(), createBlock(KdsColorSwatch, {
|
|
1258
|
+
key: 1,
|
|
1259
|
+
color: props.accessory.color,
|
|
1260
|
+
title: props.accessory.title,
|
|
1261
|
+
size: props.size
|
|
1262
|
+
}, null, 8, ["color", "title", "size"])) : props.accessory.type === "icon" ? (openBlock(), createBlock(KdsIcon, {
|
|
1263
|
+
key: 2,
|
|
1264
|
+
name: props.accessory.name,
|
|
1265
|
+
size: props.size,
|
|
1266
|
+
disabled: props.disabled
|
|
1267
|
+
}, null, 8, ["name", "size", "disabled"])) : props.accessory.type === "dataType" ? (openBlock(), createBlock(KdsDataType, {
|
|
1268
|
+
key: 3,
|
|
1269
|
+
"icon-name": props.accessory.name,
|
|
1270
|
+
size: props.size,
|
|
1271
|
+
disabled: props.disabled
|
|
1272
|
+
}, null, 8, ["icon-name", "size", "disabled"])) : props.accessory.type === "liveStatus" ? (openBlock(), createBlock(unref(KdsLiveStatus), {
|
|
1273
|
+
key: 4,
|
|
1274
|
+
status: props.accessory.status,
|
|
1275
|
+
title: props.accessory.title,
|
|
1276
|
+
size: props.size
|
|
1277
|
+
}, null, 8, ["status", "title", "size"])) : createCommentVNode("", true);
|
|
1279
1278
|
};
|
|
1280
1279
|
}
|
|
1281
1280
|
});
|
|
1282
1281
|
|
|
1283
|
-
const
|
|
1282
|
+
const kdsListItemAccessorySize = {
|
|
1283
|
+
SMALL: "small",
|
|
1284
|
+
LARGE: "large"
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
const kdsListItemVariant = {
|
|
1288
|
+
SMALL: "small",
|
|
1289
|
+
LARGE: "large"
|
|
1290
|
+
};
|
|
1284
1291
|
|
|
1285
|
-
const _hoisted_1$
|
|
1286
|
-
const _hoisted_2$
|
|
1287
|
-
const _hoisted_3$8 = {
|
|
1292
|
+
const _hoisted_1$p = ["id", "role", "aria-selected", "aria-disabled"];
|
|
1293
|
+
const _hoisted_2$d = {
|
|
1288
1294
|
key: 0,
|
|
1289
|
-
class: "
|
|
1295
|
+
class: "accessory"
|
|
1290
1296
|
};
|
|
1291
|
-
const
|
|
1292
|
-
const
|
|
1293
|
-
const
|
|
1297
|
+
const _hoisted_3$8 = { class: "content" };
|
|
1298
|
+
const _hoisted_4$5 = ["title"];
|
|
1299
|
+
const _hoisted_5$3 = {
|
|
1294
1300
|
key: 0,
|
|
1295
|
-
class: "
|
|
1301
|
+
class: "prefix"
|
|
1296
1302
|
};
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1303
|
+
const _hoisted_6$3 = ["title"];
|
|
1304
|
+
const _hoisted_7 = {
|
|
1305
|
+
key: 1,
|
|
1306
|
+
class: "trailing-item"
|
|
1307
|
+
};
|
|
1308
|
+
const _hoisted_8 = {
|
|
1309
|
+
key: 0,
|
|
1310
|
+
class: "shortcut"
|
|
1311
|
+
};
|
|
1312
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
1313
|
+
__name: "KdsListItem",
|
|
1314
|
+
props: {
|
|
1315
|
+
id: {},
|
|
1304
1316
|
label: {},
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1317
|
+
accessory: { default: void 0 },
|
|
1318
|
+
subText: { default: void 0 },
|
|
1319
|
+
variant: { default: kdsListItemVariant.SMALL },
|
|
1320
|
+
shortcut: { default: void 0 },
|
|
1321
|
+
trailingIcon: { default: void 0 },
|
|
1322
|
+
special: { type: Boolean, default: false },
|
|
1323
|
+
selected: { type: Boolean, default: false },
|
|
1324
|
+
active: { type: Boolean, default: false },
|
|
1325
|
+
missing: { type: Boolean, default: false },
|
|
1326
|
+
disabled: { type: Boolean, default: false },
|
|
1327
|
+
role: { default: "option" }
|
|
1328
|
+
},
|
|
1329
|
+
emits: ["click"],
|
|
1330
|
+
setup(__props, { emit: __emit }) {
|
|
1313
1331
|
const props = __props;
|
|
1314
|
-
const
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
const
|
|
1319
|
-
const icon = computed(() => {
|
|
1320
|
-
if (isChecked.value) {
|
|
1321
|
-
return "checkmark";
|
|
1322
|
-
}
|
|
1323
|
-
if (isIndeterminate.value) {
|
|
1324
|
-
return "minus";
|
|
1325
|
-
}
|
|
1326
|
-
return null;
|
|
1327
|
-
});
|
|
1328
|
-
const ariaChecked = computed(() => {
|
|
1329
|
-
if (isIndeterminate.value) {
|
|
1330
|
-
return "mixed";
|
|
1331
|
-
}
|
|
1332
|
-
return isChecked.value;
|
|
1333
|
-
});
|
|
1334
|
-
const ariaDescribedBy = computed(() => {
|
|
1335
|
-
const ids = [];
|
|
1336
|
-
if (props.helperText) {
|
|
1337
|
-
ids.push(helperId);
|
|
1338
|
-
}
|
|
1339
|
-
if (props.subText) {
|
|
1340
|
-
ids.push(descriptionId);
|
|
1341
|
-
}
|
|
1342
|
-
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
1343
|
-
});
|
|
1344
|
-
const handleClick = () => {
|
|
1332
|
+
const emit = __emit;
|
|
1333
|
+
const accessorySize = computed(
|
|
1334
|
+
() => props.variant === kdsListItemVariant.LARGE ? kdsListItemAccessorySize.LARGE : kdsListItemAccessorySize.SMALL
|
|
1335
|
+
);
|
|
1336
|
+
const onClick = (event) => {
|
|
1345
1337
|
if (props.disabled) {
|
|
1338
|
+
event.stopPropagation();
|
|
1339
|
+
event.preventDefault();
|
|
1346
1340
|
return;
|
|
1347
1341
|
}
|
|
1348
|
-
|
|
1342
|
+
emit("click", event);
|
|
1349
1343
|
};
|
|
1344
|
+
const labelEl = useTemplateRef("labelEl");
|
|
1345
|
+
const { isTruncated: isLabelTruncated } = useKdsIsTruncated(labelEl);
|
|
1346
|
+
const subtextEl = useTemplateRef("subtextEl");
|
|
1347
|
+
const { isTruncated: isSubtextTruncated } = useKdsIsTruncated(subtextEl);
|
|
1350
1348
|
return (_ctx, _cache) => {
|
|
1351
|
-
return openBlock(), createElementBlock("div",
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
props.
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
"
|
|
1392
|
-
|
|
1393
|
-
},
|
|
1349
|
+
return openBlock(), createElementBlock("div", {
|
|
1350
|
+
id: props.id,
|
|
1351
|
+
role: props.role,
|
|
1352
|
+
"aria-selected": props.role === "option" ? props.selected : void 0,
|
|
1353
|
+
"aria-disabled": props.disabled,
|
|
1354
|
+
class: normalizeClass([
|
|
1355
|
+
"kds-list-item",
|
|
1356
|
+
props.variant,
|
|
1357
|
+
{
|
|
1358
|
+
selected: props.selected,
|
|
1359
|
+
active: props.active,
|
|
1360
|
+
missing: props.missing,
|
|
1361
|
+
disabled: props.disabled
|
|
1362
|
+
}
|
|
1363
|
+
]),
|
|
1364
|
+
onClick
|
|
1365
|
+
}, [
|
|
1366
|
+
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$d, [
|
|
1367
|
+
createVNode(_sfc_main$z, {
|
|
1368
|
+
accessory: props.accessory,
|
|
1369
|
+
size: accessorySize.value,
|
|
1370
|
+
disabled: props.disabled
|
|
1371
|
+
}, null, 8, ["accessory", "size", "disabled"])
|
|
1372
|
+
])) : createCommentVNode("", true),
|
|
1373
|
+
createElementVNode("span", _hoisted_3$8, [
|
|
1374
|
+
createElementVNode("span", {
|
|
1375
|
+
ref_key: "labelEl",
|
|
1376
|
+
ref: labelEl,
|
|
1377
|
+
class: "label",
|
|
1378
|
+
title: unref(isLabelTruncated) ? props.label : void 0
|
|
1379
|
+
}, [
|
|
1380
|
+
props.missing ? (openBlock(), createElementBlock("span", _hoisted_5$3, "(Missing) ")) : createCommentVNode("", true),
|
|
1381
|
+
createElementVNode("span", {
|
|
1382
|
+
class: normalizeClass({ special: props.special })
|
|
1383
|
+
}, toDisplayString(props.label), 3)
|
|
1384
|
+
], 8, _hoisted_4$5),
|
|
1385
|
+
props.subText ? (openBlock(), createElementBlock("span", {
|
|
1386
|
+
key: 0,
|
|
1387
|
+
ref_key: "subtextEl",
|
|
1388
|
+
ref: subtextEl,
|
|
1389
|
+
class: "subtext",
|
|
1390
|
+
title: unref(isSubtextTruncated) ? props.subText : void 0
|
|
1391
|
+
}, toDisplayString(props.subText), 9, _hoisted_6$3)) : createCommentVNode("", true)
|
|
1392
|
+
]),
|
|
1393
|
+
props.shortcut || props.trailingIcon ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
1394
|
+
props.shortcut ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(props.shortcut), 1)) : createCommentVNode("", true),
|
|
1395
|
+
props.trailingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
1396
|
+
key: 1,
|
|
1397
|
+
name: props.trailingIcon,
|
|
1398
|
+
size: "small"
|
|
1399
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
1394
1400
|
])) : createCommentVNode("", true)
|
|
1395
|
-
]);
|
|
1401
|
+
], 10, _hoisted_1$p);
|
|
1396
1402
|
};
|
|
1397
1403
|
}
|
|
1398
1404
|
});
|
|
1399
1405
|
|
|
1400
|
-
const
|
|
1406
|
+
const KdsListItem = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-1d081212"]]);
|
|
1401
1407
|
|
|
1402
|
-
const _sfc_main$
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1408
|
+
const _sfc_main$x = { };
|
|
1409
|
+
|
|
1410
|
+
const _hoisted_1$o = { class: "kds-list-item-divider" };
|
|
1411
|
+
|
|
1412
|
+
function _sfc_render(_ctx, _cache) {
|
|
1413
|
+
return (openBlock(), createElementBlock("hr", _hoisted_1$o))
|
|
1414
|
+
}
|
|
1415
|
+
const ListItemDivider = /*#__PURE__*/_export_sfc(_sfc_main$x, [['render',_sfc_render],['__scopeId',"data-v-3ee92695"]]);
|
|
1416
|
+
|
|
1417
|
+
const _hoisted_1$n = { class: "kds-list-item-section-title" };
|
|
1418
|
+
const _hoisted_2$c = {
|
|
1419
|
+
key: 0,
|
|
1420
|
+
class: "icon"
|
|
1421
|
+
};
|
|
1422
|
+
const _hoisted_3$7 = ["title"];
|
|
1423
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
1424
|
+
__name: "ListItemSectionTitle",
|
|
1425
|
+
props: {
|
|
1409
1426
|
label: {},
|
|
1410
|
-
|
|
1411
|
-
},
|
|
1412
|
-
"modelValue": { default: false },
|
|
1413
|
-
"modelModifiers": {}
|
|
1414
|
-
}),
|
|
1415
|
-
emits: ["update:modelValue"],
|
|
1427
|
+
leadingIcon: {}
|
|
1428
|
+
},
|
|
1416
1429
|
setup(__props) {
|
|
1417
1430
|
const props = __props;
|
|
1418
|
-
const
|
|
1431
|
+
const labelEl = useTemplateRef("labelEl");
|
|
1432
|
+
const { isTruncated } = useKdsIsTruncated(labelEl);
|
|
1419
1433
|
return (_ctx, _cache) => {
|
|
1420
|
-
return openBlock(),
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
"
|
|
1428
|
-
|
|
1429
|
-
|
|
1434
|
+
return openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
1435
|
+
props.leadingIcon ? (openBlock(), createElementBlock("span", _hoisted_2$c, [
|
|
1436
|
+
createVNode(KdsIcon, {
|
|
1437
|
+
name: props.leadingIcon,
|
|
1438
|
+
size: "small"
|
|
1439
|
+
}, null, 8, ["name"])
|
|
1440
|
+
])) : createCommentVNode("", true),
|
|
1441
|
+
createElementVNode("span", {
|
|
1442
|
+
ref_key: "labelEl",
|
|
1443
|
+
ref: labelEl,
|
|
1444
|
+
class: "label",
|
|
1445
|
+
title: unref(isTruncated) ? props.label : void 0
|
|
1446
|
+
}, toDisplayString(props.label), 9, _hoisted_3$7)
|
|
1447
|
+
]);
|
|
1430
1448
|
};
|
|
1431
1449
|
}
|
|
1432
1450
|
});
|
|
1433
1451
|
|
|
1434
|
-
const
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1452
|
+
const ListItemSectionTitle = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-53382531"]]);
|
|
1453
|
+
|
|
1454
|
+
const _hoisted_1$m = ["role", "aria-busy", "aria-label", "aria-activedescendant", "tabindex"];
|
|
1455
|
+
const _hoisted_2$b = ["role"];
|
|
1456
|
+
const loadingStateText = "Loading entries";
|
|
1457
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
1458
|
+
__name: "KdsListContainer",
|
|
1459
|
+
props: {
|
|
1440
1460
|
possibleValues: {},
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
},
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
}),
|
|
1450
|
-
emits: ["update:modelValue"],
|
|
1451
|
-
setup(__props) {
|
|
1461
|
+
emptyText: { default: "" },
|
|
1462
|
+
loading: { type: Boolean, default: false },
|
|
1463
|
+
ariaLabel: {},
|
|
1464
|
+
controlledExternally: { type: Boolean },
|
|
1465
|
+
role: { default: "listbox" }
|
|
1466
|
+
},
|
|
1467
|
+
emits: ["itemClick"],
|
|
1468
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1452
1469
|
const props = __props;
|
|
1453
|
-
const
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1470
|
+
const emit = __emit;
|
|
1471
|
+
const idPrefix = useId();
|
|
1472
|
+
const toOptionId = (elementId) => elementId.slice(idPrefix.length + 1);
|
|
1473
|
+
const emptyOptionId = `${idPrefix}-empty`;
|
|
1474
|
+
const prefixedValues = computed(
|
|
1475
|
+
() => (props.loading ? [] : props.possibleValues).map((o) => ({
|
|
1476
|
+
...o,
|
|
1477
|
+
id: `${idPrefix}-${o.id}`
|
|
1478
|
+
}))
|
|
1461
1479
|
);
|
|
1462
|
-
const
|
|
1463
|
-
|
|
1464
|
-
const isOptionDisabled = (index) => props.disabled || possibleValues.value[index]?.disabled === true;
|
|
1465
|
-
const isHorizontal = computed(() => props.alignment === "horizontal");
|
|
1466
|
-
const hasError = computed(
|
|
1467
|
-
() => props.error || possibleValues.value.some((o) => o.error)
|
|
1480
|
+
const selectableValues = computed(
|
|
1481
|
+
() => prefixedValues.value.filter((o) => !o.sectionHeadline)
|
|
1468
1482
|
);
|
|
1469
|
-
const
|
|
1470
|
-
const
|
|
1471
|
-
|
|
1483
|
+
const activeId = ref(void 0);
|
|
1484
|
+
const lastActiveId = ref(void 0);
|
|
1485
|
+
const isFocused = ref(false);
|
|
1486
|
+
const containerEl = useTemplateRef("containerEl");
|
|
1487
|
+
const listItemRole = computed(() => {
|
|
1488
|
+
return props.role === "listbox" ? "option" : "menuitem";
|
|
1489
|
+
});
|
|
1490
|
+
function scrollToView() {
|
|
1491
|
+
if (!activeId.value || !containerEl.value) {
|
|
1472
1492
|
return;
|
|
1473
1493
|
}
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1494
|
+
containerEl.value?.querySelector(`#${CSS.escape(activeId.value)}`)?.scrollIntoView({ block: "nearest" });
|
|
1495
|
+
}
|
|
1496
|
+
const onMouseLeave = () => {
|
|
1497
|
+
if (!isFocused.value) {
|
|
1498
|
+
activeId.value = void 0;
|
|
1478
1499
|
}
|
|
1479
|
-
modelValue.value = modelValue.value.filter((v) => v !== option.id);
|
|
1480
1500
|
};
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
key: 0,
|
|
1491
|
-
id: unref(labelId),
|
|
1492
|
-
label: props.label
|
|
1493
|
-
}, null, 8, ["id", "label"])) : createCommentVNode("", true),
|
|
1494
|
-
createElementVNode("div", {
|
|
1495
|
-
class: normalizeClass({ options: true, horizontal: isHorizontal.value })
|
|
1496
|
-
}, [
|
|
1497
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(possibleValues.value, (option, index) => {
|
|
1498
|
-
return openBlock(), createElementBlock("div", {
|
|
1499
|
-
key: option.id,
|
|
1500
|
-
class: "option"
|
|
1501
|
-
}, [
|
|
1502
|
-
createVNode(BaseCheckbox, {
|
|
1503
|
-
disabled: props.disabled || option.disabled,
|
|
1504
|
-
error: option.error,
|
|
1505
|
-
"helper-text": option.helperText,
|
|
1506
|
-
label: option.text,
|
|
1507
|
-
"model-value": isChecked(option.id),
|
|
1508
|
-
"onUpdate:modelValue": (checked) => handleCheckboxChange(index, checked)
|
|
1509
|
-
}, null, 8, ["disabled", "error", "helper-text", "label", "model-value", "onUpdate:modelValue"])
|
|
1510
|
-
]);
|
|
1511
|
-
}), 128))
|
|
1512
|
-
], 2),
|
|
1513
|
-
createVNode(KdsSubText, {
|
|
1514
|
-
id: unref(descriptionId),
|
|
1515
|
-
"sub-text": props.subText,
|
|
1516
|
-
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
1517
|
-
error: hasError.value
|
|
1518
|
-
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
1519
|
-
], 8, _hoisted_1$l);
|
|
1501
|
+
const onMousemove = (event) => {
|
|
1502
|
+
const target = event.target?.closest?.(
|
|
1503
|
+
`[role="${listItemRole.value}"]`
|
|
1504
|
+
);
|
|
1505
|
+
if (target instanceof HTMLElement && target.id && target.getAttribute("aria-disabled") !== "true") {
|
|
1506
|
+
activeId.value = target.id;
|
|
1507
|
+
} else if (!isFocused.value) {
|
|
1508
|
+
activeId.value = void 0;
|
|
1509
|
+
}
|
|
1520
1510
|
};
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
const
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1511
|
+
const enabledValues = computed(
|
|
1512
|
+
() => selectableValues.value.filter((o) => !o.disabled)
|
|
1513
|
+
);
|
|
1514
|
+
watch([enabledValues, () => props.loading], ([values, loading]) => {
|
|
1515
|
+
const isValid = (id) => id !== void 0 && values.some((o) => o.id === id);
|
|
1516
|
+
if (activeId.value !== void 0 && !isValid(activeId.value)) {
|
|
1517
|
+
if (values.length > 0) {
|
|
1518
|
+
activeId.value = values[0].id;
|
|
1519
|
+
} else {
|
|
1520
|
+
activeId.value = selectableValues.value.length === 0 ? emptyOptionId : void 0;
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
if (!isValid(lastActiveId.value)) {
|
|
1524
|
+
lastActiveId.value = void 0;
|
|
1525
|
+
}
|
|
1526
|
+
if (loading) {
|
|
1527
|
+
activeId.value = emptyOptionId;
|
|
1528
|
+
}
|
|
1529
|
+
nextTick(scrollToView);
|
|
1530
|
+
});
|
|
1531
|
+
const findEnabledIndex = (id) => id === void 0 ? -1 : enabledValues.value.findIndex((o) => o.id === id);
|
|
1532
|
+
const handleFocus = () => {
|
|
1533
|
+
isFocused.value = true;
|
|
1534
|
+
if (activeId.value === void 0) {
|
|
1535
|
+
activeId.value = lastActiveId.value ?? enabledValues.value[0]?.id;
|
|
1536
|
+
}
|
|
1537
|
+
};
|
|
1538
|
+
const handleBlur = () => {
|
|
1539
|
+
isFocused.value = false;
|
|
1540
|
+
lastActiveId.value = activeId.value;
|
|
1541
|
+
activeId.value = void 0;
|
|
1542
|
+
};
|
|
1543
|
+
const handleKeydown = (event) => {
|
|
1544
|
+
if (enabledValues.value.length === 0) {
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1547
|
+
const currentIndex = findEnabledIndex(activeId.value);
|
|
1548
|
+
switch (event.key) {
|
|
1549
|
+
case "ArrowDown": {
|
|
1550
|
+
const nextIndex = currentIndex < 0 || currentIndex >= enabledValues.value.length - 1 ? 0 : currentIndex + 1;
|
|
1551
|
+
activeId.value = enabledValues.value[nextIndex].id;
|
|
1552
|
+
scrollToView();
|
|
1553
|
+
event.preventDefault();
|
|
1554
|
+
break;
|
|
1555
|
+
}
|
|
1556
|
+
case "ArrowUp": {
|
|
1557
|
+
const nextIndex = currentIndex <= 0 ? enabledValues.value.length - 1 : currentIndex - 1;
|
|
1558
|
+
activeId.value = enabledValues.value[nextIndex].id;
|
|
1559
|
+
scrollToView();
|
|
1560
|
+
event.preventDefault();
|
|
1561
|
+
break;
|
|
1562
|
+
}
|
|
1563
|
+
case "Enter":
|
|
1564
|
+
if (event.target instanceof HTMLElement && ["BUTTON"].includes(event.target.tagName) && event.target.ariaExpanded === "false") {
|
|
1565
|
+
break;
|
|
1566
|
+
}
|
|
1567
|
+
if (activeId.value) {
|
|
1568
|
+
emit("itemClick", toOptionId(activeId.value));
|
|
1569
|
+
event.preventDefault();
|
|
1570
|
+
}
|
|
1571
|
+
break;
|
|
1572
|
+
case " ":
|
|
1573
|
+
if (event.target instanceof HTMLElement && ["INPUT", "TEXTAREA", "SELECT"].includes(event.target.tagName)) {
|
|
1574
|
+
break;
|
|
1575
|
+
}
|
|
1576
|
+
if (event.target instanceof HTMLElement && ["BUTTON"].includes(event.target.tagName) && event.target.ariaExpanded === "false") {
|
|
1577
|
+
break;
|
|
1578
|
+
}
|
|
1579
|
+
if (activeId.value) {
|
|
1580
|
+
emit("itemClick", toOptionId(activeId.value));
|
|
1581
|
+
event.preventDefault();
|
|
1582
|
+
}
|
|
1583
|
+
break;
|
|
1584
|
+
case "Home":
|
|
1585
|
+
activeId.value = enabledValues.value[0].id;
|
|
1586
|
+
scrollToView();
|
|
1587
|
+
event.preventDefault();
|
|
1588
|
+
break;
|
|
1589
|
+
case "End":
|
|
1590
|
+
activeId.value = enabledValues.value[enabledValues.value.length - 1].id;
|
|
1591
|
+
scrollToView();
|
|
1592
|
+
event.preventDefault();
|
|
1593
|
+
break;
|
|
1594
|
+
}
|
|
1595
|
+
};
|
|
1596
|
+
__expose({
|
|
1597
|
+
/** Forward a keydown event to the list for keyboard navigation */
|
|
1598
|
+
handleKeydown,
|
|
1599
|
+
/** Notify the list that its controlling element received focus */
|
|
1600
|
+
handleFocus,
|
|
1601
|
+
/** Notify the list that its controlling element lost focus */
|
|
1602
|
+
handleBlur,
|
|
1603
|
+
activeDescendant: activeId
|
|
1604
|
+
});
|
|
1605
|
+
return (_ctx, _cache) => {
|
|
1606
|
+
return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
|
|
1607
|
+
ref_key: "containerEl",
|
|
1608
|
+
ref: containerEl,
|
|
1609
|
+
role: props.role,
|
|
1610
|
+
"aria-busy": props.loading,
|
|
1611
|
+
"aria-label": props.ariaLabel,
|
|
1612
|
+
"aria-activedescendant": !props.controlledExternally && activeId.value ? activeId.value : void 0,
|
|
1613
|
+
class: "kds-list-container",
|
|
1614
|
+
tabindex: props.controlledExternally ? void 0 : 0
|
|
1615
|
+
}, toHandlers(
|
|
1616
|
+
props.controlledExternally ? { mousemove: onMousemove, mouseleave: onMouseLeave } : {
|
|
1617
|
+
keydown: handleKeydown,
|
|
1618
|
+
focus: handleFocus,
|
|
1619
|
+
blur: handleBlur,
|
|
1620
|
+
mousemove: onMousemove,
|
|
1621
|
+
mouseleave: onMouseLeave
|
|
1622
|
+
},
|
|
1623
|
+
true
|
|
1624
|
+
)), [
|
|
1625
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(prefixedValues.value, (item, index) => {
|
|
1626
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
1627
|
+
key: item.id
|
|
1628
|
+
}, [
|
|
1629
|
+
item.sectionHeadline ? (openBlock(), createBlock(ListItemSectionTitle, {
|
|
1630
|
+
key: 0,
|
|
1631
|
+
label: item.text,
|
|
1632
|
+
"leading-icon": item.sectionHeadlineIcon,
|
|
1633
|
+
role: "presentation",
|
|
1634
|
+
"aria-hidden": "true"
|
|
1635
|
+
}, null, 8, ["label", "leading-icon"])) : (openBlock(), createBlock(unref(KdsListItem), {
|
|
1636
|
+
key: 1,
|
|
1637
|
+
id: item.id,
|
|
1638
|
+
accessory: item.accessory,
|
|
1639
|
+
label: item.text,
|
|
1640
|
+
"sub-text": item.subText,
|
|
1641
|
+
selected: item.selected,
|
|
1642
|
+
disabled: item.disabled,
|
|
1643
|
+
active: activeId.value === item.id,
|
|
1644
|
+
special: item.special,
|
|
1645
|
+
missing: item.missing,
|
|
1646
|
+
"trailing-icon": item.selected ? "checkmark" : void 0,
|
|
1647
|
+
role: listItemRole.value,
|
|
1648
|
+
onMousedown: _cache[0] || (_cache[0] = ($event) => props.controlledExternally && $event.preventDefault()),
|
|
1649
|
+
onClick: withModifiers(($event) => emit("itemClick", toOptionId(item.id)), ["stop"])
|
|
1650
|
+
}, null, 8, ["id", "accessory", "label", "sub-text", "selected", "disabled", "active", "special", "missing", "trailing-icon", "role", "onClick"])),
|
|
1651
|
+
item.separator && index < prefixedValues.value.length - 1 ? (openBlock(), createBlock(ListItemDivider, {
|
|
1652
|
+
key: 2,
|
|
1653
|
+
role: "presentation",
|
|
1654
|
+
"aria-hidden": "true"
|
|
1655
|
+
})) : createCommentVNode("", true)
|
|
1656
|
+
], 64);
|
|
1657
|
+
}), 128)),
|
|
1658
|
+
selectableValues.value.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
1659
|
+
key: 0,
|
|
1660
|
+
id: emptyOptionId,
|
|
1661
|
+
role: listItemRole.value,
|
|
1662
|
+
"aria-disabled": "true",
|
|
1663
|
+
"aria-selected": "false",
|
|
1664
|
+
class: "kds-list-container-empty"
|
|
1665
|
+
}, [
|
|
1666
|
+
createVNode(KdsEmptyState, {
|
|
1667
|
+
headline: props.loading ? loadingStateText : props.emptyText,
|
|
1668
|
+
"loading-spinner": props.loading
|
|
1669
|
+
}, null, 8, ["headline", "loading-spinner"])
|
|
1670
|
+
], 8, _hoisted_2$b)) : createCommentVNode("", true)
|
|
1671
|
+
], 16, _hoisted_1$m);
|
|
1672
|
+
};
|
|
1673
|
+
}
|
|
1674
|
+
});
|
|
1675
|
+
|
|
1676
|
+
const KdsListContainer = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-1178b83b"]]);
|
|
1677
|
+
|
|
1678
|
+
const _hoisted_1$l = ["id", "role", "aria-label"];
|
|
1679
|
+
const _hoisted_2$a = {
|
|
1680
|
+
key: 0,
|
|
1681
|
+
class: "kds-popover-default-content"
|
|
1682
|
+
};
|
|
1683
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
1684
|
+
__name: "KdsPopover",
|
|
1685
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1686
|
+
placement: { default: "bottom-left" },
|
|
1687
|
+
role: { default: void 0 },
|
|
1688
|
+
fullWidth: { type: Boolean, default: false },
|
|
1689
|
+
popoverAriaLabel: {},
|
|
1690
|
+
content: {}
|
|
1691
|
+
}, {
|
|
1692
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
1693
|
+
"modelModifiers": {}
|
|
1694
|
+
}),
|
|
1695
|
+
emits: ["update:modelValue"],
|
|
1696
|
+
setup(__props, { expose: __expose }) {
|
|
1697
|
+
const props = __props;
|
|
1698
|
+
const open = useModel(__props, "modelValue");
|
|
1699
|
+
const popoverEl = useTemplateRef("popoverEl");
|
|
1700
|
+
const popoverId = useId();
|
|
1701
|
+
const anchorName = `--anchor-${popoverId}`;
|
|
1702
|
+
watchEffect(() => {
|
|
1703
|
+
if (open.value) {
|
|
1704
|
+
popoverEl.value?.showPopover?.();
|
|
1705
|
+
} else {
|
|
1706
|
+
popoverEl.value?.hidePopover?.();
|
|
1707
|
+
}
|
|
1708
|
+
});
|
|
1709
|
+
const anchorStyle = { "anchor-name": anchorName };
|
|
1710
|
+
__expose({ anchorStyle, popoverId });
|
|
1711
|
+
return (_ctx, _cache) => {
|
|
1712
|
+
return openBlock(), createElementBlock("div", {
|
|
1713
|
+
id: unref(popoverId),
|
|
1714
|
+
ref_key: "popoverEl",
|
|
1715
|
+
ref: popoverEl,
|
|
1716
|
+
class: normalizeClass(["kds-popover", ["floating", props.placement, { "full-width": props.fullWidth }]]),
|
|
1717
|
+
popover: "auto",
|
|
1718
|
+
style: normalizeStyle({ "position-anchor": anchorName }),
|
|
1719
|
+
role: props.role,
|
|
1720
|
+
"aria-label": props.popoverAriaLabel,
|
|
1721
|
+
onToggle: _cache[0] || (_cache[0] = ($event) => open.value = $event.newState === "open")
|
|
1722
|
+
}, [
|
|
1723
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1724
|
+
props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$a, toDisplayString(props.content), 1)) : createCommentVNode("", true)
|
|
1725
|
+
], true)
|
|
1726
|
+
], 46, _hoisted_1$l);
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
|
|
1731
|
+
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-09124386"]]);
|
|
1732
|
+
|
|
1733
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
1734
|
+
...{
|
|
1735
|
+
inheritAttrs: false
|
|
1736
|
+
},
|
|
1737
|
+
__name: "KdsMenuButton",
|
|
1738
|
+
props: {
|
|
1739
|
+
size: {},
|
|
1740
|
+
disabled: { type: Boolean },
|
|
1741
|
+
title: {},
|
|
1742
|
+
variant: { default: "outlined" },
|
|
1743
|
+
label: {},
|
|
1744
|
+
leadingIcon: {},
|
|
1745
|
+
trailingIcon: {},
|
|
1746
|
+
ariaLabel: {},
|
|
1747
|
+
items: {},
|
|
1748
|
+
menuMaxHeight: { default: void 0 }
|
|
1749
|
+
},
|
|
1750
|
+
emits: ["itemClick"],
|
|
1751
|
+
setup(__props, { emit: __emit }) {
|
|
1752
|
+
const props = __props;
|
|
1753
|
+
const attrs = useAttrs();
|
|
1754
|
+
const emit = __emit;
|
|
1755
|
+
const toggleButtonProps = computed(() => {
|
|
1756
|
+
const { items: _items, menuMaxHeight: _menuMaxHeight, ...rest } = props;
|
|
1757
|
+
const {
|
|
1758
|
+
modelValue: _modelValue,
|
|
1759
|
+
"onUpdate:modelValue": _onUpdateModelValue,
|
|
1760
|
+
...safeAttrs
|
|
1761
|
+
} = attrs;
|
|
1762
|
+
return { ...safeAttrs, ...rest };
|
|
1763
|
+
});
|
|
1764
|
+
const isMenuOpen = ref(false);
|
|
1765
|
+
const popoverEl = useTemplateRef("popoverEl");
|
|
1766
|
+
const listContainerEl = useTemplateRef("listContainerEl");
|
|
1767
|
+
const menuId = useId();
|
|
1768
|
+
const maxHeightStyle = computed(() => {
|
|
1769
|
+
if (!props.menuMaxHeight) {
|
|
1770
|
+
return {};
|
|
1771
|
+
}
|
|
1772
|
+
return {
|
|
1773
|
+
maxHeight: props.menuMaxHeight,
|
|
1774
|
+
overflowY: "auto"
|
|
1775
|
+
};
|
|
1776
|
+
});
|
|
1777
|
+
const onItemClick = (itemId) => {
|
|
1778
|
+
isMenuOpen.value = false;
|
|
1779
|
+
emit("itemClick", itemId);
|
|
1780
|
+
};
|
|
1781
|
+
return (_ctx, _cache) => {
|
|
1782
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
1783
|
+
createVNode(_sfc_main$C, mergeProps({
|
|
1784
|
+
modelValue: isMenuOpen.value,
|
|
1785
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isMenuOpen.value = $event)
|
|
1786
|
+
}, toggleButtonProps.value, {
|
|
1787
|
+
"aria-haspopup": "menu",
|
|
1788
|
+
"aria-expanded": isMenuOpen.value,
|
|
1789
|
+
"aria-controls": unref(menuId),
|
|
1790
|
+
style: popoverEl.value?.anchorStyle,
|
|
1791
|
+
onFocus: listContainerEl.value?.handleFocus,
|
|
1792
|
+
onKeydown: listContainerEl.value?.handleKeydown,
|
|
1793
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => isMenuOpen.value = false)
|
|
1794
|
+
}), null, 16, ["modelValue", "aria-expanded", "aria-controls", "style", "onFocus", "onKeydown"]),
|
|
1795
|
+
createVNode(KdsPopover, {
|
|
1796
|
+
ref_key: "popoverEl",
|
|
1797
|
+
ref: popoverEl,
|
|
1798
|
+
modelValue: isMenuOpen.value,
|
|
1799
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isMenuOpen.value = $event),
|
|
1800
|
+
placement: "bottom-left",
|
|
1801
|
+
"popover-aria-label": "Menu"
|
|
1802
|
+
}, {
|
|
1803
|
+
default: withCtx(() => [
|
|
1804
|
+
createElementVNode("div", {
|
|
1805
|
+
class: "kds-menu-container",
|
|
1806
|
+
style: normalizeStyle(maxHeightStyle.value)
|
|
1807
|
+
}, [
|
|
1808
|
+
createVNode(KdsListContainer, {
|
|
1809
|
+
id: unref(menuId),
|
|
1810
|
+
ref_key: "listContainerEl",
|
|
1811
|
+
ref: listContainerEl,
|
|
1812
|
+
"possible-values": __props.items,
|
|
1813
|
+
"empty-text": "Menu is empty",
|
|
1814
|
+
"aria-label": "Actions",
|
|
1815
|
+
role: "menu",
|
|
1816
|
+
"controlled-externally": "",
|
|
1817
|
+
onItemClick
|
|
1818
|
+
}, null, 8, ["id", "possible-values"])
|
|
1819
|
+
], 4)
|
|
1820
|
+
]),
|
|
1821
|
+
_: 1
|
|
1822
|
+
}, 8, ["modelValue"])
|
|
1823
|
+
], 64);
|
|
1824
|
+
};
|
|
1825
|
+
}
|
|
1826
|
+
});
|
|
1827
|
+
|
|
1828
|
+
const KdsMenuButton = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-23e9404d"]]);
|
|
1829
|
+
|
|
1830
|
+
const kdsButtonSize = {
|
|
1831
|
+
XSMALL: "xsmall",
|
|
1832
|
+
SMALL: "small",
|
|
1833
|
+
MEDIUM: "medium",
|
|
1834
|
+
LARGE: "large"
|
|
1835
|
+
};
|
|
1836
|
+
const kdsButtonSizes = Object.values(kdsButtonSize);
|
|
1837
|
+
const kdsButtonVariant = {
|
|
1838
|
+
FILLED: "filled",
|
|
1839
|
+
OUTLINED: "outlined",
|
|
1840
|
+
TRANSPARENT: "transparent"
|
|
1841
|
+
};
|
|
1842
|
+
const kdsButtonVariants = Object.values(kdsButtonVariant);
|
|
1843
|
+
|
|
1844
|
+
const _hoisted_1$k = { class: "kds-label-wrapper" };
|
|
1845
|
+
const _hoisted_2$9 = ["id", "for", "title"];
|
|
1846
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
1847
|
+
__name: "KdsLabel",
|
|
1848
|
+
props: {
|
|
1849
|
+
label: {},
|
|
1850
|
+
id: {},
|
|
1851
|
+
for: {},
|
|
1852
|
+
description: { default: void 0 },
|
|
1853
|
+
showDescriptionButton: { type: Boolean, default: false }
|
|
1854
|
+
},
|
|
1855
|
+
setup(__props) {
|
|
1856
|
+
const props = __props;
|
|
1857
|
+
const KdsInfoToggleButton = defineAsyncComponent(
|
|
1858
|
+
() => Promise.resolve().then(() => KdsInfoToggleButton$1)
|
|
1859
|
+
);
|
|
1860
|
+
const labelEl = useTemplateRef("labelEl");
|
|
1861
|
+
const { isTruncated } = useKdsIsTruncated(labelEl);
|
|
1862
|
+
return (_ctx, _cache) => {
|
|
1863
|
+
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
1864
|
+
createElementVNode("label", {
|
|
1865
|
+
id: props.id,
|
|
1866
|
+
ref_key: "labelEl",
|
|
1867
|
+
ref: labelEl,
|
|
1868
|
+
for: props.for,
|
|
1869
|
+
class: "label",
|
|
1870
|
+
title: unref(isTruncated) ? props.label : void 0
|
|
1871
|
+
}, toDisplayString(props.label), 9, _hoisted_2$9),
|
|
1872
|
+
props.description ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
|
|
1873
|
+
key: 0,
|
|
1874
|
+
content: props.description,
|
|
1875
|
+
hidden: !props.showDescriptionButton
|
|
1876
|
+
}, null, 8, ["content", "hidden"])) : createCommentVNode("", true)
|
|
1877
|
+
]);
|
|
1878
|
+
};
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1881
|
+
|
|
1882
|
+
const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-1a5dc1ba"]]);
|
|
1883
|
+
|
|
1884
|
+
const _hoisted_1$j = ["id"];
|
|
1885
|
+
const _hoisted_2$8 = { class: "subtext-text" };
|
|
1886
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
1887
|
+
__name: "KdsSubText",
|
|
1888
|
+
props: {
|
|
1889
|
+
id: {},
|
|
1890
|
+
subText: {},
|
|
1891
|
+
error: { type: Boolean, default: false },
|
|
1892
|
+
validating: { type: Boolean, default: false },
|
|
1893
|
+
preserveSubTextSpace: { type: Boolean, default: false }
|
|
1894
|
+
},
|
|
1895
|
+
setup(__props) {
|
|
1896
|
+
const props = __props;
|
|
1897
|
+
return (_ctx, _cache) => {
|
|
1898
|
+
return props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", {
|
|
1899
|
+
key: 0,
|
|
1900
|
+
id: props.id,
|
|
1901
|
+
class: normalizeClass({
|
|
1902
|
+
subtext: true,
|
|
1903
|
+
error: props.error
|
|
1904
|
+
})
|
|
1905
|
+
}, [
|
|
1906
|
+
props.error && props.subText ? (openBlock(), createBlock(KdsIcon, {
|
|
1907
|
+
key: 0,
|
|
1908
|
+
name: "circle-error",
|
|
1909
|
+
size: "small",
|
|
1910
|
+
"aria-label": "Error"
|
|
1911
|
+
})) : props.validating && props.subText ? (openBlock(), createBlock(KdsLoadingSpinner, {
|
|
1912
|
+
key: 1,
|
|
1913
|
+
size: "small",
|
|
1914
|
+
variant: "onSurface",
|
|
1915
|
+
"aria-hidden": "true"
|
|
1916
|
+
})) : createCommentVNode("", true),
|
|
1917
|
+
createElementVNode("span", _hoisted_2$8, toDisplayString(props.subText), 1)
|
|
1918
|
+
], 10, _hoisted_1$j)) : createCommentVNode("", true);
|
|
1919
|
+
};
|
|
1920
|
+
}
|
|
1921
|
+
});
|
|
1922
|
+
|
|
1923
|
+
const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-df9a85a4"]]);
|
|
1924
|
+
|
|
1925
|
+
const _hoisted_1$i = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
|
|
1926
|
+
const _hoisted_2$7 = { class: "control" };
|
|
1927
|
+
const _hoisted_3$6 = {
|
|
1928
|
+
key: 0,
|
|
1929
|
+
class: "content"
|
|
1930
|
+
};
|
|
1931
|
+
const _hoisted_4$4 = { class: "label" };
|
|
1932
|
+
const _hoisted_5$2 = ["id"];
|
|
1933
|
+
const _hoisted_6$2 = {
|
|
1934
|
+
key: 0,
|
|
1935
|
+
class: "subtext-wrapper"
|
|
1936
|
+
};
|
|
1937
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
1938
|
+
__name: "BaseCheckbox",
|
|
1939
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1940
|
+
disabled: { type: Boolean, default: false },
|
|
1941
|
+
error: { type: Boolean, default: false },
|
|
1942
|
+
subText: {},
|
|
1943
|
+
preserveSubTextSpace: { type: Boolean },
|
|
1944
|
+
label: {},
|
|
1945
|
+
title: {},
|
|
1946
|
+
helperText: {}
|
|
1947
|
+
}, {
|
|
1948
|
+
"modelValue": { default: false },
|
|
1949
|
+
"modelModifiers": {}
|
|
1950
|
+
}),
|
|
1951
|
+
emits: ["update:modelValue"],
|
|
1952
|
+
setup(__props) {
|
|
1953
|
+
const props = __props;
|
|
1954
|
+
const modelValue = useModel(__props, "modelValue");
|
|
1955
|
+
const helperId = useId();
|
|
1956
|
+
const descriptionId = useId();
|
|
1957
|
+
const isChecked = computed(() => modelValue.value === true);
|
|
1958
|
+
const isIndeterminate = computed(() => modelValue.value === "indeterminate");
|
|
1959
|
+
const icon = computed(() => {
|
|
1960
|
+
if (isChecked.value) {
|
|
1961
|
+
return "checkmark";
|
|
1962
|
+
}
|
|
1963
|
+
if (isIndeterminate.value) {
|
|
1964
|
+
return "minus";
|
|
1965
|
+
}
|
|
1966
|
+
return null;
|
|
1967
|
+
});
|
|
1968
|
+
const ariaChecked = computed(() => {
|
|
1969
|
+
if (isIndeterminate.value) {
|
|
1970
|
+
return "mixed";
|
|
1971
|
+
}
|
|
1972
|
+
return isChecked.value;
|
|
1973
|
+
});
|
|
1974
|
+
const ariaDescribedBy = computed(() => {
|
|
1975
|
+
const ids = [];
|
|
1976
|
+
if (props.helperText) {
|
|
1977
|
+
ids.push(helperId);
|
|
1978
|
+
}
|
|
1979
|
+
if (props.subText) {
|
|
1980
|
+
ids.push(descriptionId);
|
|
1981
|
+
}
|
|
1982
|
+
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
1983
|
+
});
|
|
1984
|
+
const handleClick = () => {
|
|
1985
|
+
if (props.disabled) {
|
|
1986
|
+
return;
|
|
1987
|
+
}
|
|
1988
|
+
modelValue.value = isIndeterminate.value ? true : !isChecked.value;
|
|
1989
|
+
};
|
|
1990
|
+
return (_ctx, _cache) => {
|
|
1991
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1992
|
+
createElementVNode("button", {
|
|
1993
|
+
class: normalizeClass({
|
|
1994
|
+
checkbox: true,
|
|
1995
|
+
checked: isChecked.value,
|
|
1996
|
+
indeterminate: isIndeterminate.value,
|
|
1997
|
+
disabled: props.disabled,
|
|
1998
|
+
error: props.error
|
|
1999
|
+
}),
|
|
2000
|
+
disabled: props.disabled,
|
|
2001
|
+
title: props.title,
|
|
2002
|
+
"aria-label": props.title,
|
|
2003
|
+
"aria-checked": ariaChecked.value,
|
|
2004
|
+
"aria-describedby": ariaDescribedBy.value,
|
|
2005
|
+
"aria-invalid": props.error,
|
|
2006
|
+
type: "button",
|
|
2007
|
+
role: "checkbox",
|
|
2008
|
+
onClick: handleClick
|
|
2009
|
+
}, [
|
|
2010
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
2011
|
+
icon.value ? (openBlock(), createBlock(KdsIcon, {
|
|
2012
|
+
key: 0,
|
|
2013
|
+
name: icon.value,
|
|
2014
|
+
class: "icon",
|
|
2015
|
+
size: "xsmall"
|
|
2016
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
2017
|
+
]),
|
|
2018
|
+
props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
2019
|
+
createElementVNode("div", _hoisted_4$4, toDisplayString(props.label), 1),
|
|
2020
|
+
props.helperText ? (openBlock(), createElementBlock("div", {
|
|
2021
|
+
key: 0,
|
|
2022
|
+
id: unref(helperId),
|
|
2023
|
+
class: "helper-text"
|
|
2024
|
+
}, toDisplayString(props.helperText), 9, _hoisted_5$2)) : createCommentVNode("", true)
|
|
2025
|
+
])) : createCommentVNode("", true)
|
|
2026
|
+
], 10, _hoisted_1$i),
|
|
2027
|
+
props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
|
|
2028
|
+
createVNode(KdsSubText, {
|
|
2029
|
+
id: unref(descriptionId),
|
|
2030
|
+
"sub-text": props.subText,
|
|
2031
|
+
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
2032
|
+
error: props.error
|
|
2033
|
+
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
2034
|
+
])) : createCommentVNode("", true)
|
|
2035
|
+
]);
|
|
2036
|
+
};
|
|
2037
|
+
}
|
|
2038
|
+
});
|
|
2039
|
+
|
|
2040
|
+
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-32f17780"]]);
|
|
2041
|
+
|
|
2042
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
2043
|
+
__name: "KdsCheckbox",
|
|
2044
|
+
props: /* @__PURE__ */ mergeModels({
|
|
2045
|
+
disabled: { type: Boolean, default: false },
|
|
2046
|
+
error: { type: Boolean, default: false },
|
|
2047
|
+
subText: {},
|
|
2048
|
+
preserveSubTextSpace: { type: Boolean, default: false },
|
|
2049
|
+
label: {},
|
|
2050
|
+
title: {}
|
|
2051
|
+
}, {
|
|
2052
|
+
"modelValue": { default: false },
|
|
2053
|
+
"modelModifiers": {}
|
|
2054
|
+
}),
|
|
2055
|
+
emits: ["update:modelValue"],
|
|
2056
|
+
setup(__props) {
|
|
2057
|
+
const props = __props;
|
|
2058
|
+
const modelValue = useModel(__props, "modelValue");
|
|
2059
|
+
return (_ctx, _cache) => {
|
|
2060
|
+
return openBlock(), createBlock(BaseCheckbox, {
|
|
2061
|
+
modelValue: modelValue.value,
|
|
2062
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
2063
|
+
disabled: props.disabled,
|
|
2064
|
+
error: props.error,
|
|
2065
|
+
label: props.label,
|
|
2066
|
+
title: props.title,
|
|
2067
|
+
"sub-text": props.subText,
|
|
2068
|
+
"preserve-sub-text-space": props.preserveSubTextSpace
|
|
2069
|
+
}, null, 8, ["modelValue", "disabled", "error", "label", "title", "sub-text", "preserve-sub-text-space"]);
|
|
2070
|
+
};
|
|
2071
|
+
}
|
|
2072
|
+
});
|
|
2073
|
+
|
|
2074
|
+
const _hoisted_1$h = ["id", "aria-labelledby", "aria-describedby"];
|
|
2075
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
2076
|
+
__name: "KdsCheckboxGroup",
|
|
2077
|
+
props: /* @__PURE__ */ mergeModels({
|
|
2078
|
+
id: {},
|
|
2079
|
+
label: {},
|
|
2080
|
+
possibleValues: {},
|
|
2081
|
+
alignment: { default: "vertical" },
|
|
2082
|
+
disabled: { type: Boolean, default: false },
|
|
2083
|
+
error: { type: Boolean, default: false },
|
|
2084
|
+
subText: {},
|
|
2085
|
+
preserveSubTextSpace: { type: Boolean }
|
|
2086
|
+
}, {
|
|
2087
|
+
"modelValue": { default: [] },
|
|
2088
|
+
"modelModifiers": {}
|
|
2089
|
+
}),
|
|
2090
|
+
emits: ["update:modelValue"],
|
|
2091
|
+
setup(__props) {
|
|
2092
|
+
const props = __props;
|
|
2093
|
+
const modelValue = useModel(__props, "modelValue");
|
|
2094
|
+
const possibleValues = computed(
|
|
2095
|
+
() => props.possibleValues.map((o) => {
|
|
2096
|
+
if (typeof o === "string") {
|
|
2097
|
+
return { text: o, id: o };
|
|
2098
|
+
}
|
|
2099
|
+
return o;
|
|
2100
|
+
})
|
|
2101
|
+
);
|
|
2102
|
+
const labelId = useId();
|
|
2103
|
+
const descriptionId = useId();
|
|
2104
|
+
const isOptionDisabled = (index) => props.disabled || possibleValues.value[index]?.disabled === true;
|
|
2105
|
+
const isHorizontal = computed(() => props.alignment === "horizontal");
|
|
2106
|
+
const hasError = computed(
|
|
2107
|
+
() => props.error || possibleValues.value.some((o) => o.error)
|
|
2108
|
+
);
|
|
2109
|
+
const isChecked = (id) => modelValue.value.includes(id);
|
|
2110
|
+
const handleCheckboxChange = (index, checked) => {
|
|
2111
|
+
if (isOptionDisabled(index)) {
|
|
2112
|
+
return;
|
|
2113
|
+
}
|
|
2114
|
+
const option = possibleValues.value[index];
|
|
2115
|
+
if (checked === true) {
|
|
2116
|
+
modelValue.value = [...modelValue.value, option.id];
|
|
2117
|
+
return;
|
|
2118
|
+
}
|
|
2119
|
+
modelValue.value = modelValue.value.filter((v) => v !== option.id);
|
|
2120
|
+
};
|
|
2121
|
+
return (_ctx, _cache) => {
|
|
2122
|
+
return openBlock(), createElementBlock("div", {
|
|
2123
|
+
id: props.id,
|
|
2124
|
+
class: "checkbox-group",
|
|
2125
|
+
role: "group",
|
|
2126
|
+
"aria-labelledby": props.label ? unref(labelId) : void 0,
|
|
2127
|
+
"aria-describedby": props.subText ? unref(descriptionId) : void 0
|
|
2128
|
+
}, [
|
|
2129
|
+
props.label ? (openBlock(), createBlock(KdsLabel, {
|
|
2130
|
+
key: 0,
|
|
2131
|
+
id: unref(labelId),
|
|
2132
|
+
label: props.label
|
|
2133
|
+
}, null, 8, ["id", "label"])) : createCommentVNode("", true),
|
|
2134
|
+
createElementVNode("div", {
|
|
2135
|
+
class: normalizeClass({ options: true, horizontal: isHorizontal.value })
|
|
2136
|
+
}, [
|
|
2137
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(possibleValues.value, (option, index) => {
|
|
2138
|
+
return openBlock(), createElementBlock("div", {
|
|
2139
|
+
key: option.id,
|
|
2140
|
+
class: "option"
|
|
2141
|
+
}, [
|
|
2142
|
+
createVNode(BaseCheckbox, {
|
|
2143
|
+
disabled: props.disabled || option.disabled,
|
|
2144
|
+
error: option.error,
|
|
2145
|
+
"helper-text": option.helperText,
|
|
2146
|
+
label: option.text,
|
|
2147
|
+
"model-value": isChecked(option.id),
|
|
2148
|
+
"onUpdate:modelValue": (checked) => handleCheckboxChange(index, checked)
|
|
2149
|
+
}, null, 8, ["disabled", "error", "helper-text", "label", "model-value", "onUpdate:modelValue"])
|
|
2150
|
+
]);
|
|
2151
|
+
}), 128))
|
|
2152
|
+
], 2),
|
|
2153
|
+
createVNode(KdsSubText, {
|
|
2154
|
+
id: unref(descriptionId),
|
|
2155
|
+
"sub-text": props.subText,
|
|
2156
|
+
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
2157
|
+
error: hasError.value
|
|
2158
|
+
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
2159
|
+
], 8, _hoisted_1$h);
|
|
2160
|
+
};
|
|
2161
|
+
}
|
|
2162
|
+
});
|
|
2163
|
+
|
|
2164
|
+
const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-c38eeda5"]]);
|
|
2165
|
+
|
|
2166
|
+
const kdsCheckboxGroupAlignment = {
|
|
2167
|
+
VERTICAL: "vertical",
|
|
2168
|
+
HORIZONTAL: "horizontal"
|
|
2169
|
+
};
|
|
2170
|
+
const kdsCheckboxGroupAlignments = Object.values(
|
|
2171
|
+
kdsCheckboxGroupAlignment
|
|
2172
|
+
);
|
|
2173
|
+
const kdsCheckboxValue = {
|
|
2174
|
+
CHECKED: true,
|
|
2175
|
+
UNCHECKED: false,
|
|
2176
|
+
INDETERMINATE: "indeterminate"
|
|
2177
|
+
};
|
|
2178
|
+
const kdsCheckboxValues = Object.values(kdsCheckboxValue);
|
|
2179
|
+
|
|
2180
|
+
const _hoisted_1$g = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
|
|
2181
|
+
const _hoisted_2$6 = { class: "control" };
|
|
2182
|
+
const _hoisted_3$5 = {
|
|
2183
|
+
key: 0,
|
|
2184
|
+
class: "dot",
|
|
2185
|
+
viewBox: "0 0 2 2",
|
|
2186
|
+
"aria-hidden": "true",
|
|
2187
|
+
focusable: "false"
|
|
2188
|
+
};
|
|
2189
|
+
const _hoisted_4$3 = { class: "content" };
|
|
2190
|
+
const _hoisted_5$1 = { class: "label" };
|
|
2191
|
+
const _hoisted_6$1 = ["id"];
|
|
2192
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2193
|
+
__name: "KdsRadioButton",
|
|
2194
|
+
props: /* @__PURE__ */ mergeModels({
|
|
2195
|
+
text: {},
|
|
2196
|
+
helperText: {},
|
|
2197
|
+
disabled: { type: Boolean, default: false },
|
|
2198
|
+
error: { type: Boolean, default: false }
|
|
2199
|
+
}, {
|
|
2200
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
2201
|
+
"modelModifiers": {}
|
|
2202
|
+
}),
|
|
2203
|
+
emits: ["update:modelValue"],
|
|
2204
|
+
setup(__props) {
|
|
2205
|
+
const props = __props;
|
|
2206
|
+
const modelValue = useModel(__props, "modelValue");
|
|
2207
|
+
const id = useId();
|
|
1568
2208
|
const handleClick = () => {
|
|
1569
2209
|
if (props.disabled) {
|
|
1570
2210
|
return;
|
|
@@ -1589,8 +2229,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1589
2229
|
type: "button",
|
|
1590
2230
|
onClick: handleClick
|
|
1591
2231
|
}, [
|
|
1592
|
-
createElementVNode("div", _hoisted_2$
|
|
1593
|
-
modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$
|
|
2232
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
2233
|
+
modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$5, [..._cache[0] || (_cache[0] = [
|
|
1594
2234
|
createElementVNode("circle", {
|
|
1595
2235
|
cx: "1",
|
|
1596
2236
|
cy: "1",
|
|
@@ -1598,20 +2238,20 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1598
2238
|
}, null, -1)
|
|
1599
2239
|
])])) : createCommentVNode("", true)
|
|
1600
2240
|
]),
|
|
1601
|
-
createElementVNode("div", _hoisted_4$
|
|
1602
|
-
createElementVNode("div", _hoisted_5$
|
|
2241
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
2242
|
+
createElementVNode("div", _hoisted_5$1, toDisplayString(props.text), 1),
|
|
1603
2243
|
props.helperText ? (openBlock(), createElementBlock("div", {
|
|
1604
2244
|
key: 0,
|
|
1605
2245
|
id: `${unref(id)}-helper`,
|
|
1606
2246
|
class: "helper-text"
|
|
1607
|
-
}, toDisplayString(props.helperText), 9, _hoisted_6$
|
|
2247
|
+
}, toDisplayString(props.helperText), 9, _hoisted_6$1)) : createCommentVNode("", true)
|
|
1608
2248
|
])
|
|
1609
|
-
], 10, _hoisted_1$
|
|
2249
|
+
], 10, _hoisted_1$g);
|
|
1610
2250
|
};
|
|
1611
2251
|
}
|
|
1612
2252
|
});
|
|
1613
2253
|
|
|
1614
|
-
const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2254
|
+
const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-27c361e4"]]);
|
|
1615
2255
|
|
|
1616
2256
|
const useRadioSelection = ({
|
|
1617
2257
|
selectedId,
|
|
@@ -1733,8 +2373,8 @@ const useRadioSelection = ({
|
|
|
1733
2373
|
};
|
|
1734
2374
|
};
|
|
1735
2375
|
|
|
1736
|
-
const _hoisted_1$
|
|
1737
|
-
const _sfc_main$
|
|
2376
|
+
const _hoisted_1$f = ["id", "aria-labelledby", "aria-describedby"];
|
|
2377
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
1738
2378
|
__name: "KdsRadioButtonGroup",
|
|
1739
2379
|
props: /* @__PURE__ */ mergeModels({
|
|
1740
2380
|
id: {},
|
|
@@ -1813,15 +2453,15 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1813
2453
|
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
1814
2454
|
error: unref(hasError)
|
|
1815
2455
|
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
1816
|
-
], 8, _hoisted_1$
|
|
2456
|
+
], 8, _hoisted_1$f);
|
|
1817
2457
|
};
|
|
1818
2458
|
}
|
|
1819
2459
|
});
|
|
1820
2460
|
|
|
1821
|
-
const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2461
|
+
const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-9cc4dcdd"]]);
|
|
1822
2462
|
|
|
1823
|
-
const _hoisted_1$
|
|
1824
|
-
const _sfc_main$
|
|
2463
|
+
const _hoisted_1$e = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
|
|
2464
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
1825
2465
|
__name: "ValueSwitchItem",
|
|
1826
2466
|
props: {
|
|
1827
2467
|
selected: { type: Boolean },
|
|
@@ -1871,12 +2511,12 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1871
2511
|
name: props.trailingIcon,
|
|
1872
2512
|
size: props.size
|
|
1873
2513
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
1874
|
-
], 10, _hoisted_1$
|
|
2514
|
+
], 10, _hoisted_1$e);
|
|
1875
2515
|
};
|
|
1876
2516
|
}
|
|
1877
2517
|
});
|
|
1878
2518
|
|
|
1879
|
-
const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2519
|
+
const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-93f3f577"]]);
|
|
1880
2520
|
|
|
1881
2521
|
const useValueSwitchIconHiding = ({
|
|
1882
2522
|
width,
|
|
@@ -1927,8 +2567,8 @@ const useValueSwitchIconHiding = ({
|
|
|
1927
2567
|
};
|
|
1928
2568
|
};
|
|
1929
2569
|
|
|
1930
|
-
const _hoisted_1$
|
|
1931
|
-
const _sfc_main$
|
|
2570
|
+
const _hoisted_1$d = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
|
|
2571
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
1932
2572
|
__name: "KdsValueSwitch",
|
|
1933
2573
|
props: /* @__PURE__ */ mergeModels({
|
|
1934
2574
|
id: {},
|
|
@@ -2013,95 +2653,40 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2013
2653
|
onClick: () => unref(handleClick)(index),
|
|
2014
2654
|
onKeydown: ($event) => unref(handleKeyDown)($event, index)
|
|
2015
2655
|
}), null, 16, ["hide-icons", "selected", "disabled", "size", "variant", "tab-index", "title", "onClick", "onKeydown"]);
|
|
2016
|
-
}), 128))
|
|
2017
|
-
], 2),
|
|
2018
|
-
createVNode(KdsSubText, {
|
|
2019
|
-
id: unref(descriptionId),
|
|
2020
|
-
"sub-text": props.subText,
|
|
2021
|
-
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
2022
|
-
error: props.error
|
|
2023
|
-
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
2024
|
-
], 10, _hoisted_1$
|
|
2025
|
-
};
|
|
2026
|
-
}
|
|
2027
|
-
});
|
|
2028
|
-
|
|
2029
|
-
const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-666d4c10"]]);
|
|
2030
|
-
|
|
2031
|
-
const kdsRadioButtonGroupAlignment = {
|
|
2032
|
-
VERTICAL: "vertical",
|
|
2033
|
-
HORIZONTAL: "horizontal"
|
|
2034
|
-
};
|
|
2035
|
-
const kdsRadioButtonGroupAlignments = Object.values(
|
|
2036
|
-
kdsRadioButtonGroupAlignment
|
|
2037
|
-
);
|
|
2038
|
-
const kdsValueSwitchSize = {
|
|
2039
|
-
SMALL: "small",
|
|
2040
|
-
MEDIUM: "medium"
|
|
2041
|
-
};
|
|
2042
|
-
const kdsValueSwitchSizes = Object.values(kdsValueSwitchSize);
|
|
2043
|
-
const kdsValueSwitchVariant = {
|
|
2044
|
-
DEFAULT: "default",
|
|
2045
|
-
MUTED: "muted"
|
|
2046
|
-
};
|
|
2047
|
-
const kdsValueSwitchVariants = Object.values(kdsValueSwitchVariant);
|
|
2048
|
-
|
|
2049
|
-
const _hoisted_1$g = ["id", "role", "aria-label"];
|
|
2050
|
-
const _hoisted_2$8 = {
|
|
2051
|
-
key: 0,
|
|
2052
|
-
class: "kds-popover-default-content"
|
|
2053
|
-
};
|
|
2054
|
-
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
2055
|
-
__name: "KdsPopover",
|
|
2056
|
-
props: /* @__PURE__ */ mergeModels({
|
|
2057
|
-
placement: { default: "bottom-left" },
|
|
2058
|
-
role: { default: "dialog" },
|
|
2059
|
-
fullWidth: { type: Boolean, default: false },
|
|
2060
|
-
popoverAriaLabel: {},
|
|
2061
|
-
content: {}
|
|
2062
|
-
}, {
|
|
2063
|
-
"modelValue": { type: Boolean, ...{ default: false } },
|
|
2064
|
-
"modelModifiers": {}
|
|
2065
|
-
}),
|
|
2066
|
-
emits: ["update:modelValue"],
|
|
2067
|
-
setup(__props, { expose: __expose }) {
|
|
2068
|
-
const props = __props;
|
|
2069
|
-
const open = useModel(__props, "modelValue");
|
|
2070
|
-
const popoverEl = useTemplateRef("popoverEl");
|
|
2071
|
-
const popoverId = useId();
|
|
2072
|
-
const anchorName = `--anchor-${popoverId}`;
|
|
2073
|
-
watchEffect(() => {
|
|
2074
|
-
if (open.value) {
|
|
2075
|
-
popoverEl.value?.showPopover?.();
|
|
2076
|
-
} else {
|
|
2077
|
-
popoverEl.value?.hidePopover?.();
|
|
2078
|
-
}
|
|
2079
|
-
});
|
|
2080
|
-
const anchorStyle = { "anchor-name": anchorName };
|
|
2081
|
-
__expose({ anchorStyle, popoverId });
|
|
2082
|
-
return (_ctx, _cache) => {
|
|
2083
|
-
return openBlock(), createElementBlock("div", {
|
|
2084
|
-
id: unref(popoverId),
|
|
2085
|
-
ref_key: "popoverEl",
|
|
2086
|
-
ref: popoverEl,
|
|
2087
|
-
class: normalizeClass(["kds-popover", ["floating", props.placement, { "full-width": props.fullWidth }]]),
|
|
2088
|
-
popover: "auto",
|
|
2089
|
-
style: normalizeStyle({ "position-anchor": anchorName }),
|
|
2090
|
-
role: props.role,
|
|
2091
|
-
"aria-label": props.popoverAriaLabel,
|
|
2092
|
-
onToggle: _cache[0] || (_cache[0] = ($event) => open.value = $event.newState === "open")
|
|
2093
|
-
}, [
|
|
2094
|
-
open.value ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
2095
|
-
props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$8, toDisplayString(props.content), 1)) : createCommentVNode("", true)
|
|
2096
|
-
], true) : createCommentVNode("", true)
|
|
2097
|
-
], 46, _hoisted_1$g);
|
|
2656
|
+
}), 128))
|
|
2657
|
+
], 2),
|
|
2658
|
+
createVNode(KdsSubText, {
|
|
2659
|
+
id: unref(descriptionId),
|
|
2660
|
+
"sub-text": props.subText,
|
|
2661
|
+
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
2662
|
+
error: props.error
|
|
2663
|
+
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
2664
|
+
], 10, _hoisted_1$d);
|
|
2098
2665
|
};
|
|
2099
2666
|
}
|
|
2100
2667
|
});
|
|
2101
2668
|
|
|
2102
|
-
const
|
|
2669
|
+
const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-666d4c10"]]);
|
|
2103
2670
|
|
|
2104
|
-
const
|
|
2671
|
+
const kdsRadioButtonGroupAlignment = {
|
|
2672
|
+
VERTICAL: "vertical",
|
|
2673
|
+
HORIZONTAL: "horizontal"
|
|
2674
|
+
};
|
|
2675
|
+
const kdsRadioButtonGroupAlignments = Object.values(
|
|
2676
|
+
kdsRadioButtonGroupAlignment
|
|
2677
|
+
);
|
|
2678
|
+
const kdsValueSwitchSize = {
|
|
2679
|
+
SMALL: "small",
|
|
2680
|
+
MEDIUM: "medium"
|
|
2681
|
+
};
|
|
2682
|
+
const kdsValueSwitchSizes = Object.values(kdsValueSwitchSize);
|
|
2683
|
+
const kdsValueSwitchVariant = {
|
|
2684
|
+
DEFAULT: "default",
|
|
2685
|
+
MUTED: "muted"
|
|
2686
|
+
};
|
|
2687
|
+
const kdsValueSwitchVariants = Object.values(kdsValueSwitchVariant);
|
|
2688
|
+
|
|
2689
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
2105
2690
|
__name: "BaseFormFieldWrapper",
|
|
2106
2691
|
props: {
|
|
2107
2692
|
id: {},
|
|
@@ -2153,27 +2738,27 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2153
2738
|
}
|
|
2154
2739
|
});
|
|
2155
2740
|
|
|
2156
|
-
const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2741
|
+
const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-5d99c134"]]);
|
|
2157
2742
|
|
|
2158
|
-
const _hoisted_1$
|
|
2743
|
+
const _hoisted_1$c = {
|
|
2159
2744
|
key: 0,
|
|
2160
2745
|
class: "icon-wrapper leading"
|
|
2161
2746
|
};
|
|
2162
|
-
const _hoisted_2$
|
|
2747
|
+
const _hoisted_2$5 = {
|
|
2163
2748
|
key: 1,
|
|
2164
2749
|
class: "leading-slot"
|
|
2165
2750
|
};
|
|
2166
|
-
const _hoisted_3$
|
|
2167
|
-
const _hoisted_4$
|
|
2168
|
-
const _hoisted_5
|
|
2751
|
+
const _hoisted_3$4 = ["id", "value", "type", "inputmode", "placeholder", "disabled", "autocomplete", "min", "max", "step", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "role", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext", "aria-activedescendant"];
|
|
2752
|
+
const _hoisted_4$2 = ["aria-disabled"];
|
|
2753
|
+
const _hoisted_5 = {
|
|
2169
2754
|
key: 4,
|
|
2170
2755
|
class: "trailing-slot"
|
|
2171
2756
|
};
|
|
2172
|
-
const _hoisted_6
|
|
2757
|
+
const _hoisted_6 = {
|
|
2173
2758
|
key: 5,
|
|
2174
2759
|
class: "icon-wrapper trailing"
|
|
2175
2760
|
};
|
|
2176
|
-
const _sfc_main$
|
|
2761
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2177
2762
|
__name: "BaseInput",
|
|
2178
2763
|
props: /* @__PURE__ */ mergeModels({
|
|
2179
2764
|
id: { default: void 0 },
|
|
@@ -2247,13 +2832,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2247
2832
|
}),
|
|
2248
2833
|
onClick: handleContainerClick
|
|
2249
2834
|
}, [
|
|
2250
|
-
props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2835
|
+
props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
2251
2836
|
props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
2252
2837
|
key: 0,
|
|
2253
2838
|
name: props.leadingIcon
|
|
2254
2839
|
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
2255
2840
|
])) : createCommentVNode("", true),
|
|
2256
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2841
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
2257
2842
|
renderSlot(_ctx.$slots, "leading", {}, void 0, true)
|
|
2258
2843
|
])) : createCommentVNode("", true),
|
|
2259
2844
|
createElementVNode("input", {
|
|
@@ -2284,7 +2869,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2284
2869
|
onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur", $event)),
|
|
2285
2870
|
onKeydown: _cache[2] || (_cache[2] = ($event) => emit("keydown", $event)),
|
|
2286
2871
|
onClick: _cache[3] || (_cache[3] = ($event) => emit("click", $event))
|
|
2287
|
-
}, null, 42, _hoisted_3$
|
|
2872
|
+
}, null, 42, _hoisted_3$4),
|
|
2288
2873
|
props.unit ? (openBlock(), createElementBlock("span", {
|
|
2289
2874
|
key: 2,
|
|
2290
2875
|
class: normalizeClass({
|
|
@@ -2293,8 +2878,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2293
2878
|
disabled: props.disabled
|
|
2294
2879
|
}),
|
|
2295
2880
|
"aria-disabled": props.disabled || void 0
|
|
2296
|
-
}, toDisplayString(props.unit), 11, _hoisted_4$
|
|
2297
|
-
props.clearable && hasValue.value && !props.disabled ? (openBlock(), createBlock(_sfc_main$
|
|
2881
|
+
}, toDisplayString(props.unit), 11, _hoisted_4$2)) : createCommentVNode("", true),
|
|
2882
|
+
props.clearable && hasValue.value && !props.disabled ? (openBlock(), createBlock(_sfc_main$E, {
|
|
2298
2883
|
key: 3,
|
|
2299
2884
|
class: "clear-button",
|
|
2300
2885
|
type: "button",
|
|
@@ -2305,10 +2890,10 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2305
2890
|
title: "Clear",
|
|
2306
2891
|
onClick: withModifiers(clearAndFocusInput, ["stop"])
|
|
2307
2892
|
})) : createCommentVNode("", true),
|
|
2308
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_5
|
|
2893
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2309
2894
|
renderSlot(_ctx.$slots, "trailing", {}, void 0, true)
|
|
2310
2895
|
])) : createCommentVNode("", true),
|
|
2311
|
-
props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_6
|
|
2896
|
+
props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
2312
2897
|
createVNode(KdsIcon, {
|
|
2313
2898
|
name: props.trailingIcon
|
|
2314
2899
|
}, null, 8, ["name"])
|
|
@@ -2318,9 +2903,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2318
2903
|
}
|
|
2319
2904
|
});
|
|
2320
2905
|
|
|
2321
|
-
const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2906
|
+
const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-fad4fd1f"]]);
|
|
2322
2907
|
|
|
2323
|
-
const _sfc_main$
|
|
2908
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
2324
2909
|
__name: "KdsTextInput",
|
|
2325
2910
|
props: /* @__PURE__ */ mergeModels({
|
|
2326
2911
|
description: {},
|
|
@@ -2526,9 +3111,9 @@ const usePointerHandler = (updateFromEvent) => {
|
|
|
2526
3111
|
};
|
|
2527
3112
|
};
|
|
2528
3113
|
|
|
2529
|
-
const _hoisted_1$
|
|
2530
|
-
const _hoisted_2$
|
|
2531
|
-
const _hoisted_3$
|
|
3114
|
+
const _hoisted_1$b = { class: "kds-color-picker" };
|
|
3115
|
+
const _hoisted_2$4 = ["aria-valuetext"];
|
|
3116
|
+
const _hoisted_3$3 = ["aria-valuenow", "aria-valuetext"];
|
|
2532
3117
|
const DEFAULT_HUE_DEG = 270;
|
|
2533
3118
|
const DEFAULT_SATURATION = 0.8;
|
|
2534
3119
|
const DEFAULT_VALUE = 0.9;
|
|
@@ -2540,7 +3125,7 @@ const KEYBOARD_LARGE_STEP = 0.1;
|
|
|
2540
3125
|
const HUE_KEYBOARD_STEP_DEG = 1;
|
|
2541
3126
|
const HUE_KEYBOARD_LARGE_STEP_DEG = 10;
|
|
2542
3127
|
const TO_BOTTOM_GRADIENT = "linear-gradient(to bottom, transparent, black)";
|
|
2543
|
-
const _sfc_main$
|
|
3128
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
2544
3129
|
__name: "ColorPicker",
|
|
2545
3130
|
props: {
|
|
2546
3131
|
"modelValue": { default: "" },
|
|
@@ -2691,7 +3276,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2691
3276
|
}
|
|
2692
3277
|
};
|
|
2693
3278
|
return (_ctx, _cache) => {
|
|
2694
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3279
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
2695
3280
|
createElementVNode("div", {
|
|
2696
3281
|
ref_key: "colorspaceEl",
|
|
2697
3282
|
ref: colorspaceEl,
|
|
@@ -2722,7 +3307,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2722
3307
|
class: "handle",
|
|
2723
3308
|
style: normalizeStyle(colorspaceHandleStyle.value)
|
|
2724
3309
|
}, null, 4)
|
|
2725
|
-
], 44, _hoisted_2$
|
|
3310
|
+
], 44, _hoisted_2$4),
|
|
2726
3311
|
createElementVNode("div", {
|
|
2727
3312
|
ref_key: "hueEl",
|
|
2728
3313
|
ref: hueEl,
|
|
@@ -2754,8 +3339,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2754
3339
|
class: "handle",
|
|
2755
3340
|
style: normalizeStyle(hueHandleStyle.value)
|
|
2756
3341
|
}, null, 4)
|
|
2757
|
-
], 40, _hoisted_3$
|
|
2758
|
-
createVNode(_sfc_main$
|
|
3342
|
+
], 40, _hoisted_3$3),
|
|
3343
|
+
createVNode(_sfc_main$h, {
|
|
2759
3344
|
"model-value": modelValue.value,
|
|
2760
3345
|
"aria-label": "Color hex value",
|
|
2761
3346
|
placeholder: "#FFFFFF",
|
|
@@ -2766,7 +3351,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2766
3351
|
}
|
|
2767
3352
|
});
|
|
2768
3353
|
|
|
2769
|
-
const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3354
|
+
const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-180fafdd"]]);
|
|
2770
3355
|
|
|
2771
3356
|
const HEX_LENGTH_1 = 1;
|
|
2772
3357
|
const HEX_LENGTH_2 = 2;
|
|
@@ -2826,7 +3411,7 @@ const useColorInputValidationOnFocusOut = (modelValue) => {
|
|
|
2826
3411
|
return { handleFocusOut };
|
|
2827
3412
|
};
|
|
2828
3413
|
|
|
2829
|
-
const _sfc_main$
|
|
3414
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2830
3415
|
__name: "KdsColorInput",
|
|
2831
3416
|
props: /* @__PURE__ */ mergeModels({
|
|
2832
3417
|
description: {},
|
|
@@ -2854,6 +3439,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2854
3439
|
() => normalizeHexColor(modelValue.value) ?? "#FFFFFF"
|
|
2855
3440
|
);
|
|
2856
3441
|
const { handleFocusOut } = useColorInputValidationOnFocusOut(modelValue);
|
|
3442
|
+
const onClickColorSwatch = () => {
|
|
3443
|
+
if (!props.disabled) {
|
|
3444
|
+
open.value = !open.value;
|
|
3445
|
+
}
|
|
3446
|
+
};
|
|
2857
3447
|
return (_ctx, _cache) => {
|
|
2858
3448
|
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
2859
3449
|
default: withCtx((slotProps) => [
|
|
@@ -2874,11 +3464,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2874
3464
|
createVNode(KdsColorSwatch, {
|
|
2875
3465
|
size: "large",
|
|
2876
3466
|
color: swatchColor.value,
|
|
2877
|
-
"aria-hidden": true
|
|
2878
|
-
|
|
3467
|
+
"aria-hidden": true,
|
|
3468
|
+
style: normalizeStyle({ cursor: props.disabled ? "default" : "pointer" }),
|
|
3469
|
+
onClick: onClickColorSwatch
|
|
3470
|
+
}, null, 8, ["color", "style"])
|
|
2879
3471
|
]),
|
|
2880
3472
|
trailing: withCtx(() => [
|
|
2881
|
-
createVNode(unref(_sfc_main$
|
|
3473
|
+
createVNode(unref(_sfc_main$C), {
|
|
2882
3474
|
modelValue: open.value,
|
|
2883
3475
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
2884
3476
|
size: "xsmall",
|
|
@@ -2899,6 +3491,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
2899
3491
|
modelValue: open.value,
|
|
2900
3492
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => open.value = $event),
|
|
2901
3493
|
placement: "bottom-right",
|
|
3494
|
+
role: "dialog",
|
|
2902
3495
|
"popover-aria-label": "Color picker"
|
|
2903
3496
|
}, {
|
|
2904
3497
|
default: withCtx(() => [
|
|
@@ -3039,7 +3632,7 @@ const createKdsNumberParser = (params) => {
|
|
|
3039
3632
|
};
|
|
3040
3633
|
};
|
|
3041
3634
|
|
|
3042
|
-
const _sfc_main$
|
|
3635
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
3043
3636
|
__name: "KdsNumberInput",
|
|
3044
3637
|
props: /* @__PURE__ */ mergeModels({
|
|
3045
3638
|
description: {},
|
|
@@ -3192,7 +3785,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
3192
3785
|
onBlur: handleBlur
|
|
3193
3786
|
}), {
|
|
3194
3787
|
trailing: withCtx(() => [
|
|
3195
|
-
createVNode(_sfc_main$
|
|
3788
|
+
createVNode(_sfc_main$E, {
|
|
3196
3789
|
type: "button",
|
|
3197
3790
|
size: "xsmall",
|
|
3198
3791
|
variant: "outlined",
|
|
@@ -3201,7 +3794,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
3201
3794
|
disabled: !canDecrease.value,
|
|
3202
3795
|
onClick: _cache[0] || (_cache[0] = ($event) => adjustByStep(-1))
|
|
3203
3796
|
}, null, 8, ["aria-label", "disabled"]),
|
|
3204
|
-
createVNode(_sfc_main$
|
|
3797
|
+
createVNode(_sfc_main$E, {
|
|
3205
3798
|
type: "button",
|
|
3206
3799
|
size: "xsmall",
|
|
3207
3800
|
variant: "outlined",
|
|
@@ -3270,227 +3863,45 @@ const CASE_INSENSITIVE_PREFIX = "(?i:";
|
|
|
3270
3863
|
const stripOuterGroup = (pattern, prefix) => {
|
|
3271
3864
|
const trimmed = pattern.trim();
|
|
3272
3865
|
if (trimmed.startsWith(prefix) && trimmed.endsWith(")")) {
|
|
3273
|
-
return trimmed.slice(prefix.length, -1);
|
|
3274
|
-
}
|
|
3275
|
-
return trimmed;
|
|
3276
|
-
};
|
|
3277
|
-
const buildRegexFromPatternInput = (input, options) => {
|
|
3278
|
-
const body = options.useRegex ? input : wildcardToRegexBody(input);
|
|
3279
|
-
const grouped = `(?:${body})`;
|
|
3280
|
-
const withCase = options.caseSensitive ? grouped : `${CASE_INSENSITIVE_PREFIX}${grouped})`;
|
|
3281
|
-
if (!options.excludeMatches) {
|
|
3282
|
-
return withCase;
|
|
3283
|
-
}
|
|
3284
|
-
return `^(?!.*${withCase}).*$`;
|
|
3285
|
-
};
|
|
3286
|
-
const stripOuterNonCapturingGroup = (pattern) => stripOuterGroup(pattern, "(?:");
|
|
3287
|
-
const stripCaseInsensitiveWrapper = (pattern) => stripOuterGroup(pattern, CASE_INSENSITIVE_PREFIX);
|
|
3288
|
-
const tryParseExcluded = (regex) => {
|
|
3289
|
-
const match = regex.trim().match(/^\^\(\?!\.\*([\s\S]*)\)\.\*\$$/);
|
|
3290
|
-
if (!match) {
|
|
3291
|
-
return {};
|
|
3292
|
-
}
|
|
3293
|
-
return { excludedInner: match[1] };
|
|
3294
|
-
};
|
|
3295
|
-
const parseRegexToPatternInputValue = (regex, options) => {
|
|
3296
|
-
if (regex === "") {
|
|
3297
|
-
return "";
|
|
3298
|
-
}
|
|
3299
|
-
const { excludedInner } = tryParseExcluded(regex);
|
|
3300
|
-
const inner = excludedInner === void 0 ? regex : excludedInner;
|
|
3301
|
-
const withoutCase = options.caseSensitive ? inner : stripCaseInsensitiveWrapper(inner);
|
|
3302
|
-
const body = stripOuterNonCapturingGroup(withoutCase);
|
|
3303
|
-
if (options.useRegex) {
|
|
3304
|
-
return body;
|
|
3305
|
-
}
|
|
3306
|
-
const wildcard = regexBodyToWildcard(body);
|
|
3307
|
-
return wildcard ?? body;
|
|
3308
|
-
};
|
|
3309
|
-
|
|
3310
|
-
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
3311
|
-
__name: "KdsPatternInput",
|
|
3312
|
-
props: /* @__PURE__ */ mergeModels({
|
|
3313
|
-
description: {},
|
|
3314
|
-
label: {},
|
|
3315
|
-
ariaLabel: {},
|
|
3316
|
-
id: {},
|
|
3317
|
-
subText: {},
|
|
3318
|
-
error: { type: Boolean, default: false },
|
|
3319
|
-
validating: { type: Boolean, default: false },
|
|
3320
|
-
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3321
|
-
placeholder: {},
|
|
3322
|
-
disabled: { type: Boolean, default: false },
|
|
3323
|
-
autocomplete: {}
|
|
3324
|
-
}, {
|
|
3325
|
-
"modelValue": { default: "" },
|
|
3326
|
-
"modelModifiers": {}
|
|
3327
|
-
}),
|
|
3328
|
-
emits: ["update:modelValue"],
|
|
3329
|
-
setup(__props, { expose: __expose }) {
|
|
3330
|
-
const props = __props;
|
|
3331
|
-
const regex = useModel(__props, "modelValue");
|
|
3332
|
-
const uiValue = ref("");
|
|
3333
|
-
const caseSensitive = ref(false);
|
|
3334
|
-
const excludeMatches = ref(false);
|
|
3335
|
-
const useRegex = ref(false);
|
|
3336
|
-
const rebuildRegexFromUi = () => {
|
|
3337
|
-
regex.value = buildRegexFromPatternInput(uiValue.value, {
|
|
3338
|
-
caseSensitive: caseSensitive.value,
|
|
3339
|
-
excludeMatches: excludeMatches.value,
|
|
3340
|
-
useRegex: useRegex.value
|
|
3341
|
-
});
|
|
3342
|
-
};
|
|
3343
|
-
watch(
|
|
3344
|
-
() => regex.value,
|
|
3345
|
-
(newValue) => {
|
|
3346
|
-
uiValue.value = parseRegexToPatternInputValue(newValue, {
|
|
3347
|
-
useRegex: useRegex.value,
|
|
3348
|
-
excludeMatches: excludeMatches.value,
|
|
3349
|
-
caseSensitive: caseSensitive.value
|
|
3350
|
-
});
|
|
3351
|
-
},
|
|
3352
|
-
{ immediate: true }
|
|
3353
|
-
);
|
|
3354
|
-
const caseSensitiveAriaLabel = computed(
|
|
3355
|
-
() => caseSensitive.value ? "Match case-sensitive" : "Match case-insensitive"
|
|
3356
|
-
);
|
|
3357
|
-
const excludeMatchesAriaLabel = computed(
|
|
3358
|
-
() => excludeMatches.value ? "Exclude matches" : "Include matches"
|
|
3359
|
-
);
|
|
3360
|
-
const patternModeAriaLabel = computed(
|
|
3361
|
-
() => useRegex.value ? "Use regex pattern" : "Use wildcard pattern"
|
|
3362
|
-
);
|
|
3363
|
-
const baseInput = useTemplateRef("baseInput");
|
|
3364
|
-
__expose({
|
|
3365
|
-
focus: () => baseInput.value?.focus()
|
|
3366
|
-
});
|
|
3367
|
-
return (_ctx, _cache) => {
|
|
3368
|
-
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
3369
|
-
default: withCtx((slotProps) => [
|
|
3370
|
-
createVNode(BaseInput, mergeProps({
|
|
3371
|
-
ref_key: "baseInput",
|
|
3372
|
-
ref: baseInput
|
|
3373
|
-
}, slotProps, {
|
|
3374
|
-
modelValue: uiValue.value,
|
|
3375
|
-
"onUpdate:modelValue": [
|
|
3376
|
-
_cache[3] || (_cache[3] = ($event) => uiValue.value = $event),
|
|
3377
|
-
rebuildRegexFromUi
|
|
3378
|
-
],
|
|
3379
|
-
type: "text",
|
|
3380
|
-
placeholder: props.placeholder,
|
|
3381
|
-
disabled: props.disabled,
|
|
3382
|
-
error: props.error,
|
|
3383
|
-
autocomplete: props.autocomplete,
|
|
3384
|
-
"leading-icon": "filter",
|
|
3385
|
-
clearable: ""
|
|
3386
|
-
}), {
|
|
3387
|
-
trailing: withCtx(() => [
|
|
3388
|
-
createVNode(_sfc_main$z, {
|
|
3389
|
-
modelValue: caseSensitive.value,
|
|
3390
|
-
"onUpdate:modelValue": [
|
|
3391
|
-
_cache[0] || (_cache[0] = ($event) => caseSensitive.value = $event),
|
|
3392
|
-
rebuildRegexFromUi
|
|
3393
|
-
],
|
|
3394
|
-
size: "xsmall",
|
|
3395
|
-
variant: "outlined",
|
|
3396
|
-
"leading-icon": "case-sensitive",
|
|
3397
|
-
title: caseSensitiveAriaLabel.value,
|
|
3398
|
-
"aria-label": caseSensitiveAriaLabel.value,
|
|
3399
|
-
disabled: props.disabled
|
|
3400
|
-
}, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
|
|
3401
|
-
createVNode(_sfc_main$z, {
|
|
3402
|
-
modelValue: excludeMatches.value,
|
|
3403
|
-
"onUpdate:modelValue": [
|
|
3404
|
-
_cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
|
|
3405
|
-
rebuildRegexFromUi
|
|
3406
|
-
],
|
|
3407
|
-
size: "xsmall",
|
|
3408
|
-
variant: "outlined",
|
|
3409
|
-
"leading-icon": "arrows-order",
|
|
3410
|
-
title: excludeMatchesAriaLabel.value,
|
|
3411
|
-
"aria-label": excludeMatchesAriaLabel.value,
|
|
3412
|
-
disabled: props.disabled
|
|
3413
|
-
}, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
|
|
3414
|
-
createVNode(_sfc_main$z, {
|
|
3415
|
-
modelValue: useRegex.value,
|
|
3416
|
-
"onUpdate:modelValue": [
|
|
3417
|
-
_cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
|
|
3418
|
-
rebuildRegexFromUi
|
|
3419
|
-
],
|
|
3420
|
-
size: "xsmall",
|
|
3421
|
-
variant: "outlined",
|
|
3422
|
-
"leading-icon": "regex",
|
|
3423
|
-
title: patternModeAriaLabel.value,
|
|
3424
|
-
"aria-label": patternModeAriaLabel.value,
|
|
3425
|
-
disabled: props.disabled
|
|
3426
|
-
}, null, 8, ["modelValue", "title", "aria-label", "disabled"])
|
|
3427
|
-
]),
|
|
3428
|
-
_: 1
|
|
3429
|
-
}, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
3430
|
-
]),
|
|
3431
|
-
_: 1
|
|
3432
|
-
}, 16);
|
|
3433
|
-
};
|
|
3434
|
-
}
|
|
3435
|
-
});
|
|
3436
|
-
|
|
3437
|
-
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
3438
|
-
__name: "KdsSearchInput",
|
|
3439
|
-
props: /* @__PURE__ */ mergeModels({
|
|
3440
|
-
description: {},
|
|
3441
|
-
label: {},
|
|
3442
|
-
ariaLabel: {},
|
|
3443
|
-
id: {},
|
|
3444
|
-
subText: {},
|
|
3445
|
-
error: { type: Boolean, default: false },
|
|
3446
|
-
validating: { type: Boolean, default: false },
|
|
3447
|
-
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3448
|
-
placeholder: { default: "Search" },
|
|
3449
|
-
disabled: { type: Boolean, default: false },
|
|
3450
|
-
autocomplete: {}
|
|
3451
|
-
}, {
|
|
3452
|
-
"modelValue": { default: "" },
|
|
3453
|
-
"modelModifiers": {}
|
|
3454
|
-
}),
|
|
3455
|
-
emits: /* @__PURE__ */ mergeModels(["focus", "blur", "keydown"], ["update:modelValue"]),
|
|
3456
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3457
|
-
const props = __props;
|
|
3458
|
-
const modelValue = useModel(__props, "modelValue");
|
|
3459
|
-
const emit = __emit;
|
|
3460
|
-
const baseInput = useTemplateRef("baseInput");
|
|
3461
|
-
__expose({
|
|
3462
|
-
focus: () => baseInput.value?.focus()
|
|
3463
|
-
});
|
|
3464
|
-
return (_ctx, _cache) => {
|
|
3465
|
-
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
3466
|
-
default: withCtx((slotProps) => [
|
|
3467
|
-
createVNode(BaseInput, mergeProps({
|
|
3468
|
-
ref_key: "baseInput",
|
|
3469
|
-
ref: baseInput
|
|
3470
|
-
}, slotProps, {
|
|
3471
|
-
modelValue: modelValue.value,
|
|
3472
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
3473
|
-
type: "search",
|
|
3474
|
-
placeholder: props.placeholder,
|
|
3475
|
-
disabled: props.disabled,
|
|
3476
|
-
error: props.error,
|
|
3477
|
-
autocomplete: props.autocomplete,
|
|
3478
|
-
"leading-icon": "search",
|
|
3479
|
-
clearable: true,
|
|
3480
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => emit("focus", $event)),
|
|
3481
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur", $event)),
|
|
3482
|
-
onKeydown: _cache[3] || (_cache[3] = ($event) => emit("keydown", $event))
|
|
3483
|
-
}), null, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
3484
|
-
]),
|
|
3485
|
-
_: 1
|
|
3486
|
-
}, 16);
|
|
3487
|
-
};
|
|
3866
|
+
return trimmed.slice(prefix.length, -1);
|
|
3488
3867
|
}
|
|
3489
|
-
|
|
3868
|
+
return trimmed;
|
|
3869
|
+
};
|
|
3870
|
+
const buildRegexFromPatternInput = (input, options) => {
|
|
3871
|
+
const body = options.useRegex ? input : wildcardToRegexBody(input);
|
|
3872
|
+
const grouped = `(?:${body})`;
|
|
3873
|
+
const withCase = options.caseSensitive ? grouped : `${CASE_INSENSITIVE_PREFIX}${grouped})`;
|
|
3874
|
+
if (!options.excludeMatches) {
|
|
3875
|
+
return withCase;
|
|
3876
|
+
}
|
|
3877
|
+
return `^(?!.*${withCase}).*$`;
|
|
3878
|
+
};
|
|
3879
|
+
const stripOuterNonCapturingGroup = (pattern) => stripOuterGroup(pattern, "(?:");
|
|
3880
|
+
const stripCaseInsensitiveWrapper = (pattern) => stripOuterGroup(pattern, CASE_INSENSITIVE_PREFIX);
|
|
3881
|
+
const tryParseExcluded = (regex) => {
|
|
3882
|
+
const match = regex.trim().match(/^\^\(\?!\.\*([\s\S]*)\)\.\*\$$/);
|
|
3883
|
+
if (!match) {
|
|
3884
|
+
return {};
|
|
3885
|
+
}
|
|
3886
|
+
return { excludedInner: match[1] };
|
|
3887
|
+
};
|
|
3888
|
+
const parseRegexToPatternInputValue = (regex, options) => {
|
|
3889
|
+
if (regex === "") {
|
|
3890
|
+
return "";
|
|
3891
|
+
}
|
|
3892
|
+
const { excludedInner } = tryParseExcluded(regex);
|
|
3893
|
+
const inner = excludedInner === void 0 ? regex : excludedInner;
|
|
3894
|
+
const withoutCase = options.caseSensitive ? inner : stripCaseInsensitiveWrapper(inner);
|
|
3895
|
+
const body = stripOuterNonCapturingGroup(withoutCase);
|
|
3896
|
+
if (options.useRegex) {
|
|
3897
|
+
return body;
|
|
3898
|
+
}
|
|
3899
|
+
const wildcard = regexBodyToWildcard(body);
|
|
3900
|
+
return wildcard ?? body;
|
|
3901
|
+
};
|
|
3490
3902
|
|
|
3491
|
-
const
|
|
3492
|
-
|
|
3493
|
-
__name: "KdsTextarea",
|
|
3903
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
3904
|
+
__name: "KdsPatternInput",
|
|
3494
3905
|
props: /* @__PURE__ */ mergeModels({
|
|
3495
3906
|
description: {},
|
|
3496
3907
|
label: {},
|
|
@@ -3500,10 +3911,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
3500
3911
|
error: { type: Boolean, default: false },
|
|
3501
3912
|
validating: { type: Boolean, default: false },
|
|
3502
3913
|
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3503
|
-
placeholder: {
|
|
3914
|
+
placeholder: {},
|
|
3504
3915
|
disabled: { type: Boolean, default: false },
|
|
3505
|
-
autocomplete: {}
|
|
3506
|
-
rows: { default: 3 }
|
|
3916
|
+
autocomplete: {}
|
|
3507
3917
|
}, {
|
|
3508
3918
|
"modelValue": { default: "" },
|
|
3509
3919
|
"modelModifiers": {}
|
|
@@ -3511,550 +3921,344 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
3511
3921
|
emits: ["update:modelValue"],
|
|
3512
3922
|
setup(__props, { expose: __expose }) {
|
|
3513
3923
|
const props = __props;
|
|
3514
|
-
const
|
|
3515
|
-
const
|
|
3516
|
-
const
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
if (scrollHeight <= offsetHeight) {
|
|
3526
|
-
return;
|
|
3527
|
-
}
|
|
3528
|
-
element.style.height = `${scrollHeight}px`;
|
|
3529
|
-
}
|
|
3530
|
-
useResizeObserver(textareaElement, resize);
|
|
3531
|
-
watch(modelValue, resize, { immediate: true });
|
|
3532
|
-
__expose({
|
|
3533
|
-
focus: () => {
|
|
3534
|
-
textareaElement.value?.focus();
|
|
3535
|
-
}
|
|
3536
|
-
});
|
|
3537
|
-
return (_ctx, _cache) => {
|
|
3538
|
-
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
3539
|
-
default: withCtx((slotProps) => [
|
|
3540
|
-
withDirectives(createElementVNode("textarea", mergeProps(slotProps, {
|
|
3541
|
-
ref_key: "textareaElement",
|
|
3542
|
-
ref: textareaElement,
|
|
3543
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
3544
|
-
class: { invalid: props.error },
|
|
3545
|
-
rows: normalizedRows.value,
|
|
3546
|
-
placeholder: props.placeholder,
|
|
3547
|
-
disabled: props.disabled,
|
|
3548
|
-
autocomplete: props.autocomplete
|
|
3549
|
-
}), null, 16, _hoisted_1$d), [
|
|
3550
|
-
[vModelText, modelValue.value]
|
|
3551
|
-
])
|
|
3552
|
-
]),
|
|
3553
|
-
_: 1
|
|
3554
|
-
}, 16);
|
|
3555
|
-
};
|
|
3556
|
-
}
|
|
3557
|
-
});
|
|
3558
|
-
|
|
3559
|
-
const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-a2df5fed"]]);
|
|
3560
|
-
|
|
3561
|
-
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
3562
|
-
__name: "ListItemAccessory",
|
|
3563
|
-
props: {
|
|
3564
|
-
accessory: {},
|
|
3565
|
-
size: {},
|
|
3566
|
-
disabled: { type: Boolean, default: false }
|
|
3567
|
-
},
|
|
3568
|
-
setup(__props) {
|
|
3569
|
-
const props = __props;
|
|
3570
|
-
return (_ctx, _cache) => {
|
|
3571
|
-
return props.accessory.type === "avatar" ? (openBlock(), createBlock(KdsAvatar, {
|
|
3572
|
-
key: 0,
|
|
3573
|
-
title: props.accessory.title,
|
|
3574
|
-
src: props.accessory.src,
|
|
3575
|
-
initials: props.accessory.initials,
|
|
3576
|
-
size: props.size
|
|
3577
|
-
}, null, 8, ["title", "src", "initials", "size"])) : props.accessory.type === "colorSwatch" ? (openBlock(), createBlock(KdsColorSwatch, {
|
|
3578
|
-
key: 1,
|
|
3579
|
-
color: props.accessory.color,
|
|
3580
|
-
title: props.accessory.title,
|
|
3581
|
-
size: props.size
|
|
3582
|
-
}, null, 8, ["color", "title", "size"])) : props.accessory.type === "icon" ? (openBlock(), createBlock(KdsIcon, {
|
|
3583
|
-
key: 2,
|
|
3584
|
-
name: props.accessory.name,
|
|
3585
|
-
size: props.size,
|
|
3586
|
-
disabled: props.disabled
|
|
3587
|
-
}, null, 8, ["name", "size", "disabled"])) : props.accessory.type === "dataType" ? (openBlock(), createBlock(KdsDataType, {
|
|
3588
|
-
key: 3,
|
|
3589
|
-
"icon-name": props.accessory.name,
|
|
3590
|
-
size: props.size,
|
|
3591
|
-
disabled: props.disabled
|
|
3592
|
-
}, null, 8, ["icon-name", "size", "disabled"])) : props.accessory.type === "liveStatus" ? (openBlock(), createBlock(unref(KdsLiveStatus), {
|
|
3593
|
-
key: 4,
|
|
3594
|
-
status: props.accessory.status,
|
|
3595
|
-
title: props.accessory.title,
|
|
3596
|
-
size: props.size
|
|
3597
|
-
}, null, 8, ["status", "title", "size"])) : createCommentVNode("", true);
|
|
3598
|
-
};
|
|
3599
|
-
}
|
|
3600
|
-
});
|
|
3601
|
-
|
|
3602
|
-
const _hoisted_1$c = ["id", "aria-expanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-invalid", "aria-controls", "disabled"];
|
|
3603
|
-
const _hoisted_2$5 = {
|
|
3604
|
-
key: 0,
|
|
3605
|
-
class: "leading",
|
|
3606
|
-
"aria-hidden": "true"
|
|
3607
|
-
};
|
|
3608
|
-
const _hoisted_3$4 = ["id"];
|
|
3609
|
-
const _hoisted_4$3 = {
|
|
3610
|
-
class: "trailing",
|
|
3611
|
-
"aria-hidden": "true"
|
|
3612
|
-
};
|
|
3613
|
-
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
3614
|
-
__name: "BaseDropdown",
|
|
3615
|
-
props: /* @__PURE__ */ mergeModels({
|
|
3616
|
-
text: { default: void 0 },
|
|
3617
|
-
placeholder: {},
|
|
3618
|
-
disabled: { type: Boolean, default: false },
|
|
3619
|
-
error: { type: Boolean, default: false },
|
|
3620
|
-
missing: { type: Boolean, default: false },
|
|
3621
|
-
accessory: { default: void 0 },
|
|
3622
|
-
id: { default: void 0 },
|
|
3623
|
-
ariaLabelledby: { default: void 0 },
|
|
3624
|
-
ariaDescribedby: { default: void 0 },
|
|
3625
|
-
ariaLabel: { default: void 0 },
|
|
3626
|
-
ariaInvalid: { type: Boolean, default: void 0 },
|
|
3627
|
-
popoverId: { default: void 0 }
|
|
3628
|
-
}, {
|
|
3629
|
-
"open": { type: Boolean, ...{ default: false } },
|
|
3630
|
-
"openModifiers": {}
|
|
3631
|
-
}),
|
|
3632
|
-
emits: /* @__PURE__ */ mergeModels(["click", "keydown"], ["update:open"]),
|
|
3633
|
-
setup(__props, { emit: __emit }) {
|
|
3634
|
-
const props = __props;
|
|
3635
|
-
const open = useModel(__props, "open");
|
|
3636
|
-
const valueTextId = useId();
|
|
3637
|
-
const ariaLabelledby = computed(() => {
|
|
3638
|
-
if (props.ariaLabel) {
|
|
3639
|
-
return void 0;
|
|
3640
|
-
}
|
|
3641
|
-
if (!props.ariaLabelledby) {
|
|
3642
|
-
return valueTextId;
|
|
3643
|
-
}
|
|
3644
|
-
return `${props.ariaLabelledby} ${valueTextId}`;
|
|
3645
|
-
});
|
|
3646
|
-
const effectiveAriaLabel = computed(() => {
|
|
3647
|
-
if (!props.ariaLabel) {
|
|
3648
|
-
return void 0;
|
|
3649
|
-
}
|
|
3650
|
-
const displayText = props.text ?? props.placeholder;
|
|
3651
|
-
return `${props.ariaLabel}, ${displayText}`;
|
|
3652
|
-
});
|
|
3653
|
-
const emit = __emit;
|
|
3654
|
-
const onKeydown = (event) => {
|
|
3655
|
-
if (props.disabled) {
|
|
3656
|
-
return;
|
|
3657
|
-
}
|
|
3658
|
-
emit("keydown", event);
|
|
3659
|
-
switch (event.key) {
|
|
3660
|
-
case "ArrowDown":
|
|
3661
|
-
case "ArrowUp":
|
|
3662
|
-
event.preventDefault();
|
|
3663
|
-
if (!open.value) {
|
|
3664
|
-
open.value = true;
|
|
3665
|
-
}
|
|
3666
|
-
break;
|
|
3667
|
-
}
|
|
3924
|
+
const regex = useModel(__props, "modelValue");
|
|
3925
|
+
const uiValue = ref("");
|
|
3926
|
+
const caseSensitive = ref(false);
|
|
3927
|
+
const excludeMatches = ref(false);
|
|
3928
|
+
const useRegex = ref(false);
|
|
3929
|
+
const rebuildRegexFromUi = () => {
|
|
3930
|
+
regex.value = buildRegexFromPatternInput(uiValue.value, {
|
|
3931
|
+
caseSensitive: caseSensitive.value,
|
|
3932
|
+
excludeMatches: excludeMatches.value,
|
|
3933
|
+
useRegex: useRegex.value
|
|
3934
|
+
});
|
|
3668
3935
|
};
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3936
|
+
watch(
|
|
3937
|
+
() => regex.value,
|
|
3938
|
+
(newValue) => {
|
|
3939
|
+
uiValue.value = parseRegexToPatternInputValue(newValue, {
|
|
3940
|
+
useRegex: useRegex.value,
|
|
3941
|
+
excludeMatches: excludeMatches.value,
|
|
3942
|
+
caseSensitive: caseSensitive.value
|
|
3943
|
+
});
|
|
3944
|
+
},
|
|
3945
|
+
{ immediate: true }
|
|
3946
|
+
);
|
|
3947
|
+
const caseSensitiveAriaLabel = computed(
|
|
3948
|
+
() => caseSensitive.value ? "Match case-sensitive" : "Match case-insensitive"
|
|
3949
|
+
);
|
|
3950
|
+
const excludeMatchesAriaLabel = computed(
|
|
3951
|
+
() => excludeMatches.value ? "Exclude matches" : "Include matches"
|
|
3952
|
+
);
|
|
3953
|
+
const patternModeAriaLabel = computed(
|
|
3954
|
+
() => useRegex.value ? "Use regex pattern" : "Use wildcard pattern"
|
|
3955
|
+
);
|
|
3956
|
+
const baseInput = useTemplateRef("baseInput");
|
|
3957
|
+
__expose({
|
|
3958
|
+
focus: () => baseInput.value?.focus()
|
|
3959
|
+
});
|
|
3960
|
+
return (_ctx, _cache) => {
|
|
3961
|
+
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
3962
|
+
default: withCtx((slotProps) => [
|
|
3963
|
+
createVNode(BaseInput, mergeProps({
|
|
3964
|
+
ref_key: "baseInput",
|
|
3965
|
+
ref: baseInput
|
|
3966
|
+
}, slotProps, {
|
|
3967
|
+
modelValue: uiValue.value,
|
|
3968
|
+
"onUpdate:modelValue": [
|
|
3969
|
+
_cache[3] || (_cache[3] = ($event) => uiValue.value = $event),
|
|
3970
|
+
rebuildRegexFromUi
|
|
3971
|
+
],
|
|
3972
|
+
type: "text",
|
|
3973
|
+
placeholder: props.placeholder,
|
|
3974
|
+
disabled: props.disabled,
|
|
3975
|
+
error: props.error,
|
|
3976
|
+
autocomplete: props.autocomplete,
|
|
3977
|
+
"leading-icon": "filter",
|
|
3978
|
+
clearable: ""
|
|
3979
|
+
}), {
|
|
3980
|
+
trailing: withCtx(() => [
|
|
3981
|
+
createVNode(_sfc_main$C, {
|
|
3982
|
+
modelValue: caseSensitive.value,
|
|
3983
|
+
"onUpdate:modelValue": [
|
|
3984
|
+
_cache[0] || (_cache[0] = ($event) => caseSensitive.value = $event),
|
|
3985
|
+
rebuildRegexFromUi
|
|
3986
|
+
],
|
|
3987
|
+
size: "xsmall",
|
|
3988
|
+
variant: "outlined",
|
|
3989
|
+
"leading-icon": "case-sensitive",
|
|
3990
|
+
title: caseSensitiveAriaLabel.value,
|
|
3991
|
+
"aria-label": caseSensitiveAriaLabel.value,
|
|
3992
|
+
disabled: props.disabled
|
|
3993
|
+
}, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
|
|
3994
|
+
createVNode(_sfc_main$C, {
|
|
3995
|
+
modelValue: excludeMatches.value,
|
|
3996
|
+
"onUpdate:modelValue": [
|
|
3997
|
+
_cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
|
|
3998
|
+
rebuildRegexFromUi
|
|
3999
|
+
],
|
|
4000
|
+
size: "xsmall",
|
|
4001
|
+
variant: "outlined",
|
|
4002
|
+
"leading-icon": "arrows-order",
|
|
4003
|
+
title: excludeMatchesAriaLabel.value,
|
|
4004
|
+
"aria-label": excludeMatchesAriaLabel.value,
|
|
4005
|
+
disabled: props.disabled
|
|
4006
|
+
}, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
|
|
4007
|
+
createVNode(_sfc_main$C, {
|
|
4008
|
+
modelValue: useRegex.value,
|
|
4009
|
+
"onUpdate:modelValue": [
|
|
4010
|
+
_cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
|
|
4011
|
+
rebuildRegexFromUi
|
|
4012
|
+
],
|
|
4013
|
+
size: "xsmall",
|
|
4014
|
+
variant: "outlined",
|
|
4015
|
+
"leading-icon": "regex",
|
|
4016
|
+
title: patternModeAriaLabel.value,
|
|
4017
|
+
"aria-label": patternModeAriaLabel.value,
|
|
4018
|
+
disabled: props.disabled
|
|
4019
|
+
}, null, 8, ["modelValue", "title", "aria-label", "disabled"])
|
|
4020
|
+
]),
|
|
4021
|
+
_: 1
|
|
4022
|
+
}, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
4023
|
+
]),
|
|
4024
|
+
_: 1
|
|
4025
|
+
}, 16);
|
|
3705
4026
|
};
|
|
3706
4027
|
}
|
|
3707
4028
|
});
|
|
3708
4029
|
|
|
3709
|
-
const BaseDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-f1917c48"]]);
|
|
3710
|
-
|
|
3711
|
-
const _hoisted_1$b = { class: "kds-empty-state" };
|
|
3712
|
-
const _hoisted_2$4 = { class: "kds-empty-state-headline" };
|
|
3713
|
-
const _hoisted_3$3 = {
|
|
3714
|
-
key: 0,
|
|
3715
|
-
class: "kds-empty-state-description"
|
|
3716
|
-
};
|
|
3717
|
-
const _hoisted_4$2 = {
|
|
3718
|
-
key: 1,
|
|
3719
|
-
class: "kds-empty-state-action"
|
|
3720
|
-
};
|
|
3721
4030
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
3722
|
-
__name: "
|
|
3723
|
-
props: {
|
|
3724
|
-
headline: {},
|
|
4031
|
+
__name: "KdsSearchInput",
|
|
4032
|
+
props: /* @__PURE__ */ mergeModels({
|
|
3725
4033
|
description: {},
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
4034
|
+
label: {},
|
|
4035
|
+
ariaLabel: {},
|
|
4036
|
+
id: {},
|
|
4037
|
+
subText: {},
|
|
4038
|
+
error: { type: Boolean, default: false },
|
|
4039
|
+
validating: { type: Boolean, default: false },
|
|
4040
|
+
preserveSubTextSpace: { type: Boolean, default: false },
|
|
4041
|
+
placeholder: { default: "Search" },
|
|
4042
|
+
disabled: { type: Boolean, default: false },
|
|
4043
|
+
autocomplete: {}
|
|
4044
|
+
}, {
|
|
4045
|
+
"modelValue": { default: "" },
|
|
4046
|
+
"modelModifiers": {}
|
|
4047
|
+
}),
|
|
4048
|
+
emits: /* @__PURE__ */ mergeModels(["focus", "blur", "keydown"], ["update:modelValue"]),
|
|
4049
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3730
4050
|
const props = __props;
|
|
4051
|
+
const modelValue = useModel(__props, "modelValue");
|
|
3731
4052
|
const emit = __emit;
|
|
3732
|
-
const
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
() => isLinkButton.value ? _sfc_main$A : _sfc_main$B
|
|
3737
|
-
);
|
|
4053
|
+
const baseInput = useTemplateRef("baseInput");
|
|
4054
|
+
__expose({
|
|
4055
|
+
focus: () => baseInput.value?.focus()
|
|
4056
|
+
});
|
|
3738
4057
|
return (_ctx, _cache) => {
|
|
3739
|
-
return openBlock(),
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
4058
|
+
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
4059
|
+
default: withCtx((slotProps) => [
|
|
4060
|
+
createVNode(BaseInput, mergeProps({
|
|
4061
|
+
ref_key: "baseInput",
|
|
4062
|
+
ref: baseInput
|
|
4063
|
+
}, slotProps, {
|
|
4064
|
+
modelValue: modelValue.value,
|
|
4065
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
4066
|
+
type: "search",
|
|
4067
|
+
placeholder: props.placeholder,
|
|
4068
|
+
disabled: props.disabled,
|
|
4069
|
+
error: props.error,
|
|
4070
|
+
autocomplete: props.autocomplete,
|
|
4071
|
+
"leading-icon": "search",
|
|
4072
|
+
clearable: true,
|
|
4073
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => emit("focus", $event)),
|
|
4074
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur", $event)),
|
|
4075
|
+
onKeydown: _cache[3] || (_cache[3] = ($event) => emit("keydown", $event))
|
|
4076
|
+
}), null, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
4077
|
+
]),
|
|
4078
|
+
_: 1
|
|
4079
|
+
}, 16);
|
|
3748
4080
|
};
|
|
3749
4081
|
}
|
|
3750
4082
|
});
|
|
3751
4083
|
|
|
3752
|
-
const
|
|
3753
|
-
|
|
3754
|
-
const kdsListItemAccessorySize = {
|
|
3755
|
-
SMALL: "small",
|
|
3756
|
-
LARGE: "large"
|
|
3757
|
-
};
|
|
3758
|
-
|
|
3759
|
-
const kdsListItemVariant = {
|
|
3760
|
-
SMALL: "small",
|
|
3761
|
-
LARGE: "large"
|
|
3762
|
-
};
|
|
3763
|
-
|
|
3764
|
-
const _hoisted_1$a = ["id", "aria-selected", "aria-disabled"];
|
|
3765
|
-
const _hoisted_2$3 = {
|
|
3766
|
-
key: 0,
|
|
3767
|
-
class: "accessory"
|
|
3768
|
-
};
|
|
3769
|
-
const _hoisted_3$2 = { class: "content" };
|
|
3770
|
-
const _hoisted_4$1 = ["title"];
|
|
3771
|
-
const _hoisted_5 = {
|
|
3772
|
-
key: 0,
|
|
3773
|
-
class: "prefix"
|
|
3774
|
-
};
|
|
3775
|
-
const _hoisted_6 = ["title"];
|
|
3776
|
-
const _hoisted_7 = {
|
|
3777
|
-
key: 1,
|
|
3778
|
-
class: "trailing-item"
|
|
3779
|
-
};
|
|
3780
|
-
const _hoisted_8 = {
|
|
3781
|
-
key: 0,
|
|
3782
|
-
class: "shortcut"
|
|
3783
|
-
};
|
|
4084
|
+
const _hoisted_1$a = ["rows", "placeholder", "disabled", "autocomplete"];
|
|
3784
4085
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
3785
|
-
__name: "
|
|
3786
|
-
props: {
|
|
3787
|
-
|
|
4086
|
+
__name: "KdsTextarea",
|
|
4087
|
+
props: /* @__PURE__ */ mergeModels({
|
|
4088
|
+
description: {},
|
|
3788
4089
|
label: {},
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
},
|
|
3800
|
-
|
|
3801
|
-
|
|
4090
|
+
ariaLabel: {},
|
|
4091
|
+
id: {},
|
|
4092
|
+
subText: {},
|
|
4093
|
+
error: { type: Boolean, default: false },
|
|
4094
|
+
validating: { type: Boolean, default: false },
|
|
4095
|
+
preserveSubTextSpace: { type: Boolean, default: false },
|
|
4096
|
+
placeholder: { default: "" },
|
|
4097
|
+
disabled: { type: Boolean, default: false },
|
|
4098
|
+
autocomplete: {},
|
|
4099
|
+
rows: { default: 3 }
|
|
4100
|
+
}, {
|
|
4101
|
+
"modelValue": { default: "" },
|
|
4102
|
+
"modelModifiers": {}
|
|
4103
|
+
}),
|
|
4104
|
+
emits: ["update:modelValue"],
|
|
4105
|
+
setup(__props, { expose: __expose }) {
|
|
3802
4106
|
const props = __props;
|
|
3803
|
-
const
|
|
3804
|
-
const
|
|
3805
|
-
|
|
3806
|
-
)
|
|
3807
|
-
|
|
3808
|
-
if (
|
|
3809
|
-
event.stopPropagation();
|
|
3810
|
-
event.preventDefault();
|
|
4107
|
+
const normalizedRows = computed(() => Math.max(1, props.rows));
|
|
4108
|
+
const modelValue = useModel(__props, "modelValue");
|
|
4109
|
+
const textareaElement = useTemplateRef("textareaElement");
|
|
4110
|
+
function resize() {
|
|
4111
|
+
const element = textareaElement.value;
|
|
4112
|
+
if (!element) {
|
|
3811
4113
|
return;
|
|
3812
4114
|
}
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
])) : createCommentVNode("", true),
|
|
3844
|
-
createElementVNode("span", _hoisted_3$2, [
|
|
3845
|
-
createElementVNode("span", {
|
|
3846
|
-
ref_key: "labelEl",
|
|
3847
|
-
ref: labelEl,
|
|
3848
|
-
class: "label",
|
|
3849
|
-
title: unref(isLabelTruncated) ? props.label : void 0
|
|
3850
|
-
}, [
|
|
3851
|
-
props.missing ? (openBlock(), createElementBlock("span", _hoisted_5, "(Missing) ")) : createCommentVNode("", true),
|
|
3852
|
-
createElementVNode("span", {
|
|
3853
|
-
class: normalizeClass({ special: props.special })
|
|
3854
|
-
}, toDisplayString(props.label), 3)
|
|
3855
|
-
], 8, _hoisted_4$1),
|
|
3856
|
-
props.subText ? (openBlock(), createElementBlock("span", {
|
|
3857
|
-
key: 0,
|
|
3858
|
-
ref_key: "subtextEl",
|
|
3859
|
-
ref: subtextEl,
|
|
3860
|
-
class: "subtext",
|
|
3861
|
-
title: unref(isSubtextTruncated) ? props.subText : void 0
|
|
3862
|
-
}, toDisplayString(props.subText), 9, _hoisted_6)) : createCommentVNode("", true)
|
|
4115
|
+
element.style.height = "auto";
|
|
4116
|
+
const scrollHeight = element.scrollHeight;
|
|
4117
|
+
const offsetHeight = element.offsetHeight;
|
|
4118
|
+
if (scrollHeight <= offsetHeight) {
|
|
4119
|
+
return;
|
|
4120
|
+
}
|
|
4121
|
+
element.style.height = `${scrollHeight}px`;
|
|
4122
|
+
}
|
|
4123
|
+
useResizeObserver(textareaElement, resize);
|
|
4124
|
+
watch(modelValue, resize, { immediate: true });
|
|
4125
|
+
__expose({
|
|
4126
|
+
focus: () => {
|
|
4127
|
+
textareaElement.value?.focus();
|
|
4128
|
+
}
|
|
4129
|
+
});
|
|
4130
|
+
return (_ctx, _cache) => {
|
|
4131
|
+
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
4132
|
+
default: withCtx((slotProps) => [
|
|
4133
|
+
withDirectives(createElementVNode("textarea", mergeProps(slotProps, {
|
|
4134
|
+
ref_key: "textareaElement",
|
|
4135
|
+
ref: textareaElement,
|
|
4136
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
4137
|
+
class: { invalid: props.error },
|
|
4138
|
+
rows: normalizedRows.value,
|
|
4139
|
+
placeholder: props.placeholder,
|
|
4140
|
+
disabled: props.disabled,
|
|
4141
|
+
autocomplete: props.autocomplete
|
|
4142
|
+
}), null, 16, _hoisted_1$a), [
|
|
4143
|
+
[vModelText, modelValue.value]
|
|
4144
|
+
])
|
|
3863
4145
|
]),
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
props.trailingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
3867
|
-
key: 1,
|
|
3868
|
-
name: props.trailingIcon,
|
|
3869
|
-
size: "small"
|
|
3870
|
-
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
3871
|
-
])) : createCommentVNode("", true)
|
|
3872
|
-
], 10, _hoisted_1$a);
|
|
4146
|
+
_: 1
|
|
4147
|
+
}, 16);
|
|
3873
4148
|
};
|
|
3874
4149
|
}
|
|
3875
4150
|
});
|
|
3876
4151
|
|
|
3877
|
-
const
|
|
4152
|
+
const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-a2df5fed"]]);
|
|
3878
4153
|
|
|
3879
|
-
const _hoisted_1$9 = ["aria-label", "aria-
|
|
4154
|
+
const _hoisted_1$9 = ["id", "aria-expanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-invalid", "aria-controls", "disabled"];
|
|
4155
|
+
const _hoisted_2$3 = {
|
|
4156
|
+
key: 0,
|
|
4157
|
+
class: "leading",
|
|
4158
|
+
"aria-hidden": "true"
|
|
4159
|
+
};
|
|
4160
|
+
const _hoisted_3$2 = ["id"];
|
|
4161
|
+
const _hoisted_4$1 = {
|
|
4162
|
+
class: "trailing",
|
|
4163
|
+
"aria-hidden": "true"
|
|
4164
|
+
};
|
|
3880
4165
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
3881
|
-
__name: "
|
|
3882
|
-
props: {
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
4166
|
+
__name: "BaseDropdown",
|
|
4167
|
+
props: /* @__PURE__ */ mergeModels({
|
|
4168
|
+
text: { default: void 0 },
|
|
4169
|
+
placeholder: {},
|
|
4170
|
+
disabled: { type: Boolean, default: false },
|
|
4171
|
+
error: { type: Boolean, default: false },
|
|
4172
|
+
missing: { type: Boolean, default: false },
|
|
4173
|
+
accessory: { default: void 0 },
|
|
4174
|
+
id: { default: void 0 },
|
|
4175
|
+
ariaLabelledby: { default: void 0 },
|
|
4176
|
+
ariaDescribedby: { default: void 0 },
|
|
4177
|
+
ariaLabel: { default: void 0 },
|
|
4178
|
+
ariaInvalid: { type: Boolean, default: void 0 },
|
|
4179
|
+
popoverId: { default: void 0 }
|
|
4180
|
+
}, {
|
|
4181
|
+
"open": { type: Boolean, ...{ default: false } },
|
|
4182
|
+
"openModifiers": {}
|
|
4183
|
+
}),
|
|
4184
|
+
emits: /* @__PURE__ */ mergeModels(["click", "keydown"], ["update:open"]),
|
|
4185
|
+
setup(__props, { emit: __emit }) {
|
|
3890
4186
|
const props = __props;
|
|
3891
|
-
const
|
|
3892
|
-
const
|
|
3893
|
-
const
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
() => props.possibleValues.map((o) => ({ ...o, id: `${idPrefix}-${o.id}` }))
|
|
3897
|
-
);
|
|
3898
|
-
const activeId = ref(void 0);
|
|
3899
|
-
const lastActiveId = ref(void 0);
|
|
3900
|
-
const isFocused = ref(false);
|
|
3901
|
-
const containerEl = useTemplateRef("containerEl");
|
|
3902
|
-
function scrollToView() {
|
|
3903
|
-
if (!activeId.value || !containerEl.value) {
|
|
3904
|
-
return;
|
|
3905
|
-
}
|
|
3906
|
-
containerEl.value?.querySelector(`#${CSS.escape(activeId.value)}`)?.scrollIntoView({ block: "nearest" });
|
|
3907
|
-
}
|
|
3908
|
-
const onMouseLeave = () => {
|
|
3909
|
-
if (!isFocused.value) {
|
|
3910
|
-
activeId.value = void 0;
|
|
3911
|
-
}
|
|
3912
|
-
};
|
|
3913
|
-
const onMousemove = (event) => {
|
|
3914
|
-
const target = event.target?.closest?.('[role="option"]');
|
|
3915
|
-
if (target instanceof HTMLElement && target.id && target.getAttribute("aria-disabled") !== "true") {
|
|
3916
|
-
activeId.value = target.id;
|
|
3917
|
-
}
|
|
3918
|
-
};
|
|
3919
|
-
const enabledValues = computed(
|
|
3920
|
-
() => prefixedValues.value.filter((o) => !o.disabled)
|
|
3921
|
-
);
|
|
3922
|
-
watch(enabledValues, (values) => {
|
|
3923
|
-
const isValid = (id) => id !== void 0 && values.some((o) => o.id === id);
|
|
3924
|
-
if (activeId.value !== void 0 && !isValid(activeId.value)) {
|
|
3925
|
-
if (values.length > 0) {
|
|
3926
|
-
activeId.value = values[0].id;
|
|
3927
|
-
} else {
|
|
3928
|
-
activeId.value = prefixedValues.value.length === 0 ? emptyOptionId : void 0;
|
|
3929
|
-
}
|
|
4187
|
+
const open = useModel(__props, "open");
|
|
4188
|
+
const valueTextId = useId();
|
|
4189
|
+
const ariaLabelledby = computed(() => {
|
|
4190
|
+
if (props.ariaLabel) {
|
|
4191
|
+
return void 0;
|
|
3930
4192
|
}
|
|
3931
|
-
if (!
|
|
3932
|
-
|
|
4193
|
+
if (!props.ariaLabelledby) {
|
|
4194
|
+
return valueTextId;
|
|
3933
4195
|
}
|
|
3934
|
-
|
|
4196
|
+
return `${props.ariaLabelledby} ${valueTextId}`;
|
|
3935
4197
|
});
|
|
3936
|
-
const
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
if (activeId.value === void 0) {
|
|
3940
|
-
activeId.value = lastActiveId.value ?? enabledValues.value[0]?.id;
|
|
4198
|
+
const effectiveAriaLabel = computed(() => {
|
|
4199
|
+
if (!props.ariaLabel) {
|
|
4200
|
+
return void 0;
|
|
3941
4201
|
}
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
const handleKeydown = (event) => {
|
|
3949
|
-
if (enabledValues.value.length === 0) {
|
|
4202
|
+
const displayText = props.text ?? props.placeholder;
|
|
4203
|
+
return `${props.ariaLabel}, ${displayText}`;
|
|
4204
|
+
});
|
|
4205
|
+
const emit = __emit;
|
|
4206
|
+
const onKeydown = (event) => {
|
|
4207
|
+
if (props.disabled) {
|
|
3950
4208
|
return;
|
|
3951
4209
|
}
|
|
3952
|
-
|
|
4210
|
+
emit("keydown", event);
|
|
3953
4211
|
switch (event.key) {
|
|
3954
|
-
case "ArrowDown":
|
|
3955
|
-
|
|
3956
|
-
activeId.value = enabledValues.value[nextIndex].id;
|
|
3957
|
-
scrollToView();
|
|
3958
|
-
event.preventDefault();
|
|
3959
|
-
break;
|
|
3960
|
-
}
|
|
3961
|
-
case "ArrowUp": {
|
|
3962
|
-
const nextIndex = currentIndex <= 0 ? enabledValues.value.length - 1 : currentIndex - 1;
|
|
3963
|
-
activeId.value = enabledValues.value[nextIndex].id;
|
|
3964
|
-
scrollToView();
|
|
4212
|
+
case "ArrowDown":
|
|
4213
|
+
case "ArrowUp":
|
|
3965
4214
|
event.preventDefault();
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
case "Enter":
|
|
3969
|
-
if (activeId.value) {
|
|
3970
|
-
emit("itemClick", toOptionId(activeId.value));
|
|
3971
|
-
event.preventDefault();
|
|
3972
|
-
}
|
|
3973
|
-
break;
|
|
3974
|
-
case " ":
|
|
3975
|
-
if (event.target instanceof HTMLElement && ["INPUT", "TEXTAREA", "SELECT"].includes(event.target.tagName)) {
|
|
3976
|
-
break;
|
|
3977
|
-
}
|
|
3978
|
-
if (activeId.value) {
|
|
3979
|
-
emit("itemClick", toOptionId(activeId.value));
|
|
3980
|
-
event.preventDefault();
|
|
4215
|
+
if (!open.value) {
|
|
4216
|
+
open.value = true;
|
|
3981
4217
|
}
|
|
3982
4218
|
break;
|
|
3983
|
-
case "Home":
|
|
3984
|
-
activeId.value = enabledValues.value[0].id;
|
|
3985
|
-
scrollToView();
|
|
3986
|
-
event.preventDefault();
|
|
3987
|
-
break;
|
|
3988
|
-
case "End":
|
|
3989
|
-
activeId.value = enabledValues.value[enabledValues.value.length - 1].id;
|
|
3990
|
-
scrollToView();
|
|
3991
|
-
event.preventDefault();
|
|
3992
|
-
break;
|
|
3993
4219
|
}
|
|
3994
4220
|
};
|
|
3995
|
-
__expose({
|
|
3996
|
-
/** Forward a keydown event to the list for keyboard navigation */
|
|
3997
|
-
handleKeydown,
|
|
3998
|
-
/** Notify the list that its controlling element received focus */
|
|
3999
|
-
handleFocus,
|
|
4000
|
-
/** Notify the list that its controlling element lost focus */
|
|
4001
|
-
handleBlur,
|
|
4002
|
-
activeDescendant: activeId
|
|
4003
|
-
});
|
|
4004
4221
|
return (_ctx, _cache) => {
|
|
4005
|
-
return openBlock(), createElementBlock("
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
"aria-
|
|
4010
|
-
"aria-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
props.
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
prefixedValues.value.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
4041
|
-
key: 0,
|
|
4042
|
-
id: emptyOptionId,
|
|
4043
|
-
role: "option",
|
|
4044
|
-
"aria-disabled": "true",
|
|
4045
|
-
"aria-selected": void 0,
|
|
4046
|
-
class: "kds-list-container-empty"
|
|
4047
|
-
}, [
|
|
4048
|
-
createVNode(KdsEmptyState, {
|
|
4049
|
-
headline: props.emptyText
|
|
4050
|
-
}, null, 8, ["headline"])
|
|
4051
|
-
])) : createCommentVNode("", true)
|
|
4052
|
-
], 16, _hoisted_1$9);
|
|
4222
|
+
return openBlock(), createElementBlock("button", {
|
|
4223
|
+
id: props.id,
|
|
4224
|
+
class: normalizeClass(["kds-dropdown-trigger-button", { error: props.error }]),
|
|
4225
|
+
type: "button",
|
|
4226
|
+
"aria-expanded": open.value,
|
|
4227
|
+
"aria-labelledby": ariaLabelledby.value,
|
|
4228
|
+
"aria-describedby": props.ariaDescribedby,
|
|
4229
|
+
"aria-label": effectiveAriaLabel.value,
|
|
4230
|
+
"aria-invalid": props.ariaInvalid,
|
|
4231
|
+
"aria-controls": props.popoverId,
|
|
4232
|
+
"aria-haspopup": "dialog",
|
|
4233
|
+
disabled: props.disabled,
|
|
4234
|
+
onClick: _cache[0] || (_cache[0] = ($event) => !props.disabled && emit("click")),
|
|
4235
|
+
onKeydown
|
|
4236
|
+
}, [
|
|
4237
|
+
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$3, [
|
|
4238
|
+
createVNode(_sfc_main$z, {
|
|
4239
|
+
accessory: props.accessory,
|
|
4240
|
+
size: "medium"
|
|
4241
|
+
}, null, 8, ["accessory"])
|
|
4242
|
+
])) : createCommentVNode("", true),
|
|
4243
|
+
createElementVNode("span", {
|
|
4244
|
+
id: unref(valueTextId),
|
|
4245
|
+
class: normalizeClass(["text", {
|
|
4246
|
+
placeholder: !props.text,
|
|
4247
|
+
missing: props.missing
|
|
4248
|
+
}])
|
|
4249
|
+
}, toDisplayString(props.text ?? props.placeholder), 11, _hoisted_3$2),
|
|
4250
|
+
createElementVNode("span", _hoisted_4$1, [
|
|
4251
|
+
createVNode(KdsIcon, {
|
|
4252
|
+
name: open.value ? "chevron-up" : "chevron-down",
|
|
4253
|
+
size: "small"
|
|
4254
|
+
}, null, 8, ["name"])
|
|
4255
|
+
])
|
|
4256
|
+
], 42, _hoisted_1$9);
|
|
4053
4257
|
};
|
|
4054
4258
|
}
|
|
4055
4259
|
});
|
|
4056
4260
|
|
|
4057
|
-
const
|
|
4261
|
+
const BaseDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-f1917c48"]]);
|
|
4058
4262
|
|
|
4059
4263
|
const _hoisted_1$8 = { class: "kds-dropdown-container" };
|
|
4060
4264
|
const _hoisted_2$2 = { class: "kds-dropdown-container-sticky-top" };
|
|
@@ -4062,6 +4266,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
4062
4266
|
__name: "DropdownContainer",
|
|
4063
4267
|
props: /* @__PURE__ */ mergeModels({
|
|
4064
4268
|
emptyText: {},
|
|
4269
|
+
loading: { type: Boolean },
|
|
4065
4270
|
possibleValues: {}
|
|
4066
4271
|
}, {
|
|
4067
4272
|
"modelValue": { default: null },
|
|
@@ -4145,24 +4350,26 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
4145
4350
|
createVNode(unref(KdsListContainer), {
|
|
4146
4351
|
ref: "listContainer",
|
|
4147
4352
|
class: normalizeClass(["kds-dropdown-container-list", { multiline: hasMultiline.value }]),
|
|
4148
|
-
"possible-values": listOptions.value,
|
|
4353
|
+
"possible-values": props.loading ? [] : listOptions.value,
|
|
4354
|
+
loading: props.loading,
|
|
4149
4355
|
"empty-text": props.emptyText,
|
|
4150
4356
|
"controlled-externally": "",
|
|
4151
4357
|
"aria-label": "Dropdown options",
|
|
4152
4358
|
onItemClick: _cache[4] || (_cache[4] = ($event) => modelValue.value = $event)
|
|
4153
|
-
}, null, 8, ["class", "possible-values", "empty-text"])
|
|
4359
|
+
}, null, 8, ["class", "possible-values", "loading", "empty-text"])
|
|
4154
4360
|
]);
|
|
4155
4361
|
};
|
|
4156
4362
|
}
|
|
4157
4363
|
});
|
|
4158
4364
|
|
|
4159
|
-
const DropdownContainer = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
4365
|
+
const DropdownContainer = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-15e753c9"]]);
|
|
4160
4366
|
|
|
4161
4367
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
4162
4368
|
__name: "KdsDropdown",
|
|
4163
4369
|
props: /* @__PURE__ */ mergeModels({
|
|
4164
4370
|
placeholder: { default: "Select" },
|
|
4165
4371
|
disabled: { type: Boolean, default: false },
|
|
4372
|
+
loading: { type: Boolean, default: false },
|
|
4166
4373
|
possibleValues: {},
|
|
4167
4374
|
description: {},
|
|
4168
4375
|
label: {},
|
|
@@ -4238,8 +4445,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4238
4445
|
modelValue: modelValue.value,
|
|
4239
4446
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => modelValue.value = $event),
|
|
4240
4447
|
"possible-values": props.possibleValues,
|
|
4448
|
+
loading: props.loading,
|
|
4241
4449
|
"empty-text": "No entries found"
|
|
4242
|
-
}, null, 8, ["modelValue", "possible-values"])
|
|
4450
|
+
}, null, 8, ["modelValue", "possible-values", "loading"])
|
|
4243
4451
|
]),
|
|
4244
4452
|
_: 1
|
|
4245
4453
|
}, 8, ["modelValue"])
|
|
@@ -4321,6 +4529,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
4321
4529
|
modelValue: modelValue.value,
|
|
4322
4530
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
|
|
4323
4531
|
placement: "top-right",
|
|
4532
|
+
role: "dialog",
|
|
4324
4533
|
"popover-aria-label": "Description"
|
|
4325
4534
|
}, {
|
|
4326
4535
|
default: withCtx(() => [
|
|
@@ -4340,7 +4549,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
4340
4549
|
}
|
|
4341
4550
|
});
|
|
4342
4551
|
|
|
4343
|
-
const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
4552
|
+
const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-d865cc89"]]);
|
|
4344
4553
|
|
|
4345
4554
|
const KdsInfoToggleButton$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
4346
4555
|
__proto__: null,
|
|
@@ -4464,17 +4673,19 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4464
4673
|
modelValue: modelValue.value,
|
|
4465
4674
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
|
|
4466
4675
|
placement: "bottom-right",
|
|
4676
|
+
role: "dialog",
|
|
4467
4677
|
"popover-aria-label": "Flow Variable settings"
|
|
4468
4678
|
}, {
|
|
4469
4679
|
default: withCtx(() => [
|
|
4470
|
-
|
|
4680
|
+
modelValue.value ? (openBlock(), createBlock(VariablePopover, {
|
|
4681
|
+
key: 0,
|
|
4471
4682
|
content: props.content
|
|
4472
4683
|
}, {
|
|
4473
4684
|
default: withCtx(() => [
|
|
4474
4685
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
4475
4686
|
]),
|
|
4476
4687
|
_: 3
|
|
4477
|
-
}, 8, ["content"])
|
|
4688
|
+
}, 8, ["content"])) : createCommentVNode("", true)
|
|
4478
4689
|
]),
|
|
4479
4690
|
_: 3
|
|
4480
4691
|
}, 8, ["modelValue"])
|
|
@@ -4483,7 +4694,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4483
4694
|
}
|
|
4484
4695
|
});
|
|
4485
4696
|
|
|
4486
|
-
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
4697
|
+
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-f362911c"]]);
|
|
4487
4698
|
|
|
4488
4699
|
const _hoisted_1$3 = ["aria-label", "aria-labelledby", "aria-pressed", "disabled"];
|
|
4489
4700
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
@@ -4576,10 +4787,10 @@ const kdsModalVariant = {
|
|
|
4576
4787
|
};
|
|
4577
4788
|
const kdsModalVariants = Object.values(kdsModalVariant);
|
|
4578
4789
|
const kdsModalLayoutPropsDefault = {
|
|
4579
|
-
|
|
4790
|
+
headline: "",
|
|
4580
4791
|
variant: kdsModalVariant.PADDED,
|
|
4581
4792
|
overflow: "auto",
|
|
4582
|
-
|
|
4793
|
+
leadingIcon: void 0
|
|
4583
4794
|
};
|
|
4584
4795
|
const kdsModalPropsDefault = {
|
|
4585
4796
|
active: false,
|
|
@@ -4590,7 +4801,7 @@ const kdsModalPropsDefault = {
|
|
|
4590
4801
|
};
|
|
4591
4802
|
|
|
4592
4803
|
const _hoisted_1$2 = { class: "modal-header" };
|
|
4593
|
-
const _hoisted_2$1 = { class: "modal-header-
|
|
4804
|
+
const _hoisted_2$1 = { class: "modal-header-headline" };
|
|
4594
4805
|
const _hoisted_3$1 = ["data-variant"];
|
|
4595
4806
|
const _hoisted_4 = {
|
|
4596
4807
|
key: 0,
|
|
@@ -4600,27 +4811,27 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4600
4811
|
...{ inheritAttrs: false },
|
|
4601
4812
|
__name: "KdsModalLayout",
|
|
4602
4813
|
props: /* @__PURE__ */ mergeDefaults({
|
|
4603
|
-
|
|
4814
|
+
headline: {},
|
|
4604
4815
|
variant: {},
|
|
4605
|
-
|
|
4816
|
+
leadingIcon: {},
|
|
4606
4817
|
overflow: {},
|
|
4607
4818
|
onClose: { type: Function }
|
|
4608
4819
|
}, kdsModalLayoutPropsDefault),
|
|
4609
4820
|
setup(__props) {
|
|
4610
4821
|
useCssVars((_ctx) => ({
|
|
4611
|
-
"
|
|
4822
|
+
"v55fe64da": _ctx.overflow
|
|
4612
4823
|
}));
|
|
4613
4824
|
const props = __props;
|
|
4614
4825
|
return (_ctx, _cache) => {
|
|
4615
4826
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
4616
4827
|
createElementVNode("header", _hoisted_1$2, [
|
|
4617
|
-
props.
|
|
4828
|
+
props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
4618
4829
|
key: 0,
|
|
4619
|
-
name: props.
|
|
4830
|
+
name: props.leadingIcon,
|
|
4620
4831
|
size: "medium"
|
|
4621
4832
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
4622
|
-
createElementVNode("div", _hoisted_2$1, toDisplayString(props.
|
|
4623
|
-
createVNode(_sfc_main$
|
|
4833
|
+
createElementVNode("div", _hoisted_2$1, toDisplayString(props.headline), 1),
|
|
4834
|
+
createVNode(_sfc_main$E, {
|
|
4624
4835
|
"leading-icon": "x-close",
|
|
4625
4836
|
variant: "transparent",
|
|
4626
4837
|
size: "medium",
|
|
@@ -4642,14 +4853,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4642
4853
|
}
|
|
4643
4854
|
});
|
|
4644
4855
|
|
|
4645
|
-
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
4856
|
+
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b2e57108"]]);
|
|
4646
4857
|
|
|
4647
4858
|
const _hoisted_1$1 = ["closedby"];
|
|
4648
4859
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
4649
4860
|
__name: "KdsModal",
|
|
4650
4861
|
props: /* @__PURE__ */ mergeDefaults({
|
|
4651
|
-
|
|
4652
|
-
|
|
4862
|
+
leadingIcon: {},
|
|
4863
|
+
headline: {},
|
|
4653
4864
|
variant: {},
|
|
4654
4865
|
width: {},
|
|
4655
4866
|
height: {},
|
|
@@ -4660,7 +4871,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4660
4871
|
emits: ["close", "closed"],
|
|
4661
4872
|
setup(__props, { emit: __emit }) {
|
|
4662
4873
|
useCssVars((_ctx) => ({
|
|
4663
|
-
"
|
|
4874
|
+
"v073dd16a": _ctx.overflow
|
|
4664
4875
|
}));
|
|
4665
4876
|
const props = __props;
|
|
4666
4877
|
const emit = __emit;
|
|
@@ -4720,15 +4931,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4720
4931
|
onCancel: withModifiers(onClose, ["prevent"])
|
|
4721
4932
|
}, [
|
|
4722
4933
|
renderSlot(_ctx.$slots, "default", {
|
|
4723
|
-
|
|
4724
|
-
|
|
4934
|
+
headline: __props.headline,
|
|
4935
|
+
leadingIcon: __props.leadingIcon,
|
|
4725
4936
|
variant: __props.variant,
|
|
4726
4937
|
overflow: __props.overflow,
|
|
4727
4938
|
onClose
|
|
4728
4939
|
}, () => [
|
|
4729
4940
|
createVNode(KdsModalLayout, {
|
|
4730
|
-
|
|
4731
|
-
icon: __props.
|
|
4941
|
+
headline: __props.headline,
|
|
4942
|
+
"leading-icon": __props.leadingIcon,
|
|
4732
4943
|
variant: __props.variant,
|
|
4733
4944
|
overflow: __props.overflow,
|
|
4734
4945
|
onClose
|
|
@@ -4740,14 +4951,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4740
4951
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
4741
4952
|
]),
|
|
4742
4953
|
_: 3
|
|
4743
|
-
}, 8, ["
|
|
4954
|
+
}, 8, ["headline", "leading-icon", "variant", "overflow"])
|
|
4744
4955
|
], true)
|
|
4745
4956
|
], 42, _hoisted_1$1)) : createCommentVNode("", true);
|
|
4746
4957
|
};
|
|
4747
4958
|
}
|
|
4748
4959
|
});
|
|
4749
4960
|
|
|
4750
|
-
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
4961
|
+
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5a8d7ce3"]]);
|
|
4751
4962
|
|
|
4752
4963
|
const defaultCancelButton = {
|
|
4753
4964
|
type: "cancel",
|
|
@@ -4871,10 +5082,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4871
5082
|
if (!config.value) {
|
|
4872
5083
|
return {};
|
|
4873
5084
|
}
|
|
4874
|
-
const {
|
|
5085
|
+
const { leadingIcon, headline, height, width, variant, overflow, closedby } = config.value.value;
|
|
4875
5086
|
return {
|
|
4876
|
-
|
|
4877
|
-
|
|
5087
|
+
leadingIcon,
|
|
5088
|
+
headline,
|
|
4878
5089
|
height,
|
|
4879
5090
|
width,
|
|
4880
5091
|
variant,
|
|
@@ -4893,7 +5104,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4893
5104
|
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
4894
5105
|
createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
|
|
4895
5106
|
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
4896
|
-
createVNode(_sfc_main$
|
|
5107
|
+
createVNode(_sfc_main$p, {
|
|
4897
5108
|
modelValue: askAgain.value,
|
|
4898
5109
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
4899
5110
|
label: unref(config).value.doNotAskAgain.label,
|
|
@@ -4908,7 +5119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4908
5119
|
name: "footer",
|
|
4909
5120
|
fn: withCtx(() => [
|
|
4910
5121
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
|
|
4911
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5122
|
+
return openBlock(), createBlock(_sfc_main$E, {
|
|
4912
5123
|
key: index,
|
|
4913
5124
|
destructive: button.destructive,
|
|
4914
5125
|
autofocus: button.autofocus,
|
|
@@ -4938,7 +5149,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4938
5149
|
}
|
|
4939
5150
|
});
|
|
4940
5151
|
|
|
4941
|
-
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5152
|
+
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-41fc8d84"]]);
|
|
4942
5153
|
|
|
4943
|
-
export { KdsAvatar, KdsBadge, _sfc_main$
|
|
5154
|
+
export { KdsAvatar, KdsBadge, _sfc_main$E as KdsButton, KdsCardClickable, _sfc_main$p as KdsCheckbox, KdsCheckboxGroup, _sfc_main$f as KdsColorInput, KdsColorSwatch, KdsDataType, _sfc_main$8 as KdsDropdown, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsInlineMessage, KdsLabel, _sfc_main$D as KdsLinkButton, KdsLiveStatus, KdsLoadingSpinner, KdsMenuButton, KdsModal, KdsModalLayout, _sfc_main$e as KdsNumberInput, _sfc_main$d as KdsPatternInput, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, _sfc_main$c as KdsSearchInput, KdsSubText, _sfc_main$h as KdsTextInput, KdsTextarea, _sfc_main$C as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, kdsAvatarSize, kdsAvatarSizes, kdsBadgeSize, kdsBadgeSizes, kdsBadgeVariant, kdsBadgeVariants, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCardVariant, kdsCardVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchSize, kdsColorSwatchSizes, kdsColorSwatchType, kdsColorSwatchTypes, kdsDarkModeType, kdsDarkModeTypes, kdsDataTypeSize, kdsDataTypeSizes, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsInlineMessageVariant, kdsInlineMessageVariants, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
|
|
4944
5155
|
//# sourceMappingURL=index.js.map
|