@knime/kds-components 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +126 -83
- package/dist/index.js +963 -392
- package/dist/index.js.map +1 -1
- package/dist/src/buttons/BaseButton.vue.d.ts.map +1 -1
- package/dist/src/containers/ContextMenu/KdsContextMenu.vue.d.ts +22 -1
- package/dist/src/containers/ContextMenu/KdsContextMenu.vue.d.ts.map +1 -1
- package/dist/src/containers/ListContainer/KdsListContainer.vue.d.ts.map +1 -1
- package/dist/src/containers/ListContainer/types.d.ts +10 -5
- package/dist/src/containers/ListContainer/types.d.ts.map +1 -1
- package/dist/src/containers/MenuContainer/KdsMenuContainer.vue.d.ts.map +1 -1
- package/dist/src/containers/MenuContainer/types.d.ts +6 -0
- package/dist/src/containers/MenuContainer/types.d.ts.map +1 -1
- package/dist/src/containers/_helpers/types.d.ts +20 -0
- package/dist/src/containers/_helpers/types.d.ts.map +1 -0
- package/dist/src/containers/_helpers/useListItemKeyboardNav.d.ts +3 -1
- package/dist/src/containers/_helpers/useListItemKeyboardNav.d.ts.map +1 -1
- package/dist/src/forms/inputs/BaseInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/DateInput/KdsDateInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/IntervalInput/IntervalInputPopover.vue.d.ts +16 -0
- package/dist/src/forms/inputs/IntervalInput/IntervalInputPopover.vue.d.ts.map +1 -0
- package/dist/src/forms/inputs/IntervalInput/KdsIntervalInput.vue.d.ts +398 -0
- package/dist/src/forms/inputs/IntervalInput/KdsIntervalInput.vue.d.ts.map +1 -0
- package/dist/src/forms/inputs/IntervalInput/enums.d.ts +12 -0
- package/dist/src/forms/inputs/IntervalInput/enums.d.ts.map +1 -0
- package/dist/src/forms/inputs/IntervalInput/index.d.ts +4 -0
- package/dist/src/forms/inputs/IntervalInput/index.d.ts.map +1 -0
- package/dist/src/forms/inputs/IntervalInput/intervalUtils.d.ts +31 -0
- package/dist/src/forms/inputs/IntervalInput/intervalUtils.d.ts.map +1 -0
- package/dist/src/forms/inputs/IntervalInput/types.d.ts +19 -0
- package/dist/src/forms/inputs/IntervalInput/types.d.ts.map +1 -0
- package/dist/src/forms/inputs/NumberInput/KdsNumberInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/PasswordInput/KdsPasswordInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/TimeInput/KdsTimeInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/index.d.ts +2 -0
- package/dist/src/forms/inputs/index.d.ts.map +1 -1
- package/dist/src/layouts/PanelHeader/KdsPanelHeader.vue.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/src/containers/ListContainer/enums.d.ts +0 -6
- package/dist/src/containers/ListContainer/enums.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createPropsRestProxy, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, createVNode, withCtx, renderSlot, mergeProps, h as h$1, useSlots, getCurrentInstance, useModel, mergeModels,
|
|
1
|
+
import { defineComponent, createPropsRestProxy, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, createVNode, withCtx, renderSlot, mergeProps, h as h$1, useSlots, getCurrentInstance, useModel, mergeModels, onMounted, onUnmounted, readonly, nextTick, useId, Fragment, renderList, watchEffect, useAttrs, withKeys, withModifiers, defineAsyncComponent, onBeforeUpdate, onBeforeUnmount, useCssVars, isRef, withDirectives, vModelText, createTextVNode, normalizeProps, createSlots, guardReactiveProps } from 'vue';
|
|
2
2
|
import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useMutationObserver, useElementSize, useMousePressed, useVirtualList, useTemplateRefsList } 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$
|
|
12
|
+
const _hoisted_1$X = ["role", "title", "aria-hidden", "aria-label"];
|
|
13
13
|
const _hoisted_2$x = ["src"];
|
|
14
|
-
const _hoisted_3$
|
|
14
|
+
const _hoisted_3$o = {
|
|
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$1q = /* @__PURE__ */ defineComponent({
|
|
20
20
|
__name: "KdsAvatar",
|
|
21
21
|
props: {
|
|
22
22
|
initials: {},
|
|
@@ -59,10 +59,10 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
alt: "",
|
|
60
60
|
"aria-hidden": "true",
|
|
61
61
|
onError: onImageError
|
|
62
|
-
}, null, 40, _hoisted_2$x)) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
62
|
+
}, null, 40, _hoisted_2$x)) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
|
|
63
63
|
createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)
|
|
64
64
|
]))
|
|
65
|
-
], 10, _hoisted_1$
|
|
65
|
+
], 10, _hoisted_1$X);
|
|
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$1q, [["__scopeId", "data-v-c90668bf"]]);
|
|
79
79
|
|
|
80
80
|
const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
81
81
|
const v = glob$1[path$13];
|
|
@@ -117,7 +117,7 @@ function useIcon({
|
|
|
117
117
|
return iconComponent;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
const _sfc_main$
|
|
120
|
+
const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
121
121
|
__name: "KdsIcon",
|
|
122
122
|
props: {
|
|
123
123
|
name: {},
|
|
@@ -146,7 +146,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
149
|
+
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["__scopeId", "data-v-fb124eb6"]]);
|
|
150
150
|
|
|
151
151
|
const ID_TO_ICON_MAP = {
|
|
152
152
|
// Flow Variables
|
|
@@ -483,8 +483,8 @@ const kdsDataTypeSize = {
|
|
|
483
483
|
};
|
|
484
484
|
const kdsDataTypeSizes = Object.values(kdsDataTypeSize);
|
|
485
485
|
|
|
486
|
-
const _hoisted_1$
|
|
487
|
-
const _sfc_main$
|
|
486
|
+
const _hoisted_1$W = ["title"];
|
|
487
|
+
const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
488
488
|
__name: "KdsDataType",
|
|
489
489
|
props: {
|
|
490
490
|
iconName: { default: "unknown-datatype" },
|
|
@@ -524,12 +524,12 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
|
524
524
|
"aria-hidden": "true",
|
|
525
525
|
focusable: "false"
|
|
526
526
|
}, null, 8, ["class"]))
|
|
527
|
-
], 10, _hoisted_1$
|
|
527
|
+
], 10, _hoisted_1$W);
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
531
|
|
|
532
|
-
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
532
|
+
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["__scopeId", "data-v-3b8ebdbd"]]);
|
|
533
533
|
|
|
534
534
|
const kdsBadgeVariant = {
|
|
535
535
|
NEUTRAL: "neutral",
|
|
@@ -546,8 +546,8 @@ const kdsBadgeSize = {
|
|
|
546
546
|
};
|
|
547
547
|
const kdsBadgeSizes = Object.values(kdsBadgeSize);
|
|
548
548
|
|
|
549
|
-
const _hoisted_1$
|
|
550
|
-
const _sfc_main$
|
|
549
|
+
const _hoisted_1$V = { class: "label-wrapper" };
|
|
550
|
+
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
551
551
|
__name: "KdsBadge",
|
|
552
552
|
props: {
|
|
553
553
|
label: {},
|
|
@@ -569,13 +569,13 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
569
569
|
name: __props.leadingIcon,
|
|
570
570
|
size: sizeToIconSize[__props.size]
|
|
571
571
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true),
|
|
572
|
-
createElementVNode("span", _hoisted_1$
|
|
572
|
+
createElementVNode("span", _hoisted_1$V, toDisplayString(__props.label), 1)
|
|
573
573
|
], 2);
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
576
|
});
|
|
577
577
|
|
|
578
|
-
const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
578
|
+
const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["__scopeId", "data-v-df64f7cf"]]);
|
|
579
579
|
|
|
580
580
|
const kdsColorSwatchType = {
|
|
581
581
|
LEARNER: "learner",
|
|
@@ -594,14 +594,14 @@ const kdsColorSwatchSize = {
|
|
|
594
594
|
};
|
|
595
595
|
const kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
|
|
596
596
|
|
|
597
|
-
const _hoisted_1$
|
|
597
|
+
const _hoisted_1$U = ["role", "title", "aria-hidden", "aria-label"];
|
|
598
598
|
const RGBA_SHORT_HEX_LENGTH = 4;
|
|
599
599
|
const RGBA_LONG_HEX_LENGTH = 8;
|
|
600
600
|
const ALPHA_NIBBLE_INDEX = 3;
|
|
601
601
|
const ALPHA_BYTE_START = 6;
|
|
602
602
|
const RGB_SHORT_HEX_LENGTH = 3;
|
|
603
603
|
const RGB_LONG_HEX_LENGTH = 6;
|
|
604
|
-
const _sfc_main$
|
|
604
|
+
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
605
605
|
__name: "KdsColorSwatch",
|
|
606
606
|
props: {
|
|
607
607
|
color: {},
|
|
@@ -676,12 +676,12 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
676
676
|
style: normalizeStyle(swatchStyle.value),
|
|
677
677
|
"aria-hidden": hasTitle.value ? void 0 : "true",
|
|
678
678
|
"aria-label": hasTitle.value ? accessibleTitle.value : void 0
|
|
679
|
-
}, null, 14, _hoisted_1$
|
|
679
|
+
}, null, 14, _hoisted_1$U);
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
682
|
});
|
|
683
683
|
|
|
684
|
-
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
684
|
+
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["__scopeId", "data-v-91e0130d"]]);
|
|
685
685
|
|
|
686
686
|
const kdsDarkModeType = {
|
|
687
687
|
LIGHT: "light",
|
|
@@ -801,9 +801,9 @@ function useKdsIsTruncated(elementRef) {
|
|
|
801
801
|
return { isTruncated };
|
|
802
802
|
}
|
|
803
803
|
|
|
804
|
-
const _hoisted_1$
|
|
804
|
+
const _hoisted_1$T = ["title", "aria-label"];
|
|
805
805
|
const _hoisted_2$w = ["title"];
|
|
806
|
-
const _sfc_main$
|
|
806
|
+
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
807
807
|
__name: "KdsLiveStatus",
|
|
808
808
|
props: {
|
|
809
809
|
status: { default: "red" },
|
|
@@ -833,12 +833,12 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
833
833
|
class: "label",
|
|
834
834
|
title: unref(isTruncated) ? __props.label : void 0
|
|
835
835
|
}, toDisplayString(__props.label), 9, _hoisted_2$w)) : createCommentVNode("", true)
|
|
836
|
-
], 10, _hoisted_1$
|
|
836
|
+
], 10, _hoisted_1$T);
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
839
|
});
|
|
840
840
|
|
|
841
|
-
const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
841
|
+
const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["__scopeId", "data-v-01555495"]]);
|
|
842
842
|
|
|
843
843
|
const kdsLiveStatusStatus = {
|
|
844
844
|
RED: "red",
|
|
@@ -854,8 +854,8 @@ const kdsLiveStatusSize = {
|
|
|
854
854
|
};
|
|
855
855
|
const kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
|
|
856
856
|
|
|
857
|
-
const _hoisted_1$
|
|
858
|
-
const _sfc_main$
|
|
857
|
+
const _hoisted_1$S = ["data-style"];
|
|
858
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
859
859
|
__name: "KdsLoadingSpinner",
|
|
860
860
|
props: {
|
|
861
861
|
size: { default: "medium" },
|
|
@@ -880,12 +880,12 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
880
880
|
cy: "60",
|
|
881
881
|
r: "50"
|
|
882
882
|
}, null, -1)
|
|
883
|
-
])], 10, _hoisted_1$
|
|
883
|
+
])], 10, _hoisted_1$S);
|
|
884
884
|
};
|
|
885
885
|
}
|
|
886
886
|
});
|
|
887
887
|
|
|
888
|
-
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
888
|
+
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["__scopeId", "data-v-54835dc0"]]);
|
|
889
889
|
|
|
890
890
|
const kdsLoadingSpinnerVariant = {
|
|
891
891
|
ON_PRIMARY: "onPrimary",
|
|
@@ -895,14 +895,14 @@ const kdsLoadingSpinnerVariants = Object.values(
|
|
|
895
895
|
kdsLoadingSpinnerVariant
|
|
896
896
|
);
|
|
897
897
|
|
|
898
|
-
const _hoisted_1$
|
|
898
|
+
const _hoisted_1$R = ["role"];
|
|
899
899
|
const _hoisted_2$v = { class: "header" };
|
|
900
|
-
const _hoisted_3$
|
|
901
|
-
const _hoisted_4$
|
|
900
|
+
const _hoisted_3$n = { class: "headline" };
|
|
901
|
+
const _hoisted_4$i = {
|
|
902
902
|
key: 0,
|
|
903
903
|
class: "body"
|
|
904
904
|
};
|
|
905
|
-
const _sfc_main$
|
|
905
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
906
906
|
__name: "KdsInlineMessage",
|
|
907
907
|
props: {
|
|
908
908
|
headline: {},
|
|
@@ -939,15 +939,15 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
939
939
|
name: iconName.value,
|
|
940
940
|
size: "small"
|
|
941
941
|
}, null, 8, ["name"]),
|
|
942
|
-
createElementVNode("div", _hoisted_3$
|
|
942
|
+
createElementVNode("div", _hoisted_3$n, toDisplayString(props.headline), 1)
|
|
943
943
|
]),
|
|
944
|
-
props.description ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
945
|
-
], 10, _hoisted_1$
|
|
944
|
+
props.description ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(props.description), 1)) : createCommentVNode("", true)
|
|
945
|
+
], 10, _hoisted_1$R);
|
|
946
946
|
};
|
|
947
947
|
}
|
|
948
948
|
});
|
|
949
949
|
|
|
950
|
-
const KdsInlineMessage = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
950
|
+
const KdsInlineMessage = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-af14056f"]]);
|
|
951
951
|
|
|
952
952
|
const kdsInlineMessageVariant = {
|
|
953
953
|
ERROR: "error",
|
|
@@ -957,10 +957,10 @@ const kdsInlineMessageVariant = {
|
|
|
957
957
|
};
|
|
958
958
|
const kdsInlineMessageVariants = Object.values(kdsInlineMessageVariant);
|
|
959
959
|
|
|
960
|
-
const _hoisted_1$
|
|
960
|
+
const _hoisted_1$Q = { class: "donut-container" };
|
|
961
961
|
const _hoisted_2$u = ["height", "width", "viewBox"];
|
|
962
|
-
const _hoisted_3$
|
|
963
|
-
const _hoisted_4$
|
|
962
|
+
const _hoisted_3$m = ["r", "stroke-width"];
|
|
963
|
+
const _hoisted_4$h = ["r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "transform"];
|
|
964
964
|
const _hoisted_5$8 = ["r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "transform"];
|
|
965
965
|
const _hoisted_6$7 = {
|
|
966
966
|
key: 0,
|
|
@@ -974,7 +974,7 @@ const _hoisted_8$2 = {
|
|
|
974
974
|
const radius = 22;
|
|
975
975
|
const innerRadius = 10;
|
|
976
976
|
const backgroundStrokeOffset = 0.5;
|
|
977
|
-
const _sfc_main$
|
|
977
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
978
978
|
__name: "KdsDonutChart",
|
|
979
979
|
props: {
|
|
980
980
|
value: {},
|
|
@@ -1022,7 +1022,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
1022
1022
|
const transformWedge = computed(() => `rotate(-90, ${radius}, ${radius})`);
|
|
1023
1023
|
const disabled = computed(() => !Number.isFinite(__props.maxValue));
|
|
1024
1024
|
return (_ctx, _cache) => {
|
|
1025
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1025
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Q, [
|
|
1026
1026
|
(openBlock(), createElementBlock("svg", {
|
|
1027
1027
|
height: diameter.value,
|
|
1028
1028
|
width: diameter.value,
|
|
@@ -1036,7 +1036,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
1036
1036
|
r: r.value,
|
|
1037
1037
|
"stroke-width": backgroundStrokeWidth.value,
|
|
1038
1038
|
fill: "transparent"
|
|
1039
|
-
}, null, 8, _hoisted_3$
|
|
1039
|
+
}, null, 8, _hoisted_3$m),
|
|
1040
1040
|
__props.secondaryValue && !disabled.value ? (openBlock(), createElementBlock("circle", {
|
|
1041
1041
|
key: 0,
|
|
1042
1042
|
class: normalizeClass(["value-wedge", "secondary-circle", { animate: __props.animate }]),
|
|
@@ -1048,7 +1048,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
1048
1048
|
"stroke-dashoffset": secondaryStrokeDashOffset.value,
|
|
1049
1049
|
fill: "transparent",
|
|
1050
1050
|
transform: transformWedge.value
|
|
1051
|
-
}, null, 10, _hoisted_4$
|
|
1051
|
+
}, null, 10, _hoisted_4$h)) : createCommentVNode("", true),
|
|
1052
1052
|
!disabled.value ? (openBlock(), createElementBlock("circle", {
|
|
1053
1053
|
key: 1,
|
|
1054
1054
|
class: normalizeClass(["value-wedge", "primary-circle", { animate: __props.animate }]),
|
|
@@ -1071,22 +1071,22 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
1071
1071
|
}
|
|
1072
1072
|
});
|
|
1073
1073
|
|
|
1074
|
-
const KdsDonutChart = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1074
|
+
const KdsDonutChart = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["__scopeId", "data-v-66e88c70"]]);
|
|
1075
1075
|
|
|
1076
|
-
const _sfc_main$
|
|
1076
|
+
const _sfc_main$1h = { };
|
|
1077
1077
|
|
|
1078
|
-
const _hoisted_1$
|
|
1078
|
+
const _hoisted_1$P = { class: "kds-divider" };
|
|
1079
1079
|
|
|
1080
1080
|
function _sfc_render(_ctx, _cache) {
|
|
1081
|
-
return (openBlock(), createElementBlock("hr", _hoisted_1$
|
|
1081
|
+
return (openBlock(), createElementBlock("hr", _hoisted_1$P))
|
|
1082
1082
|
}
|
|
1083
|
-
const KdsDivider = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
1083
|
+
const KdsDivider = /*#__PURE__*/_export_sfc(_sfc_main$1h, [['render',_sfc_render],['__scopeId',"data-v-4d059bd3"]]);
|
|
1084
1084
|
|
|
1085
|
-
const _hoisted_1$
|
|
1085
|
+
const _hoisted_1$O = {
|
|
1086
1086
|
key: 0,
|
|
1087
1087
|
class: "label"
|
|
1088
1088
|
};
|
|
1089
|
-
const _sfc_main$
|
|
1089
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
1090
1090
|
__name: "BaseButton",
|
|
1091
1091
|
props: {
|
|
1092
1092
|
size: { default: "medium" },
|
|
@@ -1133,6 +1133,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
1133
1133
|
}
|
|
1134
1134
|
return (_ctx, _cache) => {
|
|
1135
1135
|
return openBlock(), createBlock(resolveDynamicComponent(__props.component), {
|
|
1136
|
+
type: __props.component === "button" ? "button" : void 0,
|
|
1136
1137
|
class: normalizeClass(classes.value),
|
|
1137
1138
|
disabled: __props.disabled,
|
|
1138
1139
|
title: props.title,
|
|
@@ -1147,7 +1148,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
1147
1148
|
size: iconSize.value
|
|
1148
1149
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
1149
1150
|
], true),
|
|
1150
|
-
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
1151
|
+
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$O, toDisplayString(props.label), 1)) : createCommentVNode("", true),
|
|
1151
1152
|
props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
|
|
1152
1153
|
key: 1,
|
|
1153
1154
|
name: props.trailingIcon,
|
|
@@ -1155,14 +1156,14 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
1155
1156
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
1156
1157
|
]),
|
|
1157
1158
|
_: 3
|
|
1158
|
-
}, 8, ["class", "disabled", "title", "aria-label"]);
|
|
1159
|
+
}, 8, ["type", "class", "disabled", "title", "aria-label"]);
|
|
1159
1160
|
};
|
|
1160
1161
|
}
|
|
1161
1162
|
});
|
|
1162
1163
|
|
|
1163
|
-
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1164
|
+
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["__scopeId", "data-v-80e22f2e"]]);
|
|
1164
1165
|
|
|
1165
|
-
const _sfc_main$
|
|
1166
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
1166
1167
|
__name: "KdsButton",
|
|
1167
1168
|
props: {
|
|
1168
1169
|
size: {},
|
|
@@ -1227,7 +1228,7 @@ function isExternalUrl(url) {
|
|
|
1227
1228
|
return true;
|
|
1228
1229
|
}
|
|
1229
1230
|
|
|
1230
|
-
const _sfc_main$
|
|
1231
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
1231
1232
|
__name: "KdsLinkButton",
|
|
1232
1233
|
props: {
|
|
1233
1234
|
size: {},
|
|
@@ -1456,12 +1457,12 @@ function prettyBytes(number, options) {
|
|
|
1456
1457
|
return applyFixedWidth(result, options.fixedWidth);
|
|
1457
1458
|
}
|
|
1458
1459
|
|
|
1459
|
-
const _hoisted_1$
|
|
1460
|
+
const _hoisted_1$N = { class: "label" };
|
|
1460
1461
|
const _hoisted_2$t = {
|
|
1461
1462
|
key: 1,
|
|
1462
1463
|
class: "file-size"
|
|
1463
1464
|
};
|
|
1464
|
-
const _sfc_main$
|
|
1465
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
1465
1466
|
__name: "KdsLink",
|
|
1466
1467
|
props: {
|
|
1467
1468
|
to: {},
|
|
@@ -1551,7 +1552,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1551
1552
|
onClick
|
|
1552
1553
|
}, {
|
|
1553
1554
|
default: withCtx(() => [
|
|
1554
|
-
createElementVNode("span", _hoisted_1$
|
|
1555
|
+
createElementVNode("span", _hoisted_1$N, toDisplayString(__props.label), 1),
|
|
1555
1556
|
variant.value === "external" ? (openBlock(), createBlock(KdsIcon, {
|
|
1556
1557
|
key: 0,
|
|
1557
1558
|
name: "external-link",
|
|
@@ -1565,9 +1566,9 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1565
1566
|
}
|
|
1566
1567
|
});
|
|
1567
1568
|
|
|
1568
|
-
const KdsLink = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1569
|
+
const KdsLink = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-56e748a8"]]);
|
|
1569
1570
|
|
|
1570
|
-
const _sfc_main$
|
|
1571
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
1571
1572
|
__name: "KdsToggleButton",
|
|
1572
1573
|
props: /* @__PURE__ */ mergeModels({
|
|
1573
1574
|
size: {},
|
|
@@ -1603,9 +1604,9 @@ const kdsToggleButtonVariant = {
|
|
|
1603
1604
|
};
|
|
1604
1605
|
const kdsToggleButtonVariants = Object.values(kdsToggleButtonVariant);
|
|
1605
1606
|
|
|
1606
|
-
const _hoisted_1$
|
|
1607
|
+
const _hoisted_1$M = ["data-visible"];
|
|
1607
1608
|
const _hoisted_2$s = ["data-visible"];
|
|
1608
|
-
const _sfc_main$
|
|
1609
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
1609
1610
|
__name: "KdsProgressButton",
|
|
1610
1611
|
props: /* @__PURE__ */ mergeModels({
|
|
1611
1612
|
size: { default: "medium" },
|
|
@@ -1666,7 +1667,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1666
1667
|
name: props.leadingIcon,
|
|
1667
1668
|
size: iconSize.value
|
|
1668
1669
|
}, null, 8, ["name", "size"])
|
|
1669
|
-
], 8, _hoisted_1$
|
|
1670
|
+
], 8, _hoisted_1$M),
|
|
1670
1671
|
createElementVNode("span", {
|
|
1671
1672
|
class: "spinner",
|
|
1672
1673
|
"data-visible": state.value === "progress"
|
|
@@ -1684,7 +1685,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1684
1685
|
}
|
|
1685
1686
|
});
|
|
1686
1687
|
|
|
1687
|
-
const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1688
|
+
const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["__scopeId", "data-v-d38d7ade"]]);
|
|
1688
1689
|
|
|
1689
1690
|
const kdsProgressButtonState = {
|
|
1690
1691
|
DEFAULT: "default",
|
|
@@ -1700,10 +1701,14 @@ const kdsListItemVariant = {
|
|
|
1700
1701
|
};
|
|
1701
1702
|
|
|
1702
1703
|
const isTextInput = (target) => target instanceof HTMLElement && ["INPUT", "TEXTAREA", "SELECT"].includes(target.tagName);
|
|
1703
|
-
const
|
|
1704
|
+
const diffIds = (a, b) => a.length !== b.length || a.some((id, i) => id !== b[i]);
|
|
1704
1705
|
const useListItemKeyboardNav = (options) => {
|
|
1705
|
-
const {
|
|
1706
|
-
|
|
1706
|
+
const {
|
|
1707
|
+
containerEl,
|
|
1708
|
+
selectableItems,
|
|
1709
|
+
enabledItems,
|
|
1710
|
+
itemFocusStrategy = "persistent"
|
|
1711
|
+
} = options;
|
|
1707
1712
|
const activeId = ref(void 0);
|
|
1708
1713
|
function scrollToView() {
|
|
1709
1714
|
if (!activeId.value || !containerEl.value) {
|
|
@@ -1711,42 +1716,6 @@ const useListItemKeyboardNav = (options) => {
|
|
|
1711
1716
|
}
|
|
1712
1717
|
containerEl.value?.querySelector(`#${CSS.escape(activeId.value)}`)?.scrollIntoView({ block: "nearest" });
|
|
1713
1718
|
}
|
|
1714
|
-
function scrollSelectedIntoView() {
|
|
1715
|
-
nextTick(() => {
|
|
1716
|
-
const selected = containerEl.value?.querySelector(
|
|
1717
|
-
'[aria-selected="true"]'
|
|
1718
|
-
);
|
|
1719
|
-
selected?.scrollIntoView({ block: "center" });
|
|
1720
|
-
});
|
|
1721
|
-
}
|
|
1722
|
-
const lastActiveId = ref(void 0);
|
|
1723
|
-
const enabledIds = computed(() => enabledItems.value.map(({ id }) => id));
|
|
1724
|
-
let prevEnabledIds = [];
|
|
1725
|
-
const firstEnabledOrEmpty = (values) => {
|
|
1726
|
-
if (values.length > 0) {
|
|
1727
|
-
return values[0].id;
|
|
1728
|
-
}
|
|
1729
|
-
return selectableItems.value.length === 0 ? options.emptyOptionId : void 0;
|
|
1730
|
-
};
|
|
1731
|
-
const getResetActiveId = (values) => {
|
|
1732
|
-
if (activeId.value === void 0) {
|
|
1733
|
-
return activeId.value;
|
|
1734
|
-
}
|
|
1735
|
-
if (isFocused.value && idsChanged(enabledIds.value, prevEnabledIds)) {
|
|
1736
|
-
return firstEnabledOrEmpty(values);
|
|
1737
|
-
}
|
|
1738
|
-
const stillValid = values.some((o) => o.id === activeId.value);
|
|
1739
|
-
return stillValid ? activeId.value : firstEnabledOrEmpty(values);
|
|
1740
|
-
};
|
|
1741
|
-
watch([enabledItems, () => options.loading], ([values, isLoading]) => {
|
|
1742
|
-
activeId.value = isLoading ? options.emptyOptionId : getResetActiveId(values);
|
|
1743
|
-
const lastIdStillValid = values.some((o) => o.id === lastActiveId.value);
|
|
1744
|
-
if (!lastIdStillValid) {
|
|
1745
|
-
lastActiveId.value = void 0;
|
|
1746
|
-
}
|
|
1747
|
-
prevEnabledIds = enabledIds.value;
|
|
1748
|
-
nextTick(scrollToView);
|
|
1749
|
-
});
|
|
1750
1719
|
const findEnabledIndex = (id) => id === void 0 ? -1 : enabledItems.value.findIndex((o) => o.id === id);
|
|
1751
1720
|
const moveDown = (currentIndex) => {
|
|
1752
1721
|
if (currentIndex < 0) {
|
|
@@ -1813,53 +1782,87 @@ const useListItemKeyboardNav = (options) => {
|
|
|
1813
1782
|
break;
|
|
1814
1783
|
}
|
|
1815
1784
|
};
|
|
1816
|
-
const
|
|
1785
|
+
const isFocused = ref(false);
|
|
1786
|
+
const lastActiveId = ref(void 0);
|
|
1787
|
+
const updateActiveItemId = (didIdsChange = false) => {
|
|
1788
|
+
function assertUnreachable(_) {
|
|
1789
|
+
throw new Error("Exhaustive check not met");
|
|
1790
|
+
}
|
|
1817
1791
|
isFocused.value = true;
|
|
1818
|
-
|
|
1819
|
-
|
|
1792
|
+
switch (itemFocusStrategy) {
|
|
1793
|
+
case "always-first": {
|
|
1794
|
+
activeId.value = enabledItems.value.at(0)?.id;
|
|
1795
|
+
return;
|
|
1796
|
+
}
|
|
1797
|
+
case "persistent": {
|
|
1798
|
+
const hasActiveId = activeId.value !== void 0;
|
|
1799
|
+
if (!didIdsChange && hasActiveId) {
|
|
1800
|
+
return;
|
|
1801
|
+
}
|
|
1802
|
+
const isStillAvailable = enabledItems.value.find(
|
|
1803
|
+
({ id }) => lastActiveId.value === id
|
|
1804
|
+
);
|
|
1805
|
+
activeId.value = isStillAvailable ? lastActiveId.value : enabledItems.value.at(0)?.id;
|
|
1806
|
+
lastActiveId.value = activeId.value;
|
|
1807
|
+
return;
|
|
1808
|
+
}
|
|
1809
|
+
case "noop": {
|
|
1810
|
+
activeId.value = void 0;
|
|
1811
|
+
lastActiveId.value = void 0;
|
|
1812
|
+
return;
|
|
1813
|
+
}
|
|
1814
|
+
default:
|
|
1815
|
+
assertUnreachable();
|
|
1820
1816
|
}
|
|
1821
1817
|
};
|
|
1818
|
+
watch(
|
|
1819
|
+
[enabledItems, () => options.loading],
|
|
1820
|
+
([currentValues, isLoading], [prevValues]) => {
|
|
1821
|
+
if (!isFocused.value) {
|
|
1822
|
+
return;
|
|
1823
|
+
}
|
|
1824
|
+
if (isLoading && options.emptyOptionId) {
|
|
1825
|
+
activeId.value = options.emptyOptionId;
|
|
1826
|
+
return;
|
|
1827
|
+
}
|
|
1828
|
+
const didIdsChange = diffIds(
|
|
1829
|
+
currentValues.map(({ id }) => id),
|
|
1830
|
+
prevValues.map(({ id }) => id)
|
|
1831
|
+
);
|
|
1832
|
+
updateActiveItemId(didIdsChange);
|
|
1833
|
+
}
|
|
1834
|
+
);
|
|
1822
1835
|
const blur = () => {
|
|
1823
|
-
isFocused.value = false;
|
|
1824
1836
|
lastActiveId.value = activeId.value;
|
|
1825
1837
|
activeId.value = void 0;
|
|
1838
|
+
isFocused.value = false;
|
|
1826
1839
|
};
|
|
1827
1840
|
const setActiveId = (id) => {
|
|
1828
1841
|
activeId.value = id;
|
|
1829
1842
|
};
|
|
1830
|
-
const
|
|
1831
|
-
if (!isFocused.value) {
|
|
1832
|
-
setActiveId(void 0);
|
|
1833
|
-
}
|
|
1834
|
-
};
|
|
1835
|
-
const onMousemove = (event) => {
|
|
1836
|
-
const target = event.target?.closest?.(
|
|
1837
|
-
`[role="${toValue(options.listItemRole)}"]`
|
|
1838
|
-
);
|
|
1839
|
-
if (target instanceof HTMLElement && target.id && target.getAttribute("aria-disabled") !== "true") {
|
|
1840
|
-
setActiveId(target.id);
|
|
1841
|
-
} else if (!isFocused.value) {
|
|
1842
|
-
setActiveId(void 0);
|
|
1843
|
-
}
|
|
1844
|
-
};
|
|
1843
|
+
const focus = () => updateActiveItemId();
|
|
1845
1844
|
onMounted(() => {
|
|
1846
1845
|
containerEl.value?.addEventListener("keydown", handleKeydown);
|
|
1847
1846
|
containerEl.value?.addEventListener("focus", focus);
|
|
1848
1847
|
containerEl.value?.addEventListener("blur", blur);
|
|
1849
|
-
containerEl.value?.addEventListener("mousemove", onMousemove);
|
|
1850
|
-
containerEl.value?.addEventListener("mouseleave", onMouseLeave);
|
|
1851
1848
|
});
|
|
1852
1849
|
onUnmounted(() => {
|
|
1853
1850
|
containerEl.value?.removeEventListener("keydown", handleKeydown);
|
|
1854
1851
|
containerEl.value?.removeEventListener("focus", focus);
|
|
1855
1852
|
containerEl.value?.removeEventListener("blur", blur);
|
|
1856
|
-
containerEl.value?.removeEventListener("mousemove", onMousemove);
|
|
1857
|
-
containerEl.value?.removeEventListener("mouseleave", onMouseLeave);
|
|
1858
1853
|
});
|
|
1854
|
+
function scrollSelectedIntoView() {
|
|
1855
|
+
nextTick(() => {
|
|
1856
|
+
const selected = containerEl.value?.querySelector(
|
|
1857
|
+
'[aria-selected="true"]'
|
|
1858
|
+
);
|
|
1859
|
+
selected?.scrollIntoView({ block: "center" });
|
|
1860
|
+
});
|
|
1861
|
+
}
|
|
1859
1862
|
return {
|
|
1860
1863
|
handleKeydown,
|
|
1861
1864
|
activeId: readonly(activeId),
|
|
1862
|
-
focus,
|
|
1865
|
+
focus: updateActiveItemId,
|
|
1863
1866
|
blur,
|
|
1864
1867
|
setActiveId,
|
|
1865
1868
|
scrollSelectedIntoView
|
|
@@ -1910,7 +1913,7 @@ const useStableItemIds = (options) => {
|
|
|
1910
1913
|
return { itemsWithPrefix, idPrefix, toUnprefixedId };
|
|
1911
1914
|
};
|
|
1912
1915
|
|
|
1913
|
-
const _sfc_main$
|
|
1916
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
1914
1917
|
__name: "ListItemAccessory",
|
|
1915
1918
|
props: {
|
|
1916
1919
|
accessory: {},
|
|
@@ -1956,13 +1959,13 @@ const kdsListItemAccessorySize = {
|
|
|
1956
1959
|
LARGE: "large"
|
|
1957
1960
|
};
|
|
1958
1961
|
|
|
1959
|
-
const _hoisted_1$
|
|
1962
|
+
const _hoisted_1$L = ["id", "role", "aria-selected", "aria-disabled"];
|
|
1960
1963
|
const _hoisted_2$r = {
|
|
1961
1964
|
key: 0,
|
|
1962
1965
|
class: "accessory"
|
|
1963
1966
|
};
|
|
1964
|
-
const _hoisted_3$
|
|
1965
|
-
const _hoisted_4$
|
|
1967
|
+
const _hoisted_3$l = { class: "content" };
|
|
1968
|
+
const _hoisted_4$g = ["title"];
|
|
1966
1969
|
const _hoisted_5$7 = {
|
|
1967
1970
|
key: 0,
|
|
1968
1971
|
class: "prefix"
|
|
@@ -1977,7 +1980,7 @@ const _hoisted_9$1 = {
|
|
|
1977
1980
|
key: 3,
|
|
1978
1981
|
class: "trailing-item-reserve-space"
|
|
1979
1982
|
};
|
|
1980
|
-
const _sfc_main$
|
|
1983
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
1981
1984
|
__name: "KdsListItem",
|
|
1982
1985
|
props: {
|
|
1983
1986
|
id: {},
|
|
@@ -2036,13 +2039,13 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2036
2039
|
onClick
|
|
2037
2040
|
}, [
|
|
2038
2041
|
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$r, [
|
|
2039
|
-
createVNode(_sfc_main$
|
|
2042
|
+
createVNode(_sfc_main$1a, {
|
|
2040
2043
|
accessory: props.accessory,
|
|
2041
2044
|
size: accessorySize.value,
|
|
2042
2045
|
disabled: __props.disabled
|
|
2043
2046
|
}, null, 8, ["accessory", "size", "disabled"])
|
|
2044
2047
|
])) : createCommentVNode("", true),
|
|
2045
|
-
createElementVNode("span", _hoisted_3$
|
|
2048
|
+
createElementVNode("span", _hoisted_3$l, [
|
|
2046
2049
|
createElementVNode("span", {
|
|
2047
2050
|
ref_key: "labelEl",
|
|
2048
2051
|
ref: labelEl,
|
|
@@ -2053,7 +2056,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2053
2056
|
createElementVNode("span", {
|
|
2054
2057
|
class: normalizeClass({ special: __props.special })
|
|
2055
2058
|
}, toDisplayString(props.label), 3)
|
|
2056
|
-
], 8, _hoisted_4$
|
|
2059
|
+
], 8, _hoisted_4$g),
|
|
2057
2060
|
props.subText ? (openBlock(), createElementBlock("span", {
|
|
2058
2061
|
key: 0,
|
|
2059
2062
|
ref_key: "subtextEl",
|
|
@@ -2076,20 +2079,20 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2076
2079
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
2077
2080
|
!props.shortcut && !props.trailingIcon && !props.badge ? (openBlock(), createElementBlock("span", _hoisted_9$1)) : createCommentVNode("", true)
|
|
2078
2081
|
])
|
|
2079
|
-
], 10, _hoisted_1$
|
|
2082
|
+
], 10, _hoisted_1$L);
|
|
2080
2083
|
};
|
|
2081
2084
|
}
|
|
2082
2085
|
});
|
|
2083
2086
|
|
|
2084
|
-
const KdsListItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2087
|
+
const KdsListItem = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-def6165b"]]);
|
|
2085
2088
|
|
|
2086
|
-
const _hoisted_1$
|
|
2089
|
+
const _hoisted_1$K = { class: "kds-list-item-section-title" };
|
|
2087
2090
|
const _hoisted_2$q = {
|
|
2088
2091
|
key: 0,
|
|
2089
2092
|
class: "icon"
|
|
2090
2093
|
};
|
|
2091
|
-
const _hoisted_3$
|
|
2092
|
-
const _sfc_main$
|
|
2094
|
+
const _hoisted_3$k = ["title"];
|
|
2095
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
2093
2096
|
__name: "ListItemSectionTitle",
|
|
2094
2097
|
props: {
|
|
2095
2098
|
label: {},
|
|
@@ -2100,7 +2103,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2100
2103
|
const labelEl = useTemplateRef("labelEl");
|
|
2101
2104
|
const { isTruncated } = useKdsIsTruncated(labelEl);
|
|
2102
2105
|
return (_ctx, _cache) => {
|
|
2103
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2106
|
+
return openBlock(), createElementBlock("div", _hoisted_1$K, [
|
|
2104
2107
|
props.leadingIcon ? (openBlock(), createElementBlock("span", _hoisted_2$q, [
|
|
2105
2108
|
createVNode(KdsIcon, {
|
|
2106
2109
|
name: props.leadingIcon,
|
|
@@ -2112,15 +2115,15 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2112
2115
|
ref: labelEl,
|
|
2113
2116
|
class: "label",
|
|
2114
2117
|
title: unref(isTruncated) ? props.label : void 0
|
|
2115
|
-
}, toDisplayString(props.label), 9, _hoisted_3$
|
|
2118
|
+
}, toDisplayString(props.label), 9, _hoisted_3$k)
|
|
2116
2119
|
]);
|
|
2117
2120
|
};
|
|
2118
2121
|
}
|
|
2119
2122
|
});
|
|
2120
2123
|
|
|
2121
|
-
const ListItemSectionTitle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2124
|
+
const ListItemSectionTitle = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["__scopeId", "data-v-5eeb1226"]]);
|
|
2122
2125
|
|
|
2123
|
-
const _sfc_main$
|
|
2126
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
2124
2127
|
__name: "KdsMenuItem",
|
|
2125
2128
|
props: {
|
|
2126
2129
|
item: {},
|
|
@@ -2164,19 +2167,20 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
2164
2167
|
}
|
|
2165
2168
|
});
|
|
2166
2169
|
|
|
2167
|
-
const _hoisted_1$
|
|
2168
|
-
const _sfc_main$
|
|
2170
|
+
const _hoisted_1$J = ["id", "aria-label", "aria-activedescendant"];
|
|
2171
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
2169
2172
|
__name: "KdsMenuContainer",
|
|
2170
2173
|
props: {
|
|
2171
2174
|
id: {},
|
|
2172
2175
|
ariaLabel: { default: "Menu" },
|
|
2173
2176
|
items: {},
|
|
2174
2177
|
menuMaxHeight: {},
|
|
2175
|
-
variant: { default: () => kdsListItemVariant.SMALL }
|
|
2178
|
+
variant: { default: () => kdsListItemVariant.SMALL },
|
|
2179
|
+
itemFocusStrategy: { default: "noop" }
|
|
2176
2180
|
},
|
|
2177
2181
|
emits: ["itemClick"],
|
|
2178
2182
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2179
|
-
const props = createPropsRestProxy(__props, ["ariaLabel", "menuMaxHeight", "variant"]);
|
|
2183
|
+
const props = createPropsRestProxy(__props, ["ariaLabel", "menuMaxHeight", "variant", "itemFocusStrategy"]);
|
|
2180
2184
|
const emit = __emit;
|
|
2181
2185
|
const { itemsWithPrefix, toUnprefixedId } = useStableItemIds({
|
|
2182
2186
|
items: computed(() => props.items)
|
|
@@ -2190,15 +2194,19 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
2190
2194
|
const handleItemInteraction = (item, event) => {
|
|
2191
2195
|
const id = toUnprefixedId(item.id);
|
|
2192
2196
|
const originalItem = props.items.find((i) => i.id === id);
|
|
2193
|
-
|
|
2197
|
+
try {
|
|
2198
|
+
originalItem?.handler?.(originalItem, event);
|
|
2199
|
+
} catch (error) {
|
|
2200
|
+
console.error("Failed while calling item handler", { item, error });
|
|
2201
|
+
}
|
|
2194
2202
|
emit("itemClick", id);
|
|
2195
2203
|
};
|
|
2196
2204
|
const containerEl = useTemplateRef("containerEl");
|
|
2197
|
-
const { activeId
|
|
2205
|
+
const { activeId } = useListItemKeyboardNav({
|
|
2198
2206
|
containerEl,
|
|
2199
2207
|
enabledItems,
|
|
2200
2208
|
selectableItems,
|
|
2201
|
-
|
|
2209
|
+
itemFocusStrategy: __props.itemFocusStrategy,
|
|
2202
2210
|
triggers: {
|
|
2203
2211
|
onEnter: (_activeId, item, event) => {
|
|
2204
2212
|
handleItemInteraction(item, event);
|
|
@@ -2210,11 +2218,11 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
2210
2218
|
});
|
|
2211
2219
|
__expose({
|
|
2212
2220
|
/**
|
|
2213
|
-
* Function to focus the outer container of the menu.
|
|
2221
|
+
* Function to focus the outer container of the menu.
|
|
2222
|
+
* It will follow the behavior defined by the `itemFocusStrategy` prop.
|
|
2214
2223
|
*/
|
|
2215
2224
|
focus: () => {
|
|
2216
2225
|
containerEl.value?.focus();
|
|
2217
|
-
focus();
|
|
2218
2226
|
}
|
|
2219
2227
|
});
|
|
2220
2228
|
return (_ctx, _cache) => {
|
|
@@ -2230,7 +2238,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
2230
2238
|
"aria-activedescendant": unref(activeId)
|
|
2231
2239
|
}, [
|
|
2232
2240
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(itemsWithPrefix), (item, index) => {
|
|
2233
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2241
|
+
return openBlock(), createBlock(_sfc_main$17, {
|
|
2234
2242
|
key: item.id,
|
|
2235
2243
|
item,
|
|
2236
2244
|
"is-last": index === unref(itemsWithPrefix).length - 1,
|
|
@@ -2239,12 +2247,12 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
2239
2247
|
onClick: ($event) => handleItemInteraction(item, $event)
|
|
2240
2248
|
}, null, 8, ["item", "is-last", "active-id", "variant", "onClick"]);
|
|
2241
2249
|
}), 128))
|
|
2242
|
-
], 12, _hoisted_1$
|
|
2250
|
+
], 12, _hoisted_1$J);
|
|
2243
2251
|
};
|
|
2244
2252
|
}
|
|
2245
2253
|
});
|
|
2246
2254
|
|
|
2247
|
-
const KdsMenuContainer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2255
|
+
const KdsMenuContainer = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-69149ee8"]]);
|
|
2248
2256
|
|
|
2249
2257
|
const kdsPopoverPlacement = {
|
|
2250
2258
|
CUSTOM: "custom"
|
|
@@ -2252,12 +2260,12 @@ const kdsPopoverPlacement = {
|
|
|
2252
2260
|
const kdsPopoverType = {
|
|
2253
2261
|
AUTO: "auto"};
|
|
2254
2262
|
|
|
2255
|
-
const _hoisted_1$
|
|
2263
|
+
const _hoisted_1$I = ["id", "popover", "role"];
|
|
2256
2264
|
const _hoisted_2$p = {
|
|
2257
2265
|
key: 0,
|
|
2258
2266
|
class: "kds-popover-default-content"
|
|
2259
2267
|
};
|
|
2260
|
-
const _sfc_main$
|
|
2268
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
2261
2269
|
__name: "KdsPopover",
|
|
2262
2270
|
props: /* @__PURE__ */ mergeModels({
|
|
2263
2271
|
role: {},
|
|
@@ -2317,19 +2325,19 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
2317
2325
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2318
2326
|
props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$p, toDisplayString(props.content), 1)) : createCommentVNode("", true)
|
|
2319
2327
|
], true)
|
|
2320
|
-
], 46, _hoisted_1$
|
|
2328
|
+
], 46, _hoisted_1$I);
|
|
2321
2329
|
};
|
|
2322
2330
|
}
|
|
2323
2331
|
});
|
|
2324
2332
|
|
|
2325
|
-
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2333
|
+
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-1e5f9d24"]]);
|
|
2326
2334
|
|
|
2327
2335
|
const KdsPopover$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
2328
2336
|
__proto__: null,
|
|
2329
2337
|
default: KdsPopover
|
|
2330
2338
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2331
2339
|
|
|
2332
|
-
const _sfc_main$
|
|
2340
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
2333
2341
|
...{
|
|
2334
2342
|
inheritAttrs: false
|
|
2335
2343
|
},
|
|
@@ -2379,7 +2387,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
2379
2387
|
__expose({ menuButtonEl });
|
|
2380
2388
|
return (_ctx, _cache) => {
|
|
2381
2389
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2382
|
-
createVNode(_sfc_main$
|
|
2390
|
+
createVNode(_sfc_main$1c, mergeProps({
|
|
2383
2391
|
ref: "menuButton",
|
|
2384
2392
|
modelValue: isMenuOpen.value,
|
|
2385
2393
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isMenuOpen.value = $event)
|
|
@@ -2412,7 +2420,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
2412
2420
|
}
|
|
2413
2421
|
});
|
|
2414
2422
|
|
|
2415
|
-
const _sfc_main$
|
|
2423
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
2416
2424
|
__name: "KdsSplitButton",
|
|
2417
2425
|
props: {
|
|
2418
2426
|
size: { default: "medium" },
|
|
@@ -2499,7 +2507,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
2499
2507
|
}
|
|
2500
2508
|
});
|
|
2501
2509
|
|
|
2502
|
-
const KdsSplitButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2510
|
+
const KdsSplitButton = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-8f48b87a"]]);
|
|
2503
2511
|
|
|
2504
2512
|
const kdsButtonSize = {
|
|
2505
2513
|
XSMALL: "xsmall",
|
|
@@ -2515,17 +2523,17 @@ const kdsButtonVariant = {
|
|
|
2515
2523
|
};
|
|
2516
2524
|
const kdsButtonVariants = Object.values(kdsButtonVariant);
|
|
2517
2525
|
|
|
2518
|
-
const _hoisted_1$
|
|
2526
|
+
const _hoisted_1$H = ["aria-disabled"];
|
|
2519
2527
|
const _hoisted_2$o = { class: "kds-empty-state-headline" };
|
|
2520
|
-
const _hoisted_3$
|
|
2528
|
+
const _hoisted_3$j = {
|
|
2521
2529
|
key: 1,
|
|
2522
2530
|
class: "kds-empty-state-description"
|
|
2523
2531
|
};
|
|
2524
|
-
const _hoisted_4$
|
|
2532
|
+
const _hoisted_4$f = {
|
|
2525
2533
|
key: 2,
|
|
2526
2534
|
class: "kds-empty-state-action"
|
|
2527
2535
|
};
|
|
2528
|
-
const _sfc_main$
|
|
2536
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
2529
2537
|
__name: "KdsEmptyState",
|
|
2530
2538
|
props: {
|
|
2531
2539
|
headline: {},
|
|
@@ -2543,13 +2551,13 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
2543
2551
|
() => props.button && "to" in props.button && props.button.to !== void 0
|
|
2544
2552
|
);
|
|
2545
2553
|
const buttonComponent = computed(
|
|
2546
|
-
() => isLinkButton.value ? _sfc_main$
|
|
2554
|
+
() => isLinkButton.value ? _sfc_main$1e : _sfc_main$1f
|
|
2547
2555
|
);
|
|
2548
2556
|
const isSecondaryLinkButton = computed(
|
|
2549
2557
|
() => props.secondaryButton && "to" in props.secondaryButton && props.secondaryButton.to !== void 0
|
|
2550
2558
|
);
|
|
2551
2559
|
const secondaryButtonComponent = computed(
|
|
2552
|
-
() => isSecondaryLinkButton.value ? _sfc_main$
|
|
2560
|
+
() => isSecondaryLinkButton.value ? _sfc_main$1e : _sfc_main$1f
|
|
2553
2561
|
);
|
|
2554
2562
|
return (_ctx, _cache) => {
|
|
2555
2563
|
return openBlock(), createElementBlock("div", {
|
|
@@ -2564,8 +2572,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
2564
2572
|
"aria-hidden": "true"
|
|
2565
2573
|
})) : createCommentVNode("", true),
|
|
2566
2574
|
createElementVNode("p", _hoisted_2$o, toDisplayString(props.headline), 1),
|
|
2567
|
-
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$
|
|
2568
|
-
props.button ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
2575
|
+
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$j, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
2576
|
+
props.button ? (openBlock(), createElementBlock("div", _hoisted_4$f, [
|
|
2569
2577
|
(openBlock(), createBlock(resolveDynamicComponent(buttonComponent.value), mergeProps(props.button, {
|
|
2570
2578
|
disabled: props.button?.disabled || __props.disabled,
|
|
2571
2579
|
onClick: _cache[0] || (_cache[0] = ($event) => !__props.disabled && emit("buttonClick", $event))
|
|
@@ -2575,17 +2583,16 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
2575
2583
|
onClick: _cache[1] || (_cache[1] = ($event) => !__props.disabled && emit("secondaryButtonClick", $event))
|
|
2576
2584
|
}), null, 16, ["disabled"])) : createCommentVNode("", true)
|
|
2577
2585
|
])) : createCommentVNode("", true)
|
|
2578
|
-
], 10, _hoisted_1$
|
|
2586
|
+
], 10, _hoisted_1$H);
|
|
2579
2587
|
};
|
|
2580
2588
|
}
|
|
2581
2589
|
});
|
|
2582
2590
|
|
|
2583
|
-
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2591
|
+
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-e913660a"]]);
|
|
2584
2592
|
|
|
2585
|
-
const _hoisted_1$
|
|
2586
|
-
const _hoisted_2$n = ["role"];
|
|
2593
|
+
const _hoisted_1$G = ["aria-busy", "aria-label", "aria-activedescendant", "tabindex"];
|
|
2587
2594
|
const loadingStateText = "Loading entries";
|
|
2588
|
-
const _sfc_main
|
|
2595
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
2589
2596
|
__name: "KdsListContainer",
|
|
2590
2597
|
props: {
|
|
2591
2598
|
possibleValues: {},
|
|
@@ -2595,11 +2602,11 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
2595
2602
|
ariaLabel: {},
|
|
2596
2603
|
controlledExternally: { type: Boolean },
|
|
2597
2604
|
allowNoSelection: { type: Boolean, default: false },
|
|
2598
|
-
|
|
2605
|
+
itemFocusStrategy: { default: "persistent" }
|
|
2599
2606
|
},
|
|
2600
2607
|
emits: ["itemClick"],
|
|
2601
2608
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2602
|
-
const props = createPropsRestProxy(__props, ["emptyText", "variant", "loading", "
|
|
2609
|
+
const props = createPropsRestProxy(__props, ["emptyText", "variant", "loading", "allowNoSelection", "itemFocusStrategy"]);
|
|
2603
2610
|
const emit = __emit;
|
|
2604
2611
|
const { itemsWithPrefix, idPrefix, toUnprefixedId } = useStableItemIds({
|
|
2605
2612
|
items: computed(() => __props.loading ? [] : props.possibleValues)
|
|
@@ -2615,9 +2622,6 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
2615
2622
|
() => itemsWithPrefix.value.filter((item) => !item.sectionHeadline)
|
|
2616
2623
|
);
|
|
2617
2624
|
const containerEl = useTemplateRef("containerEl");
|
|
2618
|
-
const listItemRole = computed(() => {
|
|
2619
|
-
return __props.role === "listbox" ? "option" : "menuitem";
|
|
2620
|
-
});
|
|
2621
2625
|
const enabledValues = computed(
|
|
2622
2626
|
() => selectableValues.value.filter((o) => !o.disabled)
|
|
2623
2627
|
);
|
|
@@ -2628,7 +2632,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
2628
2632
|
allowNoSelection: __props.allowNoSelection,
|
|
2629
2633
|
emptyOptionId,
|
|
2630
2634
|
loading: __props.loading,
|
|
2631
|
-
|
|
2635
|
+
itemFocusStrategy: __props.itemFocusStrategy,
|
|
2632
2636
|
triggers: {
|
|
2633
2637
|
onEnter: () => {
|
|
2634
2638
|
emit("itemClick", toOptionId(activeId.value));
|
|
@@ -2656,14 +2660,11 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
2656
2660
|
return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
|
|
2657
2661
|
ref_key: "containerEl",
|
|
2658
2662
|
ref: containerEl,
|
|
2659
|
-
role:
|
|
2663
|
+
role: "listbox",
|
|
2660
2664
|
"aria-busy": __props.loading,
|
|
2661
2665
|
"aria-label": props.ariaLabel,
|
|
2662
2666
|
"aria-activedescendant": !props.controlledExternally && unref(activeId) ? unref(activeId) : void 0,
|
|
2663
|
-
class: [
|
|
2664
|
-
"kds-list-container",
|
|
2665
|
-
{ standalone: !props.controlledExternally, menu: __props.role === "menu" }
|
|
2666
|
-
],
|
|
2667
|
+
class: ["kds-list-container", { standalone: !props.controlledExternally }],
|
|
2667
2668
|
tabindex: props.controlledExternally ? void 0 : 0
|
|
2668
2669
|
}), [
|
|
2669
2670
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(itemsWithPrefix), (item, index) => {
|
|
@@ -2689,10 +2690,10 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
2689
2690
|
missing: item.missing,
|
|
2690
2691
|
variant: __props.variant,
|
|
2691
2692
|
"trailing-icon": item.missing && !item.disabled ? "trash" : item.selected ? "checkmark" : void 0,
|
|
2692
|
-
role:
|
|
2693
|
+
role: "option",
|
|
2693
2694
|
onMousedown: _cache[0] || (_cache[0] = ($event) => props.controlledExternally && $event.preventDefault()),
|
|
2694
2695
|
onClick: ($event) => !item.disabled && emit("itemClick", toOptionId(item.id))
|
|
2695
|
-
}, null, 8, ["id", "accessory", "label", "sub-text", "selected", "disabled", "active", "special", "missing", "variant", "trailing-icon", "
|
|
2696
|
+
}, null, 8, ["id", "accessory", "label", "sub-text", "selected", "disabled", "active", "special", "missing", "variant", "trailing-icon", "onClick"])),
|
|
2696
2697
|
item.separator && index < unref(itemsWithPrefix).length - 1 ? (openBlock(), createBlock(unref(KdsDivider), {
|
|
2697
2698
|
key: 2,
|
|
2698
2699
|
class: "kds-list-item-divider",
|
|
@@ -2704,7 +2705,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
2704
2705
|
selectableValues.value.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
2705
2706
|
key: 0,
|
|
2706
2707
|
id: emptyOptionId,
|
|
2707
|
-
role:
|
|
2708
|
+
role: "option",
|
|
2708
2709
|
"aria-disabled": "true",
|
|
2709
2710
|
"aria-selected": "false",
|
|
2710
2711
|
class: "kds-list-container-empty"
|
|
@@ -2713,20 +2714,20 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
2713
2714
|
headline: __props.loading ? loadingStateText : __props.emptyText,
|
|
2714
2715
|
"loading-spinner": __props.loading
|
|
2715
2716
|
}, null, 8, ["headline", "loading-spinner"])
|
|
2716
|
-
]
|
|
2717
|
-
], 16, _hoisted_1$
|
|
2717
|
+
])) : createCommentVNode("", true)
|
|
2718
|
+
], 16, _hoisted_1$G);
|
|
2718
2719
|
};
|
|
2719
2720
|
}
|
|
2720
2721
|
});
|
|
2721
2722
|
|
|
2722
|
-
const KdsListContainer = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
2723
|
+
const KdsListContainer = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-570992f0"]]);
|
|
2723
2724
|
|
|
2724
2725
|
const KdsListContainer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
2725
2726
|
__proto__: null,
|
|
2726
2727
|
default: KdsListContainer
|
|
2727
2728
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2728
2729
|
|
|
2729
|
-
const _sfc_main$
|
|
2730
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
2730
2731
|
...{ inheritAttrs: false },
|
|
2731
2732
|
__name: "KdsMenu",
|
|
2732
2733
|
props: {
|
|
@@ -2743,8 +2744,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
2743
2744
|
const popoverEl = useTemplateRef("popover");
|
|
2744
2745
|
const menuContainerEl = useTemplateRef("menuContainer");
|
|
2745
2746
|
const menuId = useId();
|
|
2746
|
-
watch(isMenuOpen, async (
|
|
2747
|
-
if (!
|
|
2747
|
+
watch(isMenuOpen, async () => {
|
|
2748
|
+
if (!isMenuOpen.value) {
|
|
2748
2749
|
return;
|
|
2749
2750
|
}
|
|
2750
2751
|
await nextTick();
|
|
@@ -2815,7 +2816,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
2815
2816
|
}
|
|
2816
2817
|
});
|
|
2817
2818
|
|
|
2818
|
-
const _sfc_main
|
|
2819
|
+
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
2819
2820
|
...{ inheritAttrs: false },
|
|
2820
2821
|
__name: "KdsContextMenu",
|
|
2821
2822
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -2839,6 +2840,14 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
2839
2840
|
open.value = false;
|
|
2840
2841
|
emit("itemClick", itemId);
|
|
2841
2842
|
};
|
|
2843
|
+
const menuContainerEl = useTemplateRef("menuContainer");
|
|
2844
|
+
watch(open, async (isOpen) => {
|
|
2845
|
+
if (!isOpen) {
|
|
2846
|
+
return;
|
|
2847
|
+
}
|
|
2848
|
+
await nextTick();
|
|
2849
|
+
menuContainerEl.value?.focus();
|
|
2850
|
+
});
|
|
2842
2851
|
return (_ctx, _cache) => {
|
|
2843
2852
|
return openBlock(), createBlock(KdsPopover, {
|
|
2844
2853
|
modelValue: open.value,
|
|
@@ -2851,6 +2860,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
2851
2860
|
default: withCtx(() => [
|
|
2852
2861
|
createVNode(KdsMenuContainer, {
|
|
2853
2862
|
id: props.id,
|
|
2863
|
+
ref: "menuContainer",
|
|
2854
2864
|
"aria-label": props.ariaLabel,
|
|
2855
2865
|
items: props.items,
|
|
2856
2866
|
"menu-max-height": __props.menuMaxHeight,
|
|
@@ -2866,9 +2876,9 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
2866
2876
|
}
|
|
2867
2877
|
});
|
|
2868
2878
|
|
|
2869
|
-
const _hoisted_1$
|
|
2870
|
-
const _hoisted_2$
|
|
2871
|
-
const _sfc_main$
|
|
2879
|
+
const _hoisted_1$F = { class: "kds-label-wrapper" };
|
|
2880
|
+
const _hoisted_2$n = ["id", "for", "title"];
|
|
2881
|
+
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
2872
2882
|
__name: "KdsLabel",
|
|
2873
2883
|
props: {
|
|
2874
2884
|
label: {},
|
|
@@ -2885,7 +2895,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2885
2895
|
const labelEl = useTemplateRef("labelEl");
|
|
2886
2896
|
const { isTruncated } = useKdsIsTruncated(labelEl);
|
|
2887
2897
|
return (_ctx, _cache) => {
|
|
2888
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2898
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
2889
2899
|
createElementVNode("label", {
|
|
2890
2900
|
id: props.id,
|
|
2891
2901
|
ref_key: "labelEl",
|
|
@@ -2893,7 +2903,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2893
2903
|
for: props.for,
|
|
2894
2904
|
class: "label",
|
|
2895
2905
|
title: unref(isTruncated) ? props.label : void 0
|
|
2896
|
-
}, toDisplayString(props.label), 9, _hoisted_2$
|
|
2906
|
+
}, toDisplayString(props.label), 9, _hoisted_2$n),
|
|
2897
2907
|
props.description ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
|
|
2898
2908
|
key: 0,
|
|
2899
2909
|
content: props.description,
|
|
@@ -2904,11 +2914,11 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2904
2914
|
}
|
|
2905
2915
|
});
|
|
2906
2916
|
|
|
2907
|
-
const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2917
|
+
const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-efe3313e"]]);
|
|
2908
2918
|
|
|
2909
|
-
const _hoisted_1$
|
|
2910
|
-
const _hoisted_2$
|
|
2911
|
-
const _sfc_main$
|
|
2919
|
+
const _hoisted_1$E = ["id"];
|
|
2920
|
+
const _hoisted_2$m = { class: "subtext-text" };
|
|
2921
|
+
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
2912
2922
|
__name: "KdsSubText",
|
|
2913
2923
|
props: {
|
|
2914
2924
|
id: {},
|
|
@@ -2939,27 +2949,27 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
2939
2949
|
variant: "onSurface",
|
|
2940
2950
|
"aria-hidden": "true"
|
|
2941
2951
|
})) : createCommentVNode("", true),
|
|
2942
|
-
createElementVNode("span", _hoisted_2$
|
|
2943
|
-
], 10, _hoisted_1$
|
|
2952
|
+
createElementVNode("span", _hoisted_2$m, toDisplayString(props.subText), 1)
|
|
2953
|
+
], 10, _hoisted_1$E)) : createCommentVNode("", true);
|
|
2944
2954
|
};
|
|
2945
2955
|
}
|
|
2946
2956
|
});
|
|
2947
2957
|
|
|
2948
|
-
const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2958
|
+
const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-2e6ba10c"]]);
|
|
2949
2959
|
|
|
2950
|
-
const _hoisted_1$
|
|
2951
|
-
const _hoisted_2$
|
|
2952
|
-
const _hoisted_3$
|
|
2960
|
+
const _hoisted_1$D = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
|
|
2961
|
+
const _hoisted_2$l = { class: "control" };
|
|
2962
|
+
const _hoisted_3$i = {
|
|
2953
2963
|
key: 0,
|
|
2954
2964
|
class: "content"
|
|
2955
2965
|
};
|
|
2956
|
-
const _hoisted_4$
|
|
2966
|
+
const _hoisted_4$e = { class: "label" };
|
|
2957
2967
|
const _hoisted_5$6 = ["id"];
|
|
2958
2968
|
const _hoisted_6$5 = {
|
|
2959
2969
|
key: 0,
|
|
2960
2970
|
class: "subtext-wrapper"
|
|
2961
2971
|
};
|
|
2962
|
-
const _sfc_main$
|
|
2972
|
+
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
2963
2973
|
__name: "BaseCheckbox",
|
|
2964
2974
|
props: /* @__PURE__ */ mergeModels({
|
|
2965
2975
|
disabled: { type: Boolean, default: false },
|
|
@@ -3032,7 +3042,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
3032
3042
|
role: "checkbox",
|
|
3033
3043
|
onClick: handleClick
|
|
3034
3044
|
}, [
|
|
3035
|
-
createElementVNode("div", _hoisted_2$
|
|
3045
|
+
createElementVNode("div", _hoisted_2$l, [
|
|
3036
3046
|
icon.value ? (openBlock(), createBlock(KdsIcon, {
|
|
3037
3047
|
key: 0,
|
|
3038
3048
|
name: icon.value,
|
|
@@ -3040,15 +3050,15 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
3040
3050
|
size: "xsmall"
|
|
3041
3051
|
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
3042
3052
|
]),
|
|
3043
|
-
props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
3044
|
-
createElementVNode("div", _hoisted_4$
|
|
3053
|
+
props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$i, [
|
|
3054
|
+
createElementVNode("div", _hoisted_4$e, toDisplayString(props.label), 1),
|
|
3045
3055
|
props.helperText ? (openBlock(), createElementBlock("div", {
|
|
3046
3056
|
key: 0,
|
|
3047
3057
|
id: unref(helperId),
|
|
3048
3058
|
class: "helper-text"
|
|
3049
3059
|
}, toDisplayString(props.helperText), 9, _hoisted_5$6)) : createCommentVNode("", true)
|
|
3050
3060
|
])) : createCommentVNode("", true)
|
|
3051
|
-
], 10, _hoisted_1$
|
|
3061
|
+
], 10, _hoisted_1$D),
|
|
3052
3062
|
props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$5, [
|
|
3053
3063
|
createVNode(KdsSubText, {
|
|
3054
3064
|
id: unref(descriptionId),
|
|
@@ -3062,9 +3072,9 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
3062
3072
|
}
|
|
3063
3073
|
});
|
|
3064
3074
|
|
|
3065
|
-
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3075
|
+
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-7bfc5667"]]);
|
|
3066
3076
|
|
|
3067
|
-
const _sfc_main$
|
|
3077
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
3068
3078
|
__name: "KdsCheckbox",
|
|
3069
3079
|
props: /* @__PURE__ */ mergeModels({
|
|
3070
3080
|
disabled: { type: Boolean, default: false },
|
|
@@ -3094,11 +3104,11 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
3094
3104
|
}
|
|
3095
3105
|
});
|
|
3096
3106
|
|
|
3097
|
-
const _hoisted_1$
|
|
3098
|
-
const _hoisted_2$
|
|
3099
|
-
const _hoisted_3$
|
|
3100
|
-
const _hoisted_4$
|
|
3101
|
-
const _sfc_main$
|
|
3107
|
+
const _hoisted_1$C = ["id", "role", "aria-label", "aria-labelledby", "aria-describedby"];
|
|
3108
|
+
const _hoisted_2$k = ["id"];
|
|
3109
|
+
const _hoisted_3$h = ["title"];
|
|
3110
|
+
const _hoisted_4$d = { class: "kds-fieldset-content" };
|
|
3111
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
3102
3112
|
__name: "BaseFieldsetWrapper",
|
|
3103
3113
|
props: {
|
|
3104
3114
|
id: {},
|
|
@@ -3144,14 +3154,14 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3144
3154
|
ref: legendTextEl,
|
|
3145
3155
|
class: "legend-text",
|
|
3146
3156
|
title: unref(isTruncated) ? props.label : void 0
|
|
3147
|
-
}, toDisplayString(props.label), 9, _hoisted_3$
|
|
3157
|
+
}, toDisplayString(props.label), 9, _hoisted_3$h),
|
|
3148
3158
|
props.description ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
|
|
3149
3159
|
key: 0,
|
|
3150
3160
|
content: props.description,
|
|
3151
3161
|
hidden: !isHovered.value
|
|
3152
3162
|
}, null, 8, ["content", "hidden"])) : createCommentVNode("", true)
|
|
3153
|
-
], 8, _hoisted_2$
|
|
3154
|
-
createElementVNode("div", _hoisted_4$
|
|
3163
|
+
], 8, _hoisted_2$k)) : createCommentVNode("", true),
|
|
3164
|
+
createElementVNode("div", _hoisted_4$d, [
|
|
3155
3165
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3156
3166
|
]),
|
|
3157
3167
|
createVNode(KdsSubText, {
|
|
@@ -3161,14 +3171,14 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3161
3171
|
validating: props.validating,
|
|
3162
3172
|
"preserve-sub-text-space": props.preserveSubTextSpace
|
|
3163
3173
|
}, null, 8, ["id", "sub-text", "error", "validating", "preserve-sub-text-space"])
|
|
3164
|
-
], 40, _hoisted_1$
|
|
3174
|
+
], 40, _hoisted_1$C);
|
|
3165
3175
|
};
|
|
3166
3176
|
}
|
|
3167
3177
|
});
|
|
3168
3178
|
|
|
3169
|
-
const BaseFieldsetWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3179
|
+
const BaseFieldsetWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-a44731da"]]);
|
|
3170
3180
|
|
|
3171
|
-
const _sfc_main$
|
|
3181
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
3172
3182
|
__name: "KdsCheckboxGroup",
|
|
3173
3183
|
props: /* @__PURE__ */ mergeModels({
|
|
3174
3184
|
id: {},
|
|
@@ -3247,7 +3257,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3247
3257
|
}
|
|
3248
3258
|
});
|
|
3249
3259
|
|
|
3250
|
-
const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3260
|
+
const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-c6536296"]]);
|
|
3251
3261
|
|
|
3252
3262
|
const kdsCheckboxGroupAlignment = {
|
|
3253
3263
|
VERTICAL: "vertical",
|
|
@@ -3263,19 +3273,19 @@ const kdsCheckboxValue = {
|
|
|
3263
3273
|
};
|
|
3264
3274
|
const kdsCheckboxValues = Object.values(kdsCheckboxValue);
|
|
3265
3275
|
|
|
3266
|
-
const _hoisted_1$
|
|
3267
|
-
const _hoisted_2$
|
|
3268
|
-
const _hoisted_3$
|
|
3276
|
+
const _hoisted_1$B = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
|
|
3277
|
+
const _hoisted_2$j = { class: "control" };
|
|
3278
|
+
const _hoisted_3$g = {
|
|
3269
3279
|
key: 0,
|
|
3270
3280
|
class: "dot",
|
|
3271
3281
|
viewBox: "0 0 2 2",
|
|
3272
3282
|
"aria-hidden": "true",
|
|
3273
3283
|
focusable: "false"
|
|
3274
3284
|
};
|
|
3275
|
-
const _hoisted_4$
|
|
3285
|
+
const _hoisted_4$c = { class: "content" };
|
|
3276
3286
|
const _hoisted_5$5 = { class: "label" };
|
|
3277
3287
|
const _hoisted_6$4 = ["id"];
|
|
3278
|
-
const _sfc_main$
|
|
3288
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
3279
3289
|
__name: "KdsRadioButton",
|
|
3280
3290
|
props: /* @__PURE__ */ mergeModels({
|
|
3281
3291
|
text: {},
|
|
@@ -3315,8 +3325,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3315
3325
|
type: "button",
|
|
3316
3326
|
onClick: handleClick
|
|
3317
3327
|
}, [
|
|
3318
|
-
createElementVNode("div", _hoisted_2$
|
|
3319
|
-
modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$
|
|
3328
|
+
createElementVNode("div", _hoisted_2$j, [
|
|
3329
|
+
modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$g, [..._cache[0] || (_cache[0] = [
|
|
3320
3330
|
createElementVNode("circle", {
|
|
3321
3331
|
cx: "1",
|
|
3322
3332
|
cy: "1",
|
|
@@ -3324,7 +3334,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3324
3334
|
}, null, -1)
|
|
3325
3335
|
])])) : createCommentVNode("", true)
|
|
3326
3336
|
]),
|
|
3327
|
-
createElementVNode("div", _hoisted_4$
|
|
3337
|
+
createElementVNode("div", _hoisted_4$c, [
|
|
3328
3338
|
createElementVNode("div", _hoisted_5$5, toDisplayString(props.text), 1),
|
|
3329
3339
|
props.helperText ? (openBlock(), createElementBlock("div", {
|
|
3330
3340
|
key: 0,
|
|
@@ -3332,12 +3342,12 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3332
3342
|
class: "helper-text"
|
|
3333
3343
|
}, toDisplayString(props.helperText), 9, _hoisted_6$4)) : createCommentVNode("", true)
|
|
3334
3344
|
])
|
|
3335
|
-
], 10, _hoisted_1$
|
|
3345
|
+
], 10, _hoisted_1$B);
|
|
3336
3346
|
};
|
|
3337
3347
|
}
|
|
3338
3348
|
});
|
|
3339
3349
|
|
|
3340
|
-
const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3350
|
+
const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-f4f6392a"]]);
|
|
3341
3351
|
|
|
3342
3352
|
const useRadioSelection = ({
|
|
3343
3353
|
selectedId,
|
|
@@ -3459,7 +3469,7 @@ const useRadioSelection = ({
|
|
|
3459
3469
|
};
|
|
3460
3470
|
};
|
|
3461
3471
|
|
|
3462
|
-
const _sfc_main$
|
|
3472
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
3463
3473
|
__name: "KdsRadioButtonGroup",
|
|
3464
3474
|
props: /* @__PURE__ */ mergeModels({
|
|
3465
3475
|
id: {},
|
|
@@ -3534,10 +3544,10 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
3534
3544
|
}
|
|
3535
3545
|
});
|
|
3536
3546
|
|
|
3537
|
-
const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3547
|
+
const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-d78ed4a2"]]);
|
|
3538
3548
|
|
|
3539
|
-
const _hoisted_1$
|
|
3540
|
-
const _sfc_main$
|
|
3549
|
+
const _hoisted_1$A = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
|
|
3550
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
3541
3551
|
__name: "ValueSwitchItem",
|
|
3542
3552
|
props: {
|
|
3543
3553
|
selected: { type: Boolean },
|
|
@@ -3587,12 +3597,12 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
3587
3597
|
name: props.trailingIcon,
|
|
3588
3598
|
size: __props.size
|
|
3589
3599
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
3590
|
-
], 10, _hoisted_1$
|
|
3600
|
+
], 10, _hoisted_1$A);
|
|
3591
3601
|
};
|
|
3592
3602
|
}
|
|
3593
3603
|
});
|
|
3594
3604
|
|
|
3595
|
-
const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3605
|
+
const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-5c6f0f1f"]]);
|
|
3596
3606
|
|
|
3597
3607
|
const useValueSwitchIconHiding = ({
|
|
3598
3608
|
width,
|
|
@@ -3643,7 +3653,7 @@ const useValueSwitchIconHiding = ({
|
|
|
3643
3653
|
};
|
|
3644
3654
|
};
|
|
3645
3655
|
|
|
3646
|
-
const _sfc_main$
|
|
3656
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
3647
3657
|
__name: "KdsValueSwitch",
|
|
3648
3658
|
props: /* @__PURE__ */ mergeModels({
|
|
3649
3659
|
id: {},
|
|
@@ -3730,7 +3740,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
3730
3740
|
}
|
|
3731
3741
|
});
|
|
3732
3742
|
|
|
3733
|
-
const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3743
|
+
const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-640271e0"]]);
|
|
3734
3744
|
|
|
3735
3745
|
const kdsRadioButtonGroupAlignment = {
|
|
3736
3746
|
VERTICAL: "vertical",
|
|
@@ -3750,7 +3760,7 @@ const kdsValueSwitchVariant = {
|
|
|
3750
3760
|
};
|
|
3751
3761
|
const kdsValueSwitchVariants = Object.values(kdsValueSwitchVariant);
|
|
3752
3762
|
|
|
3753
|
-
const _sfc_main$
|
|
3763
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
3754
3764
|
__name: "BaseFormFieldWrapper",
|
|
3755
3765
|
props: {
|
|
3756
3766
|
id: {},
|
|
@@ -3802,7 +3812,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
3802
3812
|
}
|
|
3803
3813
|
});
|
|
3804
3814
|
|
|
3805
|
-
const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3815
|
+
const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-5d99c134"]]);
|
|
3806
3816
|
|
|
3807
3817
|
const MIN_SEGMENT_INDEX = 0;
|
|
3808
3818
|
const LARGE_STEP = 10;
|
|
@@ -4482,16 +4492,16 @@ const useInputSegments = (modelValue, getInputElement, configRef) => {
|
|
|
4482
4492
|
};
|
|
4483
4493
|
};
|
|
4484
4494
|
|
|
4485
|
-
const _hoisted_1$
|
|
4495
|
+
const _hoisted_1$z = {
|
|
4486
4496
|
key: 0,
|
|
4487
4497
|
class: "icon-wrapper leading"
|
|
4488
4498
|
};
|
|
4489
|
-
const _hoisted_2$
|
|
4499
|
+
const _hoisted_2$i = {
|
|
4490
4500
|
key: 1,
|
|
4491
4501
|
class: "leading-slot"
|
|
4492
4502
|
};
|
|
4493
|
-
const _hoisted_3$
|
|
4494
|
-
const _hoisted_4$
|
|
4503
|
+
const _hoisted_3$f = ["id", "value", "type", "inputmode", "placeholder", "disabled", "autocomplete", "min", "max", "step", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "role", "pattern", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext", "aria-activedescendant", "aria-haspopup", "aria-controls", "aria-expanded", "aria-autocomplete"];
|
|
4504
|
+
const _hoisted_4$b = ["aria-disabled"];
|
|
4495
4505
|
const _hoisted_5$4 = {
|
|
4496
4506
|
key: 4,
|
|
4497
4507
|
class: "trailing-slot"
|
|
@@ -4500,7 +4510,7 @@ const _hoisted_6$3 = {
|
|
|
4500
4510
|
key: 5,
|
|
4501
4511
|
class: "icon-wrapper trailing"
|
|
4502
4512
|
};
|
|
4503
|
-
const _sfc_main$
|
|
4513
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
4504
4514
|
__name: "BaseInput",
|
|
4505
4515
|
props: /* @__PURE__ */ mergeModels({
|
|
4506
4516
|
id: {},
|
|
@@ -4651,13 +4661,13 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4651
4661
|
}),
|
|
4652
4662
|
onClick: handleContainerClick
|
|
4653
4663
|
}, [
|
|
4654
|
-
props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4664
|
+
props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$z, [
|
|
4655
4665
|
props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
4656
4666
|
key: 0,
|
|
4657
4667
|
name: props.leadingIcon
|
|
4658
4668
|
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
4659
4669
|
])) : createCommentVNode("", true),
|
|
4660
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
4670
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
|
|
4661
4671
|
renderSlot(_ctx.$slots, "leading", {}, void 0, true)
|
|
4662
4672
|
])) : createCommentVNode("", true),
|
|
4663
4673
|
createElementVNode("input", {
|
|
@@ -4702,7 +4712,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4702
4712
|
onCut: handleInputCut,
|
|
4703
4713
|
onDrop: handleInputDrop,
|
|
4704
4714
|
onDragend: handleInputDragEnd
|
|
4705
|
-
}, null, 42, _hoisted_3$
|
|
4715
|
+
}, null, 42, _hoisted_3$f),
|
|
4706
4716
|
props.unit ? (openBlock(), createElementBlock("span", {
|
|
4707
4717
|
key: 2,
|
|
4708
4718
|
class: normalizeClass({
|
|
@@ -4711,11 +4721,10 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4711
4721
|
disabled: __props.disabled
|
|
4712
4722
|
}),
|
|
4713
4723
|
"aria-disabled": __props.disabled || void 0
|
|
4714
|
-
}, toDisplayString(props.unit), 11, _hoisted_4$
|
|
4715
|
-
__props.clearable && hasValue.value && !__props.disabled ? (openBlock(), createBlock(_sfc_main$
|
|
4724
|
+
}, toDisplayString(props.unit), 11, _hoisted_4$b)) : createCommentVNode("", true),
|
|
4725
|
+
__props.clearable && hasValue.value && !__props.disabled ? (openBlock(), createBlock(_sfc_main$1f, {
|
|
4716
4726
|
key: 3,
|
|
4717
4727
|
class: "clear-button",
|
|
4718
|
-
type: "button",
|
|
4719
4728
|
size: "xsmall",
|
|
4720
4729
|
variant: "transparent",
|
|
4721
4730
|
"leading-icon": "x-close",
|
|
@@ -4736,7 +4745,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4736
4745
|
}
|
|
4737
4746
|
});
|
|
4738
4747
|
|
|
4739
|
-
const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4748
|
+
const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-b8ccb955"]]);
|
|
4740
4749
|
|
|
4741
4750
|
const usePointerHandler = (updateFromEvent) => {
|
|
4742
4751
|
const activePointerId = ref(null);
|
|
@@ -4909,7 +4918,7 @@ const createKdsNumberParser = (params) => {
|
|
|
4909
4918
|
|
|
4910
4919
|
const REPEAT_INITIAL_DELAY_MS = 400;
|
|
4911
4920
|
const REPEAT_INTERVAL_MS = 100;
|
|
4912
|
-
const _sfc_main$
|
|
4921
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
4913
4922
|
__name: "KdsNumberInput",
|
|
4914
4923
|
props: /* @__PURE__ */ mergeModels({
|
|
4915
4924
|
description: {},
|
|
@@ -5095,8 +5104,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5095
5104
|
onBlur: handleBlur
|
|
5096
5105
|
}), {
|
|
5097
5106
|
trailing: withCtx(() => [
|
|
5098
|
-
createVNode(_sfc_main$
|
|
5099
|
-
type: "button",
|
|
5107
|
+
createVNode(_sfc_main$1f, {
|
|
5100
5108
|
size: "xsmall",
|
|
5101
5109
|
variant: "outlined",
|
|
5102
5110
|
"leading-icon": "minus",
|
|
@@ -5108,8 +5116,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5108
5116
|
onPointerleave: stopRepeating,
|
|
5109
5117
|
onPointercancel: stopRepeating
|
|
5110
5118
|
}, null, 8, ["ariaLabel", "disabled"]),
|
|
5111
|
-
createVNode(_sfc_main$
|
|
5112
|
-
type: "button",
|
|
5119
|
+
createVNode(_sfc_main$1f, {
|
|
5113
5120
|
size: "xsmall",
|
|
5114
5121
|
variant: "outlined",
|
|
5115
5122
|
"leading-icon": "plus",
|
|
@@ -5131,7 +5138,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5131
5138
|
}
|
|
5132
5139
|
});
|
|
5133
5140
|
|
|
5134
|
-
const _sfc_main$
|
|
5141
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
5135
5142
|
__name: "KdsTextInput",
|
|
5136
5143
|
props: /* @__PURE__ */ mergeModels({
|
|
5137
5144
|
description: {},
|
|
@@ -5301,7 +5308,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5301
5308
|
}
|
|
5302
5309
|
});
|
|
5303
5310
|
|
|
5304
|
-
const KdsTextInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5311
|
+
const KdsTextInput = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-c9f1be40"]]);
|
|
5305
5312
|
|
|
5306
5313
|
const HEX_RADIX = 16;
|
|
5307
5314
|
const RGB_MAX = 255;
|
|
@@ -5448,8 +5455,8 @@ const removeAlphaFromHexInput = (next) => {
|
|
|
5448
5455
|
return next;
|
|
5449
5456
|
};
|
|
5450
5457
|
|
|
5451
|
-
const _hoisted_1$
|
|
5452
|
-
const _sfc_main$
|
|
5458
|
+
const _hoisted_1$y = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext"];
|
|
5459
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
5453
5460
|
__name: "ColorPickerSlider",
|
|
5454
5461
|
props: /* @__PURE__ */ mergeModels({
|
|
5455
5462
|
label: {},
|
|
@@ -5533,16 +5540,16 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5533
5540
|
onKeydown: onKeyDown
|
|
5534
5541
|
}, [..._cache[5] || (_cache[5] = [
|
|
5535
5542
|
createElementVNode("div", { class: "handle" }, null, -1)
|
|
5536
|
-
])], 40, _hoisted_1$
|
|
5543
|
+
])], 40, _hoisted_1$y);
|
|
5537
5544
|
};
|
|
5538
5545
|
}
|
|
5539
5546
|
});
|
|
5540
5547
|
|
|
5541
|
-
const ColorPickerSlider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5548
|
+
const ColorPickerSlider = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-f4be2bd4"]]);
|
|
5542
5549
|
|
|
5543
|
-
const _hoisted_1$
|
|
5544
|
-
const _hoisted_2$
|
|
5545
|
-
const _hoisted_3$
|
|
5550
|
+
const _hoisted_1$x = { class: "kds-color-picker" };
|
|
5551
|
+
const _hoisted_2$h = ["aria-valuetext"];
|
|
5552
|
+
const _hoisted_3$e = { class: "value-inputs" };
|
|
5546
5553
|
const DEFAULT_HUE_DEG = 270;
|
|
5547
5554
|
const DEFAULT_SATURATION = 0.8;
|
|
5548
5555
|
const DEFAULT_VALUE = 0.9;
|
|
@@ -5556,7 +5563,7 @@ const KEYBOARD_LARGE_STEP = 0.1;
|
|
|
5556
5563
|
const HUE_KEYBOARD_STEP_DEG = 1;
|
|
5557
5564
|
const HUE_KEYBOARD_LARGE_STEP_DEG = 10;
|
|
5558
5565
|
const TO_BOTTOM_GRADIENT = "linear-gradient(to bottom, transparent, black)";
|
|
5559
|
-
const _sfc_main$
|
|
5566
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
5560
5567
|
__name: "ColorPicker",
|
|
5561
5568
|
props: {
|
|
5562
5569
|
"modelValue": { default: "" },
|
|
@@ -5704,7 +5711,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5704
5711
|
}
|
|
5705
5712
|
};
|
|
5706
5713
|
return (_ctx, _cache) => {
|
|
5707
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
5714
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
5708
5715
|
createElementVNode("div", {
|
|
5709
5716
|
ref_key: "colorspaceEl",
|
|
5710
5717
|
ref: colorspaceEl,
|
|
@@ -5732,7 +5739,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5732
5739
|
class: "handle",
|
|
5733
5740
|
style: normalizeStyle(colorspaceHandleStyle.value)
|
|
5734
5741
|
}, null, 4)
|
|
5735
|
-
], 44, _hoisted_2$
|
|
5742
|
+
], 44, _hoisted_2$h),
|
|
5736
5743
|
createVNode(ColorPickerSlider, {
|
|
5737
5744
|
modelValue: hue.value,
|
|
5738
5745
|
"onUpdate:modelValue": [
|
|
@@ -5767,7 +5774,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5767
5774
|
step: KEYBOARD_STEP,
|
|
5768
5775
|
"large-step": KEYBOARD_LARGE_STEP
|
|
5769
5776
|
}, null, 8, ["modelValue", "value-now", "value-text"]),
|
|
5770
|
-
createElementVNode("div", _hoisted_3$
|
|
5777
|
+
createElementVNode("div", _hoisted_3$e, [
|
|
5771
5778
|
createVNode(KdsTextInput, {
|
|
5772
5779
|
"model-value": hexInputValue.value,
|
|
5773
5780
|
ariaLabel: "Color hex value",
|
|
@@ -5775,7 +5782,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5775
5782
|
"onUpdate:modelValue": updateFromTextValue,
|
|
5776
5783
|
onFocusout: onHexInputFocusOut
|
|
5777
5784
|
}, null, 8, ["model-value"]),
|
|
5778
|
-
createVNode(_sfc_main$
|
|
5785
|
+
createVNode(_sfc_main$O, {
|
|
5779
5786
|
"model-value": alphaPercent.value,
|
|
5780
5787
|
ariaLabel: "Alpha percentage",
|
|
5781
5788
|
min: 0,
|
|
@@ -5790,7 +5797,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5790
5797
|
}
|
|
5791
5798
|
});
|
|
5792
5799
|
|
|
5793
|
-
const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5800
|
+
const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-2daeaa68"]]);
|
|
5794
5801
|
|
|
5795
5802
|
const HEX_LENGTH_1 = 1;
|
|
5796
5803
|
const HEX_LENGTH_2 = 2;
|
|
@@ -5864,7 +5871,7 @@ const useColorInputValidationOnFocusOut = (modelValue) => {
|
|
|
5864
5871
|
return { handleFocusOut };
|
|
5865
5872
|
};
|
|
5866
5873
|
|
|
5867
|
-
const _sfc_main$
|
|
5874
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
5868
5875
|
__name: "KdsColorInput",
|
|
5869
5876
|
props: /* @__PURE__ */ mergeModels({
|
|
5870
5877
|
description: {},
|
|
@@ -5927,7 +5934,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
5927
5934
|
}, null, 8, ["color", "style"])
|
|
5928
5935
|
]),
|
|
5929
5936
|
trailing: withCtx(() => [
|
|
5930
|
-
createVNode(unref(_sfc_main$
|
|
5937
|
+
createVNode(unref(_sfc_main$1c), {
|
|
5931
5938
|
modelValue: open.value,
|
|
5932
5939
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
5933
5940
|
size: "xsmall",
|
|
@@ -5967,7 +5974,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
5967
5974
|
}
|
|
5968
5975
|
});
|
|
5969
5976
|
|
|
5970
|
-
const _sfc_main$
|
|
5977
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
5971
5978
|
__name: "KdsPasswordInput",
|
|
5972
5979
|
props: /* @__PURE__ */ mergeModels({
|
|
5973
5980
|
description: {},
|
|
@@ -6028,11 +6035,10 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
6028
6035
|
onBlur: handleBlur
|
|
6029
6036
|
}), {
|
|
6030
6037
|
trailing: withCtx(() => [
|
|
6031
|
-
__props.showVisibilityToggle ? (openBlock(), createBlock(_sfc_main$
|
|
6038
|
+
__props.showVisibilityToggle ? (openBlock(), createBlock(_sfc_main$1c, {
|
|
6032
6039
|
key: 0,
|
|
6033
6040
|
modelValue: showValue.value,
|
|
6034
6041
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showValue.value = $event),
|
|
6035
|
-
type: "button",
|
|
6036
6042
|
variant: "outlined",
|
|
6037
6043
|
size: "xsmall",
|
|
6038
6044
|
"leading-icon": "eye",
|
|
@@ -6069,7 +6075,7 @@ const kdsPasswordInputAutocompletes = Object.values(
|
|
|
6069
6075
|
kdsPasswordInputAutocomplete
|
|
6070
6076
|
);
|
|
6071
6077
|
|
|
6072
|
-
const _sfc_main$
|
|
6078
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
6073
6079
|
__name: "KdsUsernameInput",
|
|
6074
6080
|
props: /* @__PURE__ */ mergeModels({
|
|
6075
6081
|
description: {},
|
|
@@ -10080,17 +10086,17 @@ const sn = /*@__PURE__*/ new WeakMap, cn = /*@__PURE__*/ sn.get.bind(sn), un = /
|
|
|
10080
10086
|
DateTimeFormat: Xn
|
|
10081
10087
|
}));
|
|
10082
10088
|
|
|
10083
|
-
const _hoisted_1$
|
|
10089
|
+
const _hoisted_1$w = {
|
|
10084
10090
|
role: "row",
|
|
10085
10091
|
class: "kds-date-picker-header-row"
|
|
10086
10092
|
};
|
|
10087
|
-
const _hoisted_2$
|
|
10088
|
-
const _hoisted_3$
|
|
10089
|
-
const _hoisted_4$
|
|
10093
|
+
const _hoisted_2$g = ["aria-label"];
|
|
10094
|
+
const _hoisted_3$d = { class: "kds-date-picker-day-grid" };
|
|
10095
|
+
const _hoisted_4$a = ["aria-selected", "aria-disabled", "aria-label", "disabled", "tabindex", "onClick", "onFocus"];
|
|
10090
10096
|
const REFERENCE_YEAR$2 = 2024;
|
|
10091
10097
|
const DAYS_PER_WEEK = 7;
|
|
10092
10098
|
const TOTAL_CELLS = 42;
|
|
10093
|
-
const _sfc_main$
|
|
10099
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
10094
10100
|
__name: "DatePickerDayGrid",
|
|
10095
10101
|
props: {
|
|
10096
10102
|
modelValue: {},
|
|
@@ -10385,17 +10391,17 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
10385
10391
|
role: "grid",
|
|
10386
10392
|
"aria-label": "Calendar"
|
|
10387
10393
|
}, [
|
|
10388
|
-
createElementVNode("div", _hoisted_1$
|
|
10394
|
+
createElementVNode("div", _hoisted_1$w, [
|
|
10389
10395
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(DAY_LABELS), (day, i) => {
|
|
10390
10396
|
return openBlock(), createElementBlock("div", {
|
|
10391
10397
|
key: day,
|
|
10392
10398
|
role: "columnheader",
|
|
10393
10399
|
"aria-label": unref(DAY_FULL_LABELS)[i],
|
|
10394
10400
|
class: "kds-date-picker-weekday"
|
|
10395
|
-
}, toDisplayString(day), 9, _hoisted_2$
|
|
10401
|
+
}, toDisplayString(day), 9, _hoisted_2$g);
|
|
10396
10402
|
}), 128))
|
|
10397
10403
|
]),
|
|
10398
|
-
createElementVNode("div", _hoisted_3$
|
|
10404
|
+
createElementVNode("div", _hoisted_3$d, [
|
|
10399
10405
|
(openBlock(true), createElementBlock(Fragment, null, renderList(weeks.value, (week, wi) => {
|
|
10400
10406
|
return openBlock(), createElementBlock("div", {
|
|
10401
10407
|
key: wi,
|
|
@@ -10424,7 +10430,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
10424
10430
|
onClick: ($event) => selectDate(day),
|
|
10425
10431
|
onKeydown: onDayKeydown,
|
|
10426
10432
|
onFocus: ($event) => onDayFocus(day)
|
|
10427
|
-
}, toDisplayString(day.day), 43, _hoisted_4$
|
|
10433
|
+
}, toDisplayString(day.day), 43, _hoisted_4$a);
|
|
10428
10434
|
}), 128))
|
|
10429
10435
|
]);
|
|
10430
10436
|
}), 128))
|
|
@@ -10434,13 +10440,13 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
10434
10440
|
}
|
|
10435
10441
|
});
|
|
10436
10442
|
|
|
10437
|
-
const DatePickerDayGrid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10443
|
+
const DatePickerDayGrid = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-51807b35"]]);
|
|
10438
10444
|
|
|
10439
|
-
const _hoisted_1$
|
|
10445
|
+
const _hoisted_1$v = ["aria-selected", "aria-disabled", "aria-label", "disabled", "tabindex", "onClick", "onKeydown", "onFocus"];
|
|
10440
10446
|
const REFERENCE_YEAR$1 = 2024;
|
|
10441
10447
|
const MONTHS_PER_YEAR$1 = 12;
|
|
10442
10448
|
const MONTH_GRID_COLS = 3;
|
|
10443
|
-
const _sfc_main$
|
|
10449
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
10444
10450
|
__name: "DatePickerMonthGrid",
|
|
10445
10451
|
props: {
|
|
10446
10452
|
modelValue: {},
|
|
@@ -10630,7 +10636,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
10630
10636
|
onClick: ($event) => selectMonth(cell.month),
|
|
10631
10637
|
onKeydown: ($event) => onKeydown($event, cell.month),
|
|
10632
10638
|
onFocus: ($event) => focusedCell.value = cell.month
|
|
10633
|
-
}, toDisplayString(cell.label), 43, _hoisted_1$
|
|
10639
|
+
}, toDisplayString(cell.label), 43, _hoisted_1$v);
|
|
10634
10640
|
}), 128))
|
|
10635
10641
|
]);
|
|
10636
10642
|
}), 128))
|
|
@@ -10639,12 +10645,12 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
10639
10645
|
}
|
|
10640
10646
|
});
|
|
10641
10647
|
|
|
10642
|
-
const DatePickerMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10648
|
+
const DatePickerMonthGrid = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-63d96e84"]]);
|
|
10643
10649
|
|
|
10644
|
-
const _hoisted_1$
|
|
10650
|
+
const _hoisted_1$u = ["aria-selected", "aria-disabled", "aria-label", "disabled", "tabindex", "onClick", "onKeydown", "onFocus"];
|
|
10645
10651
|
const YEAR_PAGE_SIZE$1 = 15;
|
|
10646
10652
|
const YEAR_GRID_COLS = 3;
|
|
10647
|
-
const _sfc_main$
|
|
10653
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
10648
10654
|
__name: "DatePickerYearGrid",
|
|
10649
10655
|
props: {
|
|
10650
10656
|
modelValue: {},
|
|
@@ -10802,7 +10808,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
10802
10808
|
onClick: ($event) => selectYear(cell.year),
|
|
10803
10809
|
onKeydown: ($event) => onKeydown($event, cell.year),
|
|
10804
10810
|
onFocus: ($event) => focusedCell.value = cell.year
|
|
10805
|
-
}, toDisplayString(cell.label), 43, _hoisted_1$
|
|
10811
|
+
}, toDisplayString(cell.label), 43, _hoisted_1$u);
|
|
10806
10812
|
}), 128))
|
|
10807
10813
|
]);
|
|
10808
10814
|
}), 128))
|
|
@@ -10811,12 +10817,12 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
10811
10817
|
}
|
|
10812
10818
|
});
|
|
10813
10819
|
|
|
10814
|
-
const DatePickerYearGrid = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
10820
|
+
const DatePickerYearGrid = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-270d55b9"]]);
|
|
10815
10821
|
|
|
10816
|
-
const _hoisted_1$
|
|
10817
|
-
const _hoisted_2$
|
|
10818
|
-
const _hoisted_3$
|
|
10819
|
-
const _hoisted_4$
|
|
10822
|
+
const _hoisted_1$t = { class: "kds-date-picker" };
|
|
10823
|
+
const _hoisted_2$f = { class: "kds-date-picker-header" };
|
|
10824
|
+
const _hoisted_3$c = { class: "kds-date-picker-nav-block" };
|
|
10825
|
+
const _hoisted_4$9 = {
|
|
10820
10826
|
key: 1,
|
|
10821
10827
|
class: "kds-date-picker-header-static-label",
|
|
10822
10828
|
"aria-live": "polite"
|
|
@@ -10826,7 +10832,7 @@ const _hoisted_6$2 = { class: "kds-date-picker-body" };
|
|
|
10826
10832
|
const MONTHS_PER_YEAR = 12;
|
|
10827
10833
|
const YEAR_PAGE_SIZE = 15;
|
|
10828
10834
|
const REFERENCE_YEAR = 2024;
|
|
10829
|
-
const _sfc_main$
|
|
10835
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
10830
10836
|
__name: "KdsDatePicker",
|
|
10831
10837
|
props: /* @__PURE__ */ mergeModels({
|
|
10832
10838
|
minDate: {},
|
|
@@ -11022,10 +11028,10 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
11022
11028
|
});
|
|
11023
11029
|
__expose({ focus });
|
|
11024
11030
|
return (_ctx, _cache) => {
|
|
11025
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11026
|
-
createElementVNode("div", _hoisted_2$
|
|
11027
|
-
createElementVNode("div", _hoisted_3$
|
|
11028
|
-
view.value === "day" ? (openBlock(), createBlock(_sfc_main$
|
|
11031
|
+
return openBlock(), createElementBlock("div", _hoisted_1$t, [
|
|
11032
|
+
createElementVNode("div", _hoisted_2$f, [
|
|
11033
|
+
createElementVNode("div", _hoisted_3$c, [
|
|
11034
|
+
view.value === "day" ? (openBlock(), createBlock(_sfc_main$1f, {
|
|
11029
11035
|
key: 0,
|
|
11030
11036
|
variant: "transparent",
|
|
11031
11037
|
size: "small",
|
|
@@ -11034,7 +11040,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
11034
11040
|
disabled: prevYearDisabled.value,
|
|
11035
11041
|
onClick: onPrevYear
|
|
11036
11042
|
}, null, 8, ["disabled"])) : createCommentVNode("", true),
|
|
11037
|
-
createVNode(_sfc_main$
|
|
11043
|
+
createVNode(_sfc_main$1f, {
|
|
11038
11044
|
variant: "transparent",
|
|
11039
11045
|
size: "small",
|
|
11040
11046
|
"leading-icon": "chevron-left",
|
|
@@ -11043,16 +11049,16 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
11043
11049
|
onClick: onPrev
|
|
11044
11050
|
}, null, 8, ["ariaLabel", "disabled"])
|
|
11045
11051
|
]),
|
|
11046
|
-
view.value !== "year" ? (openBlock(), createBlock(_sfc_main$
|
|
11052
|
+
view.value !== "year" ? (openBlock(), createBlock(_sfc_main$1f, {
|
|
11047
11053
|
key: 0,
|
|
11048
11054
|
class: "kds-date-picker-header-label",
|
|
11049
11055
|
variant: "transparent",
|
|
11050
11056
|
size: "small",
|
|
11051
11057
|
label: headerLabel.value,
|
|
11052
11058
|
onClick: onHeaderLabelClick
|
|
11053
|
-
}, null, 8, ["label"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
11059
|
+
}, null, 8, ["label"])) : (openBlock(), createElementBlock("div", _hoisted_4$9, toDisplayString(headerLabel.value), 1)),
|
|
11054
11060
|
createElementVNode("div", _hoisted_5$3, [
|
|
11055
|
-
createVNode(_sfc_main$
|
|
11061
|
+
createVNode(_sfc_main$1f, {
|
|
11056
11062
|
variant: "transparent",
|
|
11057
11063
|
size: "small",
|
|
11058
11064
|
"leading-icon": "chevron-right",
|
|
@@ -11060,7 +11066,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
11060
11066
|
disabled: nextDisabled.value,
|
|
11061
11067
|
onClick: onNext
|
|
11062
11068
|
}, null, 8, ["ariaLabel", "disabled"]),
|
|
11063
|
-
view.value === "day" ? (openBlock(), createBlock(_sfc_main$
|
|
11069
|
+
view.value === "day" ? (openBlock(), createBlock(_sfc_main$1f, {
|
|
11064
11070
|
key: 0,
|
|
11065
11071
|
variant: "transparent",
|
|
11066
11072
|
size: "small",
|
|
@@ -11112,7 +11118,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
11112
11118
|
}
|
|
11113
11119
|
});
|
|
11114
11120
|
|
|
11115
|
-
const KdsDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11121
|
+
const KdsDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-e46d7e18"]]);
|
|
11116
11122
|
|
|
11117
11123
|
const YEAR_END_INDEX = 4;
|
|
11118
11124
|
const MONTH_START_INDEX = 4;
|
|
@@ -11215,7 +11221,7 @@ const useDateInputMask = (modelValue) => {
|
|
|
11215
11221
|
|
|
11216
11222
|
const incompleteDateMessage = "Invalid date format. Please provide year (YYYY), month (MM), and day (DD).";
|
|
11217
11223
|
const MONTH_NAME_SAMPLE_YEAR = 2001;
|
|
11218
|
-
const _sfc_main$
|
|
11224
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
11219
11225
|
__name: "KdsDateInput",
|
|
11220
11226
|
props: /* @__PURE__ */ mergeModels({
|
|
11221
11227
|
description: {},
|
|
@@ -11328,10 +11334,9 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
11328
11334
|
onBlur: onTextInputBlur
|
|
11329
11335
|
}), {
|
|
11330
11336
|
trailing: withCtx(() => [
|
|
11331
|
-
createVNode(_sfc_main$
|
|
11337
|
+
createVNode(_sfc_main$1c, {
|
|
11332
11338
|
modelValue: popoverIsVisible.value,
|
|
11333
11339
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => popoverIsVisible.value = $event),
|
|
11334
|
-
type: "button",
|
|
11335
11340
|
size: "xsmall",
|
|
11336
11341
|
variant: "outlined",
|
|
11337
11342
|
"leading-icon": "calendar",
|
|
@@ -11378,8 +11383,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
11378
11383
|
}
|
|
11379
11384
|
});
|
|
11380
11385
|
|
|
11381
|
-
const _hoisted_1$
|
|
11382
|
-
const _sfc_main$
|
|
11386
|
+
const _hoisted_1$s = { class: "kds-date-time-format-popover" };
|
|
11387
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
11383
11388
|
__name: "DateTimeFormatPopover",
|
|
11384
11389
|
props: /* @__PURE__ */ mergeModels({
|
|
11385
11390
|
allDefaultFormats: {},
|
|
@@ -11517,7 +11522,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
11517
11522
|
}));
|
|
11518
11523
|
});
|
|
11519
11524
|
return (_ctx, _cache) => {
|
|
11520
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
11525
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
11521
11526
|
modeOptions.value.length > 1 ? (openBlock(), createBlock(KdsValueSwitch, {
|
|
11522
11527
|
key: 0,
|
|
11523
11528
|
"model-value": effectiveSelectedMode.value,
|
|
@@ -11549,9 +11554,9 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
11549
11554
|
}
|
|
11550
11555
|
});
|
|
11551
11556
|
|
|
11552
|
-
const DateTimeFormatPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11557
|
+
const DateTimeFormatPopover = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-8c697d02"]]);
|
|
11553
11558
|
|
|
11554
|
-
const _sfc_main$
|
|
11559
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
11555
11560
|
__name: "KdsDateTimeFormatInput",
|
|
11556
11561
|
props: /* @__PURE__ */ mergeModels({
|
|
11557
11562
|
description: {},
|
|
@@ -11598,7 +11603,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
11598
11603
|
autocomplete: props.autocomplete
|
|
11599
11604
|
}), {
|
|
11600
11605
|
trailing: withCtx(() => [
|
|
11601
|
-
createVNode(unref(_sfc_main$
|
|
11606
|
+
createVNode(unref(_sfc_main$1c), {
|
|
11602
11607
|
modelValue: open.value,
|
|
11603
11608
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
11604
11609
|
size: "xsmall",
|
|
@@ -11684,7 +11689,7 @@ const buildRegexFromPatternInput = (input, options) => {
|
|
|
11684
11689
|
return `^(?!.*${withCase}).*$`;
|
|
11685
11690
|
};
|
|
11686
11691
|
|
|
11687
|
-
const _sfc_main$
|
|
11692
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
11688
11693
|
__name: "KdsPatternInput",
|
|
11689
11694
|
props: /* @__PURE__ */ mergeModels({
|
|
11690
11695
|
description: {},
|
|
@@ -11767,7 +11772,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
11767
11772
|
clearable: ""
|
|
11768
11773
|
}), {
|
|
11769
11774
|
trailing: withCtx(() => [
|
|
11770
|
-
createVNode(_sfc_main$
|
|
11775
|
+
createVNode(_sfc_main$1c, {
|
|
11771
11776
|
modelValue: caseSensitive.value,
|
|
11772
11777
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => caseSensitive.value = $event),
|
|
11773
11778
|
size: "xsmall",
|
|
@@ -11777,7 +11782,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
11777
11782
|
ariaLabel: "Case sensitivity",
|
|
11778
11783
|
disabled: __props.disabled
|
|
11779
11784
|
}, null, 8, ["modelValue", "title", "disabled"]),
|
|
11780
|
-
createVNode(_sfc_main$
|
|
11785
|
+
createVNode(_sfc_main$1c, {
|
|
11781
11786
|
modelValue: excludeMatches.value,
|
|
11782
11787
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
|
|
11783
11788
|
size: "xsmall",
|
|
@@ -11787,7 +11792,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
11787
11792
|
ariaLabel: "Exclude matches",
|
|
11788
11793
|
disabled: __props.disabled
|
|
11789
11794
|
}, null, 8, ["modelValue", "title", "disabled"]),
|
|
11790
|
-
createVNode(_sfc_main$
|
|
11795
|
+
createVNode(_sfc_main$1c, {
|
|
11791
11796
|
modelValue: useRegex.value,
|
|
11792
11797
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
|
|
11793
11798
|
size: "xsmall",
|
|
@@ -11807,7 +11812,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
11807
11812
|
}
|
|
11808
11813
|
});
|
|
11809
11814
|
|
|
11810
|
-
const _sfc_main$
|
|
11815
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
11811
11816
|
__name: "KdsSearchInput",
|
|
11812
11817
|
props: /* @__PURE__ */ mergeModels({
|
|
11813
11818
|
description: {},
|
|
@@ -11944,6 +11949,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
11944
11949
|
"possible-values": __props.results,
|
|
11945
11950
|
"controlled-externally": "",
|
|
11946
11951
|
"allow-no-selection": "",
|
|
11952
|
+
"item-focus-strategy": "noop",
|
|
11947
11953
|
"empty-text": "No search results",
|
|
11948
11954
|
"aria-label": "Search results list",
|
|
11949
11955
|
onItemClick: onResultClick
|
|
@@ -11959,11 +11965,11 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
11959
11965
|
}
|
|
11960
11966
|
});
|
|
11961
11967
|
|
|
11962
|
-
const KdsSearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11968
|
+
const KdsSearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-3e274ed2"]]);
|
|
11963
11969
|
|
|
11964
|
-
const _hoisted_1$
|
|
11970
|
+
const _hoisted_1$r = ["rows", "placeholder", "disabled", "autocomplete"];
|
|
11965
11971
|
const DEFAULT_ROWS = 3;
|
|
11966
|
-
const _sfc_main$
|
|
11972
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
11967
11973
|
__name: "KdsTextarea",
|
|
11968
11974
|
props: /* @__PURE__ */ mergeModels({
|
|
11969
11975
|
description: {},
|
|
@@ -12024,7 +12030,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
12024
12030
|
placeholder: __props.placeholder,
|
|
12025
12031
|
disabled: __props.disabled,
|
|
12026
12032
|
autocomplete: props.autocomplete
|
|
12027
|
-
}), null, 16, _hoisted_1$
|
|
12033
|
+
}), null, 16, _hoisted_1$r), [
|
|
12028
12034
|
[vModelText, modelValue.value]
|
|
12029
12035
|
])
|
|
12030
12036
|
]),
|
|
@@ -12034,12 +12040,12 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
12034
12040
|
}
|
|
12035
12041
|
});
|
|
12036
12042
|
|
|
12037
|
-
const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12043
|
+
const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-bdf12ef9"]]);
|
|
12038
12044
|
|
|
12039
|
-
const _hoisted_1$
|
|
12040
|
-
const _hoisted_2$
|
|
12041
|
-
const _hoisted_3$
|
|
12042
|
-
const _hoisted_4$
|
|
12045
|
+
const _hoisted_1$q = { class: "kds-time-picker" };
|
|
12046
|
+
const _hoisted_2$e = { class: "kds-time-picker-selected-time" };
|
|
12047
|
+
const _hoisted_3$b = { class: "kds-time-picker-fields" };
|
|
12048
|
+
const _hoisted_4$8 = { class: "kds-time-picker-fields" };
|
|
12043
12049
|
const _hoisted_5$2 = {
|
|
12044
12050
|
key: 0,
|
|
12045
12051
|
class: "kds-time-picker-fields"
|
|
@@ -12056,7 +12062,7 @@ const MAX_HOUR = 23;
|
|
|
12056
12062
|
const MAX_MINUTE = 59;
|
|
12057
12063
|
const MAX_SECOND = 59;
|
|
12058
12064
|
const MAX_MILLISECOND = 999;
|
|
12059
|
-
const _sfc_main$
|
|
12065
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
12060
12066
|
__name: "TimePicker",
|
|
12061
12067
|
props: /* @__PURE__ */ mergeModels({
|
|
12062
12068
|
maxGranularity: {}
|
|
@@ -12157,10 +12163,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12157
12163
|
};
|
|
12158
12164
|
__expose({ focus });
|
|
12159
12165
|
return (_ctx, _cache) => {
|
|
12160
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12161
|
-
createElementVNode("div", _hoisted_2$
|
|
12162
|
-
createElementVNode("div", _hoisted_3$
|
|
12163
|
-
createVNode(_sfc_main$
|
|
12166
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
12167
|
+
createElementVNode("div", _hoisted_2$e, toDisplayString(selectedTimeLabel.value), 1),
|
|
12168
|
+
createElementVNode("div", _hoisted_3$b, [
|
|
12169
|
+
createVNode(_sfc_main$O, {
|
|
12164
12170
|
ref: "hourInput",
|
|
12165
12171
|
modelValue: hour.value,
|
|
12166
12172
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hour.value = $event),
|
|
@@ -12170,7 +12176,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12170
12176
|
max: MAX_HOUR,
|
|
12171
12177
|
step: 1
|
|
12172
12178
|
}, null, 8, ["modelValue"]),
|
|
12173
|
-
createVNode(_sfc_main$
|
|
12179
|
+
createVNode(_sfc_main$O, {
|
|
12174
12180
|
modelValue: minute.value,
|
|
12175
12181
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => minute.value = $event),
|
|
12176
12182
|
class: "kds-time-picker-field",
|
|
@@ -12185,8 +12191,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12185
12191
|
class: "kds-time-picker-divider"
|
|
12186
12192
|
})) : createCommentVNode("", true),
|
|
12187
12193
|
showSecondInput.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
12188
|
-
createElementVNode("div", _hoisted_4$
|
|
12189
|
-
createVNode(_sfc_main$
|
|
12194
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
12195
|
+
createVNode(_sfc_main$O, {
|
|
12190
12196
|
ref: "secondInput",
|
|
12191
12197
|
modelValue: second.value,
|
|
12192
12198
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => second.value = $event),
|
|
@@ -12196,7 +12202,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12196
12202
|
max: MAX_SECOND,
|
|
12197
12203
|
step: 1
|
|
12198
12204
|
}, null, 8, ["modelValue"]),
|
|
12199
|
-
createVNode(_sfc_main$
|
|
12205
|
+
createVNode(_sfc_main$1f, {
|
|
12200
12206
|
class: "kds-time-picker-field-trash",
|
|
12201
12207
|
variant: "transparent",
|
|
12202
12208
|
"leading-icon": "trash",
|
|
@@ -12206,7 +12212,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12206
12212
|
})
|
|
12207
12213
|
]),
|
|
12208
12214
|
showMillisecondInput.value ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
12209
|
-
createVNode(_sfc_main$
|
|
12215
|
+
createVNode(_sfc_main$O, {
|
|
12210
12216
|
ref: "millisecondInput",
|
|
12211
12217
|
modelValue: millisecond.value,
|
|
12212
12218
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => millisecond.value = $event),
|
|
@@ -12219,7 +12225,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12219
12225
|
max: MAX_MILLISECOND,
|
|
12220
12226
|
step: 1
|
|
12221
12227
|
}, null, 8, ["modelValue"]),
|
|
12222
|
-
createVNode(_sfc_main$
|
|
12228
|
+
createVNode(_sfc_main$1f, {
|
|
12223
12229
|
class: "kds-time-picker-field-trash",
|
|
12224
12230
|
variant: "transparent",
|
|
12225
12231
|
"leading-icon": "trash",
|
|
@@ -12228,7 +12234,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12228
12234
|
onClick: removeMilliseconds
|
|
12229
12235
|
})
|
|
12230
12236
|
])) : __props.maxGranularity === "millisecond" ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
|
|
12231
|
-
createVNode(_sfc_main$
|
|
12237
|
+
createVNode(_sfc_main$1f, {
|
|
12232
12238
|
variant: "outlined",
|
|
12233
12239
|
size: "small",
|
|
12234
12240
|
"leading-icon": "plus",
|
|
@@ -12237,7 +12243,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12237
12243
|
})
|
|
12238
12244
|
])) : createCommentVNode("", true)
|
|
12239
12245
|
], 64)) : __props.maxGranularity !== "minute" ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
12240
|
-
createVNode(_sfc_main$
|
|
12246
|
+
createVNode(_sfc_main$1f, {
|
|
12241
12247
|
variant: "outlined",
|
|
12242
12248
|
size: "small",
|
|
12243
12249
|
"leading-icon": "plus",
|
|
@@ -12250,7 +12256,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
12250
12256
|
}
|
|
12251
12257
|
});
|
|
12252
12258
|
|
|
12253
|
-
const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12259
|
+
const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-c2f06c87"]]);
|
|
12254
12260
|
|
|
12255
12261
|
const HOURS_END_INDEX = 2;
|
|
12256
12262
|
const MINUTES_START_INDEX = 2;
|
|
@@ -12460,7 +12466,7 @@ const useTimeInputMask = (modelValue, granularityRef) => {
|
|
|
12460
12466
|
};
|
|
12461
12467
|
|
|
12462
12468
|
const invalidTimeMessage = "The entered time is invalid.";
|
|
12463
|
-
const _sfc_main$
|
|
12469
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
12464
12470
|
__name: "KdsTimeInput",
|
|
12465
12471
|
props: /* @__PURE__ */ mergeModels({
|
|
12466
12472
|
description: {},
|
|
@@ -12575,10 +12581,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
12575
12581
|
onBlur: onTextInputBlur
|
|
12576
12582
|
}), {
|
|
12577
12583
|
trailing: withCtx(() => [
|
|
12578
|
-
createVNode(_sfc_main$
|
|
12584
|
+
createVNode(_sfc_main$1c, {
|
|
12579
12585
|
modelValue: popoverIsVisible.value,
|
|
12580
12586
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => popoverIsVisible.value = $event),
|
|
12581
|
-
type: "button",
|
|
12582
12587
|
size: "xsmall",
|
|
12583
12588
|
variant: "outlined",
|
|
12584
12589
|
"leading-icon": "time",
|
|
@@ -12633,6 +12638,573 @@ const kdsTimeInputGranularity = {
|
|
|
12633
12638
|
};
|
|
12634
12639
|
const kdsTimeInputGranularities = Object.values(kdsTimeInputGranularity);
|
|
12635
12640
|
|
|
12641
|
+
const kdsIntervalInputFormat = {
|
|
12642
|
+
DATE: "date",
|
|
12643
|
+
TIME: "time",
|
|
12644
|
+
DATE_OR_TIME: "date_or_time"
|
|
12645
|
+
};
|
|
12646
|
+
const kdsIntervalInputFormats = Object.values(kdsIntervalInputFormat);
|
|
12647
|
+
const kdsIntervalDirectionality = {
|
|
12648
|
+
ASCENDING: "ascending",
|
|
12649
|
+
DESCENDING: "descending"
|
|
12650
|
+
};
|
|
12651
|
+
const kdsIntervalDirectionalities = Object.values(
|
|
12652
|
+
kdsIntervalDirectionality
|
|
12653
|
+
);
|
|
12654
|
+
|
|
12655
|
+
const periodNumericKeys = [
|
|
12656
|
+
"years",
|
|
12657
|
+
"months",
|
|
12658
|
+
"weeks",
|
|
12659
|
+
"days"
|
|
12660
|
+
];
|
|
12661
|
+
const durationNumericKeys = [
|
|
12662
|
+
"hours",
|
|
12663
|
+
"minutes",
|
|
12664
|
+
"seconds",
|
|
12665
|
+
"milliseconds"
|
|
12666
|
+
];
|
|
12667
|
+
const MILLISECONDS_MAX = 999;
|
|
12668
|
+
const getMax = (key) => key === "milliseconds" ? MILLISECONDS_MAX : Number.MAX_SAFE_INTEGER;
|
|
12669
|
+
const extractDurationFields = (duration) => ({
|
|
12670
|
+
years: duration.years,
|
|
12671
|
+
months: duration.months,
|
|
12672
|
+
weeks: duration.weeks,
|
|
12673
|
+
days: duration.days,
|
|
12674
|
+
hours: duration.hours,
|
|
12675
|
+
minutes: duration.minutes,
|
|
12676
|
+
seconds: duration.seconds,
|
|
12677
|
+
milliseconds: duration.milliseconds
|
|
12678
|
+
});
|
|
12679
|
+
const withDurationField = (duration, key, value) => Un.Duration.from({ ...extractDurationFields(duration), [key]: value });
|
|
12680
|
+
const zeroDuration = Un.Duration.from({ years: 0 });
|
|
12681
|
+
const createDefaultDuration = () => zeroDuration;
|
|
12682
|
+
const classifyDuration = (duration) => {
|
|
12683
|
+
const abs = duration.abs();
|
|
12684
|
+
const hasDate = abs.years > 0 || abs.months > 0 || abs.weeks > 0 || abs.days > 0;
|
|
12685
|
+
const hasTime = abs.hours > 0 || abs.minutes > 0 || abs.seconds > 0 || abs.milliseconds > 0;
|
|
12686
|
+
if (hasTime && !hasDate) {
|
|
12687
|
+
return kdsIntervalInputFormat.TIME;
|
|
12688
|
+
}
|
|
12689
|
+
return kdsIntervalInputFormat.DATE;
|
|
12690
|
+
};
|
|
12691
|
+
const formatPart = (value, unit) => {
|
|
12692
|
+
if (value === 0) {
|
|
12693
|
+
return "";
|
|
12694
|
+
}
|
|
12695
|
+
return value === 1 ? `${value} ${unit} ` : `${value} ${unit}s `;
|
|
12696
|
+
};
|
|
12697
|
+
const formatDurationToHumanReadable = (duration, usedFormat) => {
|
|
12698
|
+
const abs = duration.abs();
|
|
12699
|
+
let output = "";
|
|
12700
|
+
if (usedFormat === kdsIntervalInputFormat.DATE) {
|
|
12701
|
+
const hasDateParts = abs.years > 0 || abs.months > 0 || abs.weeks > 0 || abs.days > 0;
|
|
12702
|
+
if (!hasDateParts) {
|
|
12703
|
+
return "0 days";
|
|
12704
|
+
}
|
|
12705
|
+
output += formatPart(abs.years, "year");
|
|
12706
|
+
output += formatPart(abs.months, "month");
|
|
12707
|
+
output += formatPart(abs.weeks, "week");
|
|
12708
|
+
output += formatPart(abs.days, "day");
|
|
12709
|
+
} else {
|
|
12710
|
+
const hasTimeParts = abs.hours > 0 || abs.minutes > 0 || abs.seconds > 0 || abs.milliseconds > 0;
|
|
12711
|
+
if (!hasTimeParts) {
|
|
12712
|
+
return "0 seconds";
|
|
12713
|
+
}
|
|
12714
|
+
output += formatPart(abs.hours, "hour");
|
|
12715
|
+
output += formatPart(abs.minutes, "minute");
|
|
12716
|
+
const milliSecondsZero = abs.milliseconds === 0;
|
|
12717
|
+
if (abs.seconds !== 0 || !milliSecondsZero) {
|
|
12718
|
+
if (milliSecondsZero) {
|
|
12719
|
+
output += formatPart(abs.seconds, "second");
|
|
12720
|
+
} else {
|
|
12721
|
+
output += `${abs.seconds}.${abs.milliseconds.toString().padStart(3, "0")} seconds `;
|
|
12722
|
+
}
|
|
12723
|
+
}
|
|
12724
|
+
}
|
|
12725
|
+
if (duration.sign < 0) {
|
|
12726
|
+
output = `-(${output.trim()})`;
|
|
12727
|
+
}
|
|
12728
|
+
return output.trim();
|
|
12729
|
+
};
|
|
12730
|
+
const yearsPart = String.raw`(\d+)\s*y(?:ears?)?`;
|
|
12731
|
+
const monthsPart = String.raw`(\d+)\s*m(?:o(?:nths?)?)?`;
|
|
12732
|
+
const weeksPart = String.raw`(\d+)\s*w(?:eeks?)?`;
|
|
12733
|
+
const daysPart = String.raw`(\d+)\s*d(?:ays?)?`;
|
|
12734
|
+
const hoursPart = String.raw`(\d+)\s*h(?:ours?)?`;
|
|
12735
|
+
const minutesPart = String.raw`(\d+)\s*m(?:in(?:s|utes?)?)?`;
|
|
12736
|
+
const secondsPart = String.raw`(\d+)(?:[,.](\d{1,3}))?\s*s(?:ec(?:s|onds?)?)?`;
|
|
12737
|
+
const humanReadablePeriodRegex = new RegExp(
|
|
12738
|
+
String.raw`^(?:${yearsPart})?\s*(?:${monthsPart})?\s*(?:${weeksPart})?\s*(?:${daysPart})?\s*$`,
|
|
12739
|
+
"i"
|
|
12740
|
+
);
|
|
12741
|
+
const humanReadableDurationRegex = new RegExp(
|
|
12742
|
+
String.raw`^(?:${hoursPart})?\s*(?:${minutesPart})?\s*(?:${secondsPart})?$`,
|
|
12743
|
+
"i"
|
|
12744
|
+
);
|
|
12745
|
+
const negativeHumanReadablePeriodRegex = new RegExp(
|
|
12746
|
+
String.raw`^\s*-\s*\(\s*${humanReadablePeriodRegex.source.replaceAll(/[$^]/g, "")}\s*\)\s*$`,
|
|
12747
|
+
"i"
|
|
12748
|
+
);
|
|
12749
|
+
const negativeHumanReadablePeriodRegexWithSingleField = new RegExp(
|
|
12750
|
+
String.raw`^\s*-\s*(?:\s*${yearsPart}|${monthsPart}|${weeksPart}|${daysPart})\s*$`,
|
|
12751
|
+
"i"
|
|
12752
|
+
);
|
|
12753
|
+
const negativeHumanReadableDurationRegex = new RegExp(
|
|
12754
|
+
String.raw`^\s*-\s*\(\s*${humanReadableDurationRegex.source.replaceAll(/[$^]/g, "")}\s*\)\s*$`,
|
|
12755
|
+
"i"
|
|
12756
|
+
);
|
|
12757
|
+
const negativeHumanReadableDurationRegexWithSingleField = new RegExp(
|
|
12758
|
+
String.raw`^\s*-\s*(?:\s*${hoursPart}|${minutesPart}|${secondsPart})\s*$`,
|
|
12759
|
+
"i"
|
|
12760
|
+
);
|
|
12761
|
+
const extractPeriodFromMatch = (negative, match) => {
|
|
12762
|
+
const sign = negative ? -1 : 1;
|
|
12763
|
+
return Un.Duration.from({
|
|
12764
|
+
years: sign * parseInt(match[1] ?? "0", 10),
|
|
12765
|
+
months: sign * parseInt(match[2] ?? "0", 10),
|
|
12766
|
+
weeks: sign * parseInt(match[3] ?? "0", 10),
|
|
12767
|
+
days: sign * parseInt(match[4] ?? "0", 10)
|
|
12768
|
+
});
|
|
12769
|
+
};
|
|
12770
|
+
const extractDurationFromMatch = (negative, match) => {
|
|
12771
|
+
const sign = negative ? -1 : 1;
|
|
12772
|
+
const milliseconds = parseInt(match[4]?.padEnd(3, "0") ?? "0", 10);
|
|
12773
|
+
return Un.Duration.from({
|
|
12774
|
+
hours: sign * parseInt(match[1] ?? "0", 10),
|
|
12775
|
+
minutes: sign * parseInt(match[2] ?? "0", 10),
|
|
12776
|
+
seconds: sign * parseInt(match[3] ?? "0", 10),
|
|
12777
|
+
milliseconds: sign * milliseconds
|
|
12778
|
+
});
|
|
12779
|
+
};
|
|
12780
|
+
const parseHumanReadableInterval = (input) => {
|
|
12781
|
+
const trimmed = input?.trim();
|
|
12782
|
+
if (!trimmed) {
|
|
12783
|
+
return null;
|
|
12784
|
+
}
|
|
12785
|
+
const matchPositivePeriod = humanReadablePeriodRegex.exec(trimmed);
|
|
12786
|
+
const matchNegativePeriod = negativeHumanReadablePeriodRegex.exec(trimmed) ?? negativeHumanReadablePeriodRegexWithSingleField.exec(trimmed);
|
|
12787
|
+
const matchPositiveDuration = humanReadableDurationRegex.exec(trimmed);
|
|
12788
|
+
const matchNegativeDuration = negativeHumanReadableDurationRegex.exec(trimmed) ?? negativeHumanReadableDurationRegexWithSingleField.exec(trimmed);
|
|
12789
|
+
const matchPeriod = matchPositivePeriod ?? matchNegativePeriod;
|
|
12790
|
+
const matchDuration = matchPositiveDuration ?? matchNegativeDuration;
|
|
12791
|
+
const negative = (matchNegativePeriod ?? matchNegativeDuration) !== null;
|
|
12792
|
+
if (matchDuration && matchPeriod) {
|
|
12793
|
+
return null;
|
|
12794
|
+
}
|
|
12795
|
+
if (matchPeriod) {
|
|
12796
|
+
return extractPeriodFromMatch(negative, matchPeriod);
|
|
12797
|
+
}
|
|
12798
|
+
if (matchDuration) {
|
|
12799
|
+
return extractDurationFromMatch(negative, matchDuration);
|
|
12800
|
+
}
|
|
12801
|
+
return null;
|
|
12802
|
+
};
|
|
12803
|
+
const parseISOInterval = (input) => {
|
|
12804
|
+
try {
|
|
12805
|
+
return Un.Duration.from(input.trim());
|
|
12806
|
+
} catch {
|
|
12807
|
+
return null;
|
|
12808
|
+
}
|
|
12809
|
+
};
|
|
12810
|
+
const parseGenericInterval = (input) => parseISOInterval(input) ?? parseHumanReadableInterval(input);
|
|
12811
|
+
const validateIntervalInput = (input, expectedFormat) => {
|
|
12812
|
+
const duration = parseGenericInterval(input);
|
|
12813
|
+
if (!duration) {
|
|
12814
|
+
return { valid: false };
|
|
12815
|
+
}
|
|
12816
|
+
const actualType = classifyDuration(duration);
|
|
12817
|
+
if (expectedFormat !== kdsIntervalInputFormat.DATE_OR_TIME && actualType !== expectedFormat) {
|
|
12818
|
+
return { valid: false };
|
|
12819
|
+
}
|
|
12820
|
+
return {
|
|
12821
|
+
valid: true,
|
|
12822
|
+
type: actualType,
|
|
12823
|
+
negative: duration.sign < 0,
|
|
12824
|
+
duration
|
|
12825
|
+
};
|
|
12826
|
+
};
|
|
12827
|
+
const stripInactiveFields = (duration, usedFormat) => {
|
|
12828
|
+
const fields = extractDurationFields(duration);
|
|
12829
|
+
if (usedFormat === kdsIntervalInputFormat.DATE) {
|
|
12830
|
+
return Un.Duration.from({
|
|
12831
|
+
years: fields.years,
|
|
12832
|
+
months: fields.months,
|
|
12833
|
+
weeks: fields.weeks,
|
|
12834
|
+
days: fields.days
|
|
12835
|
+
});
|
|
12836
|
+
}
|
|
12837
|
+
return Un.Duration.from({
|
|
12838
|
+
hours: fields.hours,
|
|
12839
|
+
minutes: fields.minutes,
|
|
12840
|
+
seconds: fields.seconds,
|
|
12841
|
+
milliseconds: fields.milliseconds
|
|
12842
|
+
});
|
|
12843
|
+
};
|
|
12844
|
+
const toTitleCase = (key) => key.charAt(0).toUpperCase() + key.slice(1).toLowerCase();
|
|
12845
|
+
|
|
12846
|
+
const _hoisted_1$p = { class: "kds-interval-popover" };
|
|
12847
|
+
const _hoisted_2$d = { class: "kds-interval-popover-header" };
|
|
12848
|
+
const _hoisted_3$a = { class: "kds-interval-popover-content" };
|
|
12849
|
+
const _hoisted_4$7 = { class: "kds-interval-popover-grid" };
|
|
12850
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
12851
|
+
__name: "IntervalInputPopover",
|
|
12852
|
+
props: /* @__PURE__ */ mergeModels({
|
|
12853
|
+
format: {},
|
|
12854
|
+
allowDescending: { type: Boolean }
|
|
12855
|
+
}, {
|
|
12856
|
+
"modelValue": { required: true },
|
|
12857
|
+
"modelModifiers": {},
|
|
12858
|
+
"usedFormat": {
|
|
12859
|
+
required: true
|
|
12860
|
+
},
|
|
12861
|
+
"usedFormatModifiers": {}
|
|
12862
|
+
}),
|
|
12863
|
+
emits: ["update:modelValue", "update:usedFormat"],
|
|
12864
|
+
setup(__props) {
|
|
12865
|
+
const props = __props;
|
|
12866
|
+
const modelValue = useModel(__props, "modelValue");
|
|
12867
|
+
const mode = useModel(__props, "usedFormat");
|
|
12868
|
+
const draft = ref(modelValue.value);
|
|
12869
|
+
const isNegative = ref(modelValue.value.sign < 0);
|
|
12870
|
+
let isInternalEmit = false;
|
|
12871
|
+
watch(
|
|
12872
|
+
() => modelValue.value,
|
|
12873
|
+
(next) => {
|
|
12874
|
+
if (isInternalEmit) {
|
|
12875
|
+
isInternalEmit = false;
|
|
12876
|
+
return;
|
|
12877
|
+
}
|
|
12878
|
+
draft.value = next;
|
|
12879
|
+
isNegative.value = next.sign < 0;
|
|
12880
|
+
}
|
|
12881
|
+
);
|
|
12882
|
+
watch(
|
|
12883
|
+
() => props.allowDescending,
|
|
12884
|
+
(allowed) => {
|
|
12885
|
+
if (!allowed && isNegative.value) {
|
|
12886
|
+
isNegative.value = false;
|
|
12887
|
+
if (draft.value.sign < 0) {
|
|
12888
|
+
draft.value = draft.value.negated();
|
|
12889
|
+
}
|
|
12890
|
+
}
|
|
12891
|
+
}
|
|
12892
|
+
);
|
|
12893
|
+
const activeFields = computed(() => extractDurationFields(draft.value.abs()));
|
|
12894
|
+
const direction = computed({
|
|
12895
|
+
get: () => isNegative.value ? kdsIntervalDirectionality.DESCENDING : kdsIntervalDirectionality.ASCENDING,
|
|
12896
|
+
set(value) {
|
|
12897
|
+
const wantNeg = value === kdsIntervalDirectionality.DESCENDING;
|
|
12898
|
+
if (wantNeg === isNegative.value) {
|
|
12899
|
+
return;
|
|
12900
|
+
}
|
|
12901
|
+
isNegative.value = wantNeg;
|
|
12902
|
+
if (draft.value.sign !== 0) {
|
|
12903
|
+
draft.value = draft.value.negated();
|
|
12904
|
+
}
|
|
12905
|
+
}
|
|
12906
|
+
});
|
|
12907
|
+
const updateField = (key, value) => {
|
|
12908
|
+
if (!Number.isFinite(value)) {
|
|
12909
|
+
return;
|
|
12910
|
+
}
|
|
12911
|
+
const signedValue = isNegative.value ? -value : value;
|
|
12912
|
+
draft.value = withDurationField(
|
|
12913
|
+
draft.value,
|
|
12914
|
+
key,
|
|
12915
|
+
signedValue
|
|
12916
|
+
);
|
|
12917
|
+
};
|
|
12918
|
+
const modeOptions = [
|
|
12919
|
+
{ id: kdsIntervalInputFormat.DATE, leadingIcon: "calendar", title: "Date" },
|
|
12920
|
+
{ id: kdsIntervalInputFormat.TIME, leadingIcon: "time", title: "Time" }
|
|
12921
|
+
];
|
|
12922
|
+
const directionOptions = [
|
|
12923
|
+
{ id: kdsIntervalDirectionality.ASCENDING, text: "Forward" },
|
|
12924
|
+
{ id: kdsIntervalDirectionality.DESCENDING, text: "Backward" }
|
|
12925
|
+
];
|
|
12926
|
+
const fieldLabels = {
|
|
12927
|
+
years: "Year",
|
|
12928
|
+
months: "Month",
|
|
12929
|
+
weeks: "Week",
|
|
12930
|
+
days: "Day",
|
|
12931
|
+
hours: "Hour",
|
|
12932
|
+
minutes: "Minute",
|
|
12933
|
+
seconds: "Second",
|
|
12934
|
+
milliseconds: "Millisecond"
|
|
12935
|
+
};
|
|
12936
|
+
watch([draft, mode], () => {
|
|
12937
|
+
const stripped = stripInactiveFields(draft.value, mode.value);
|
|
12938
|
+
if (stripped.toString() !== modelValue.value.toString()) {
|
|
12939
|
+
isInternalEmit = true;
|
|
12940
|
+
modelValue.value = stripped;
|
|
12941
|
+
}
|
|
12942
|
+
});
|
|
12943
|
+
return (_ctx, _cache) => {
|
|
12944
|
+
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
12945
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
12946
|
+
_cache[2] || (_cache[2] = createElementVNode("span", { class: "kds-interval-popover-title" }, "Interval value", -1)),
|
|
12947
|
+
props.format === unref(kdsIntervalInputFormat).DATE_OR_TIME ? (openBlock(), createBlock(unref(KdsValueSwitch), {
|
|
12948
|
+
key: 0,
|
|
12949
|
+
modelValue: mode.value,
|
|
12950
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => mode.value = $event),
|
|
12951
|
+
class: "kds-interval-header-switch",
|
|
12952
|
+
size: "small",
|
|
12953
|
+
"possible-values": modeOptions
|
|
12954
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
12955
|
+
]),
|
|
12956
|
+
_cache[3] || (_cache[3] = createElementVNode("div", { class: "kds-interval-popover-divider" }, null, -1)),
|
|
12957
|
+
createElementVNode("div", _hoisted_3$a, [
|
|
12958
|
+
props.allowDescending ? (openBlock(), createBlock(unref(KdsValueSwitch), {
|
|
12959
|
+
key: 0,
|
|
12960
|
+
modelValue: direction.value,
|
|
12961
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => direction.value = $event),
|
|
12962
|
+
class: "kds-interval-popover-direction-switch",
|
|
12963
|
+
size: "small",
|
|
12964
|
+
variant: "muted",
|
|
12965
|
+
"possible-values": directionOptions
|
|
12966
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
12967
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
12968
|
+
mode.value === unref(kdsIntervalInputFormat).DATE ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(periodNumericKeys), (key) => {
|
|
12969
|
+
return openBlock(), createBlock(unref(_sfc_main$O), {
|
|
12970
|
+
key,
|
|
12971
|
+
"model-value": activeFields.value[key],
|
|
12972
|
+
label: fieldLabels[key] ?? unref(toTitleCase)(key),
|
|
12973
|
+
min: 0,
|
|
12974
|
+
max: unref(getMax)(key),
|
|
12975
|
+
step: 1,
|
|
12976
|
+
"onUpdate:modelValue": ($event) => updateField(key, $event)
|
|
12977
|
+
}, null, 8, ["model-value", "label", "max", "onUpdate:modelValue"]);
|
|
12978
|
+
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(durationNumericKeys), (key) => {
|
|
12979
|
+
return openBlock(), createBlock(unref(_sfc_main$O), {
|
|
12980
|
+
key,
|
|
12981
|
+
"model-value": activeFields.value[key],
|
|
12982
|
+
label: fieldLabels[key] ?? unref(toTitleCase)(key),
|
|
12983
|
+
min: 0,
|
|
12984
|
+
max: unref(getMax)(key),
|
|
12985
|
+
step: 1,
|
|
12986
|
+
"onUpdate:modelValue": ($event) => updateField(key, $event)
|
|
12987
|
+
}, null, 8, ["model-value", "label", "max", "onUpdate:modelValue"]);
|
|
12988
|
+
}), 128))
|
|
12989
|
+
])
|
|
12990
|
+
])
|
|
12991
|
+
]);
|
|
12992
|
+
};
|
|
12993
|
+
}
|
|
12994
|
+
});
|
|
12995
|
+
|
|
12996
|
+
const IntervalInputPopover = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-02541fd1"]]);
|
|
12997
|
+
|
|
12998
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
12999
|
+
__name: "KdsIntervalInput",
|
|
13000
|
+
props: /* @__PURE__ */ mergeModels({
|
|
13001
|
+
description: {},
|
|
13002
|
+
label: {},
|
|
13003
|
+
ariaLabel: {},
|
|
13004
|
+
id: {},
|
|
13005
|
+
subText: {},
|
|
13006
|
+
error: { type: Boolean, default: false },
|
|
13007
|
+
validating: { type: Boolean, default: false },
|
|
13008
|
+
preserveSubTextSpace: { type: Boolean, default: false },
|
|
13009
|
+
placeholder: {},
|
|
13010
|
+
disabled: { type: Boolean, default: false },
|
|
13011
|
+
autocomplete: {},
|
|
13012
|
+
format: { default: () => kdsIntervalInputFormat.DATE_OR_TIME },
|
|
13013
|
+
allowDescending: { type: Boolean, default: true }
|
|
13014
|
+
}, {
|
|
13015
|
+
"modelValue": { default: null },
|
|
13016
|
+
"modelModifiers": {}
|
|
13017
|
+
}),
|
|
13018
|
+
emits: ["update:modelValue"],
|
|
13019
|
+
setup(__props) {
|
|
13020
|
+
const props = createPropsRestProxy(__props, ["disabled", "error", "validating", "preserveSubTextSpace", "allowDescending", "format"]);
|
|
13021
|
+
const modelValue = useModel(__props, "modelValue");
|
|
13022
|
+
const isPopoverOpen = ref(false);
|
|
13023
|
+
const isToggling = ref(false);
|
|
13024
|
+
const inputError = ref(false);
|
|
13025
|
+
const popoverRef = useTemplateRef("popoverEl");
|
|
13026
|
+
const baseInputRef = useTemplateRef("baseInput");
|
|
13027
|
+
const defaultFormat = kdsIntervalInputFormat.DATE;
|
|
13028
|
+
const resolveActiveFormat = (duration, fallback) => {
|
|
13029
|
+
if (__props.format === kdsIntervalInputFormat.DATE || __props.format === kdsIntervalInputFormat.TIME) {
|
|
13030
|
+
return __props.format;
|
|
13031
|
+
}
|
|
13032
|
+
return duration && !duration.blank ? classifyDuration(duration) : fallback;
|
|
13033
|
+
};
|
|
13034
|
+
const activeFormat = ref(
|
|
13035
|
+
resolveActiveFormat(modelValue.value, defaultFormat)
|
|
13036
|
+
);
|
|
13037
|
+
const inputValue = ref(
|
|
13038
|
+
modelValue.value ? formatDurationToHumanReadable(modelValue.value, activeFormat.value) : ""
|
|
13039
|
+
);
|
|
13040
|
+
const popoverModelValue = computed({
|
|
13041
|
+
get: () => modelValue.value ?? createDefaultDuration(),
|
|
13042
|
+
set: (value) => {
|
|
13043
|
+
modelValue.value = value;
|
|
13044
|
+
}
|
|
13045
|
+
});
|
|
13046
|
+
const isInputError = computed(() => __props.error || inputError.value);
|
|
13047
|
+
const isValidatingState = computed(
|
|
13048
|
+
() => __props.validating && !isInputError.value && !__props.disabled
|
|
13049
|
+
);
|
|
13050
|
+
const effectiveSubText = computed(() => {
|
|
13051
|
+
if (inputError.value) {
|
|
13052
|
+
return "Invalid interval value";
|
|
13053
|
+
}
|
|
13054
|
+
if (isValidatingState.value) {
|
|
13055
|
+
return props.subText || "Validating...";
|
|
13056
|
+
}
|
|
13057
|
+
return props.subText;
|
|
13058
|
+
});
|
|
13059
|
+
watch(inputValue, () => {
|
|
13060
|
+
inputError.value = false;
|
|
13061
|
+
});
|
|
13062
|
+
let isInternalUpdate = false;
|
|
13063
|
+
const commitTypedInput = () => {
|
|
13064
|
+
if (isToggling.value) {
|
|
13065
|
+
baseInputRef.value?.focus();
|
|
13066
|
+
return;
|
|
13067
|
+
}
|
|
13068
|
+
if (inputValue.value.trim().length === 0) {
|
|
13069
|
+
modelValue.value = null;
|
|
13070
|
+
activeFormat.value = resolveActiveFormat(null, defaultFormat);
|
|
13071
|
+
inputError.value = false;
|
|
13072
|
+
return;
|
|
13073
|
+
}
|
|
13074
|
+
const result = validateIntervalInput(inputValue.value, "date_or_time");
|
|
13075
|
+
if (!result.valid) {
|
|
13076
|
+
inputError.value = true;
|
|
13077
|
+
return;
|
|
13078
|
+
}
|
|
13079
|
+
if (!__props.allowDescending && result.negative) {
|
|
13080
|
+
inputError.value = true;
|
|
13081
|
+
return;
|
|
13082
|
+
}
|
|
13083
|
+
if (result.type !== activeFormat.value && __props.format !== kdsIntervalInputFormat.DATE_OR_TIME) {
|
|
13084
|
+
inputError.value = true;
|
|
13085
|
+
return;
|
|
13086
|
+
}
|
|
13087
|
+
inputError.value = false;
|
|
13088
|
+
isInternalUpdate = true;
|
|
13089
|
+
modelValue.value = result.duration;
|
|
13090
|
+
activeFormat.value = result.type;
|
|
13091
|
+
inputValue.value = formatDurationToHumanReadable(
|
|
13092
|
+
result.duration,
|
|
13093
|
+
result.type
|
|
13094
|
+
);
|
|
13095
|
+
};
|
|
13096
|
+
watch(
|
|
13097
|
+
() => modelValue.value,
|
|
13098
|
+
(next) => {
|
|
13099
|
+
if (isInternalUpdate) {
|
|
13100
|
+
isInternalUpdate = false;
|
|
13101
|
+
return;
|
|
13102
|
+
}
|
|
13103
|
+
if (!next) {
|
|
13104
|
+
inputValue.value = "";
|
|
13105
|
+
activeFormat.value = resolveActiveFormat(null, defaultFormat);
|
|
13106
|
+
inputError.value = false;
|
|
13107
|
+
return;
|
|
13108
|
+
}
|
|
13109
|
+
const nextFormat = resolveActiveFormat(next, activeFormat.value);
|
|
13110
|
+
inputValue.value = formatDurationToHumanReadable(next, nextFormat);
|
|
13111
|
+
activeFormat.value = nextFormat;
|
|
13112
|
+
inputError.value = false;
|
|
13113
|
+
}
|
|
13114
|
+
);
|
|
13115
|
+
watch(
|
|
13116
|
+
() => __props.format,
|
|
13117
|
+
(nextFormat) => {
|
|
13118
|
+
if (nextFormat === kdsIntervalInputFormat.DATE_OR_TIME) {
|
|
13119
|
+
return;
|
|
13120
|
+
}
|
|
13121
|
+
activeFormat.value = nextFormat;
|
|
13122
|
+
if (modelValue.value) {
|
|
13123
|
+
const stripped = stripInactiveFields(
|
|
13124
|
+
modelValue.value,
|
|
13125
|
+
nextFormat
|
|
13126
|
+
);
|
|
13127
|
+
isInternalUpdate = true;
|
|
13128
|
+
modelValue.value = stripped;
|
|
13129
|
+
inputValue.value = formatDurationToHumanReadable(
|
|
13130
|
+
stripped,
|
|
13131
|
+
nextFormat
|
|
13132
|
+
);
|
|
13133
|
+
}
|
|
13134
|
+
}
|
|
13135
|
+
);
|
|
13136
|
+
return (_ctx, _cache) => {
|
|
13137
|
+
return openBlock(), createBlock(BaseFormFieldWrapper, mergeProps(props, {
|
|
13138
|
+
error: isInputError.value,
|
|
13139
|
+
validating: isValidatingState.value,
|
|
13140
|
+
"preserve-sub-text-space": __props.preserveSubTextSpace,
|
|
13141
|
+
"sub-text": effectiveSubText.value
|
|
13142
|
+
}), {
|
|
13143
|
+
default: withCtx((slotProps) => [
|
|
13144
|
+
createElementVNode("div", {
|
|
13145
|
+
style: normalizeStyle(popoverRef.value?.anchorStyle)
|
|
13146
|
+
}, [
|
|
13147
|
+
createVNode(BaseInput, mergeProps({ ref: "baseInput" }, slotProps, {
|
|
13148
|
+
modelValue: inputValue.value,
|
|
13149
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => inputValue.value = $event),
|
|
13150
|
+
type: "text",
|
|
13151
|
+
placeholder: props.placeholder,
|
|
13152
|
+
disabled: __props.disabled,
|
|
13153
|
+
error: isInputError.value,
|
|
13154
|
+
validating: isValidatingState.value,
|
|
13155
|
+
autocomplete: props.autocomplete,
|
|
13156
|
+
onBlur: commitTypedInput,
|
|
13157
|
+
onKeydown: withKeys(withModifiers(commitTypedInput, ["prevent"]), ["enter"])
|
|
13158
|
+
}), {
|
|
13159
|
+
trailing: withCtx(() => [
|
|
13160
|
+
createVNode(unref(_sfc_main$1c), {
|
|
13161
|
+
modelValue: isPopoverOpen.value,
|
|
13162
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isPopoverOpen.value = $event),
|
|
13163
|
+
size: "xsmall",
|
|
13164
|
+
variant: "outlined",
|
|
13165
|
+
"leading-icon": "interval",
|
|
13166
|
+
"aria-controls": popoverRef.value?.popoverId,
|
|
13167
|
+
"aria-expanded": isPopoverOpen.value,
|
|
13168
|
+
"aria-haspopup": "dialog",
|
|
13169
|
+
disabled: __props.disabled,
|
|
13170
|
+
title: isPopoverOpen.value ? "Close interval picker" : "Open interval picker",
|
|
13171
|
+
ariaLabel: isPopoverOpen.value ? "Close interval picker" : "Open interval picker",
|
|
13172
|
+
onPointerdown: _cache[1] || (_cache[1] = ($event) => isToggling.value = true),
|
|
13173
|
+
onPointerup: _cache[2] || (_cache[2] = ($event) => isToggling.value = false),
|
|
13174
|
+
onPointerleave: _cache[3] || (_cache[3] = ($event) => isToggling.value = false),
|
|
13175
|
+
onPointercancel: _cache[4] || (_cache[4] = ($event) => isToggling.value = false)
|
|
13176
|
+
}, null, 8, ["modelValue", "aria-controls", "aria-expanded", "disabled", "title", "ariaLabel"])
|
|
13177
|
+
]),
|
|
13178
|
+
_: 1
|
|
13179
|
+
}, 16, ["modelValue", "placeholder", "disabled", "error", "validating", "autocomplete", "onKeydown"]),
|
|
13180
|
+
createVNode(KdsPopover, {
|
|
13181
|
+
ref: "popoverEl",
|
|
13182
|
+
modelValue: isPopoverOpen.value,
|
|
13183
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isPopoverOpen.value = $event),
|
|
13184
|
+
placement: "bottom-right",
|
|
13185
|
+
role: "dialog",
|
|
13186
|
+
"aria-label": "Interval selection dialog"
|
|
13187
|
+
}, {
|
|
13188
|
+
default: withCtx(() => [
|
|
13189
|
+
createVNode(IntervalInputPopover, {
|
|
13190
|
+
modelValue: popoverModelValue.value,
|
|
13191
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => popoverModelValue.value = $event),
|
|
13192
|
+
"used-format": activeFormat.value,
|
|
13193
|
+
"onUpdate:usedFormat": _cache[7] || (_cache[7] = ($event) => activeFormat.value = $event),
|
|
13194
|
+
format: __props.format,
|
|
13195
|
+
"allow-descending": __props.allowDescending
|
|
13196
|
+
}, null, 8, ["modelValue", "used-format", "format", "allow-descending"])
|
|
13197
|
+
]),
|
|
13198
|
+
_: 1
|
|
13199
|
+
}, 8, ["modelValue"])
|
|
13200
|
+
], 4)
|
|
13201
|
+
]),
|
|
13202
|
+
_: 1
|
|
13203
|
+
}, 16, ["error", "validating", "preserve-sub-text-space", "sub-text"]);
|
|
13204
|
+
};
|
|
13205
|
+
}
|
|
13206
|
+
});
|
|
13207
|
+
|
|
12636
13208
|
const _hoisted_1$o = ["id", "aria-expanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-invalid", "aria-controls", "disabled"];
|
|
12637
13209
|
const _hoisted_2$c = {
|
|
12638
13210
|
key: 0,
|
|
@@ -12717,7 +13289,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
12717
13289
|
onKeydown
|
|
12718
13290
|
}, [
|
|
12719
13291
|
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$c, [
|
|
12720
|
-
createVNode(_sfc_main$
|
|
13292
|
+
createVNode(_sfc_main$1a, {
|
|
12721
13293
|
accessory: props.accessory,
|
|
12722
13294
|
size: "medium"
|
|
12723
13295
|
}, null, 8, ["accessory"])
|
|
@@ -14270,7 +14842,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14270
14842
|
}, null, 8, ["modelValue", "possible-values", "ariaLabel", "disabled", "error", "loading", "empty-state-label", "bottom-value"])
|
|
14271
14843
|
]),
|
|
14272
14844
|
createElementVNode("div", _hoisted_5$1, [
|
|
14273
|
-
createVNode(unref(_sfc_main$
|
|
14845
|
+
createVNode(unref(_sfc_main$1f), {
|
|
14274
14846
|
"leading-icon": "chevron-right",
|
|
14275
14847
|
ariaLabel: "Move selected values right",
|
|
14276
14848
|
title: "Move selected values right",
|
|
@@ -14279,7 +14851,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14279
14851
|
disabled: effectiveDisabled.value || leftSelected.value.length === 0,
|
|
14280
14852
|
onClick: _cache[2] || (_cache[2] = ($event) => moveRight(leftSelected.value))
|
|
14281
14853
|
}, null, 8, ["disabled"]),
|
|
14282
|
-
createVNode(unref(_sfc_main$
|
|
14854
|
+
createVNode(unref(_sfc_main$1f), {
|
|
14283
14855
|
"leading-icon": "chevron-right-double",
|
|
14284
14856
|
ariaLabel: "Move all values right",
|
|
14285
14857
|
title: "Move all values right",
|
|
@@ -14291,7 +14863,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14291
14863
|
...showUnknownValues.value && !modelValue.value.includeUnknownValues ? [UNKNOWN_VALUE_ID] : []
|
|
14292
14864
|
]))
|
|
14293
14865
|
}, null, 8, ["disabled"]),
|
|
14294
|
-
createVNode(unref(_sfc_main$
|
|
14866
|
+
createVNode(unref(_sfc_main$1f), {
|
|
14295
14867
|
"leading-icon": "chevron-left",
|
|
14296
14868
|
ariaLabel: "Move selected values left",
|
|
14297
14869
|
title: "Move selected values left",
|
|
@@ -14300,7 +14872,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
14300
14872
|
disabled: effectiveDisabled.value || rightSelected.value.length === 0,
|
|
14301
14873
|
onClick: _cache[4] || (_cache[4] = ($event) => moveLeft(rightSelected.value))
|
|
14302
14874
|
}, null, 8, ["disabled"]),
|
|
14303
|
-
createVNode(unref(_sfc_main$
|
|
14875
|
+
createVNode(unref(_sfc_main$1f), {
|
|
14304
14876
|
"leading-icon": "chevron-left-double",
|
|
14305
14877
|
ariaLabel: "Move all values left",
|
|
14306
14878
|
title: "Move all values left",
|
|
@@ -14428,7 +15000,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14428
15000
|
ariaLabel: "Search values",
|
|
14429
15001
|
placeholder: "Search",
|
|
14430
15002
|
disabled: __props.disabled
|
|
14431
|
-
}, null, 8, ["modelValue", "disabled"])) : mode.value === unref(kdsTwinListSearchMode).PATTERN ? (openBlock(), createBlock(unref(_sfc_main$
|
|
15003
|
+
}, null, 8, ["modelValue", "disabled"])) : mode.value === unref(kdsTwinListSearchMode).PATTERN ? (openBlock(), createBlock(unref(_sfc_main$A), {
|
|
14432
15004
|
key: 2,
|
|
14433
15005
|
modelValue: pattern.value,
|
|
14434
15006
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => pattern.value = $event),
|
|
@@ -14753,7 +15325,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14753
15325
|
createElementVNode("div", _hoisted_1$f, [
|
|
14754
15326
|
createElementVNode("div", _hoisted_2$5, [
|
|
14755
15327
|
createElementVNode("div", _hoisted_3$5, [
|
|
14756
|
-
createVNode(_sfc_main$
|
|
15328
|
+
createVNode(_sfc_main$1f, {
|
|
14757
15329
|
size: "small",
|
|
14758
15330
|
variant: "transparent",
|
|
14759
15331
|
"leading-icon": "sort-descending",
|
|
@@ -14761,7 +15333,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14761
15333
|
disabled: __props.disabled,
|
|
14762
15334
|
onClick: _cache[0] || (_cache[0] = ($event) => applyReorder(unref(sortByText)(true, optionLookup.value)))
|
|
14763
15335
|
}, null, 8, ["disabled"]),
|
|
14764
|
-
createVNode(_sfc_main$
|
|
15336
|
+
createVNode(_sfc_main$1f, {
|
|
14765
15337
|
size: "small",
|
|
14766
15338
|
variant: "transparent",
|
|
14767
15339
|
"leading-icon": "sort-ascending",
|
|
@@ -14770,7 +15342,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14770
15342
|
onClick: _cache[1] || (_cache[1] = ($event) => applyReorder(unref(sortByText)(false, optionLookup.value)))
|
|
14771
15343
|
}, null, 8, ["disabled"])
|
|
14772
15344
|
]),
|
|
14773
|
-
createVNode(_sfc_main$
|
|
15345
|
+
createVNode(_sfc_main$1f, {
|
|
14774
15346
|
size: "small",
|
|
14775
15347
|
variant: "transparent",
|
|
14776
15348
|
destructive: "",
|
|
@@ -14792,7 +15364,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14792
15364
|
/* fallback only for TS */
|
|
14793
15365
|
}, null, 8, ["modelValue", "possible-values", "disabled", "error", "ariaLabel"]),
|
|
14794
15366
|
createElementVNode("div", _hoisted_4$3, [
|
|
14795
|
-
createVNode(_sfc_main$
|
|
15367
|
+
createVNode(_sfc_main$1f, {
|
|
14796
15368
|
size: "small",
|
|
14797
15369
|
variant: "transparent",
|
|
14798
15370
|
"leading-icon": "to-top",
|
|
@@ -14801,7 +15373,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14801
15373
|
disabled: __props.disabled || !unref(canMoveUp),
|
|
14802
15374
|
onClick: moveToTop
|
|
14803
15375
|
}, null, 8, ["disabled"]),
|
|
14804
|
-
createVNode(_sfc_main$
|
|
15376
|
+
createVNode(_sfc_main$1f, {
|
|
14805
15377
|
size: "small",
|
|
14806
15378
|
variant: "transparent",
|
|
14807
15379
|
"leading-icon": "to-bottom",
|
|
@@ -14810,7 +15382,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14810
15382
|
disabled: __props.disabled || !unref(canMoveDown),
|
|
14811
15383
|
onClick: moveToBottom
|
|
14812
15384
|
}, null, 8, ["disabled"]),
|
|
14813
|
-
createVNode(_sfc_main$
|
|
15385
|
+
createVNode(_sfc_main$1f, {
|
|
14814
15386
|
size: "small",
|
|
14815
15387
|
variant: "transparent",
|
|
14816
15388
|
"leading-icon": "arrow-up",
|
|
@@ -14819,7 +15391,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14819
15391
|
disabled: __props.disabled || !unref(canMoveUp),
|
|
14820
15392
|
onClick: moveUp
|
|
14821
15393
|
}, null, 8, ["disabled"]),
|
|
14822
|
-
createVNode(_sfc_main$
|
|
15394
|
+
createVNode(_sfc_main$1f, {
|
|
14823
15395
|
size: "small",
|
|
14824
15396
|
variant: "transparent",
|
|
14825
15397
|
"leading-icon": "arrow-down",
|
|
@@ -15143,9 +15715,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
15143
15715
|
return (_ctx, _cache) => {
|
|
15144
15716
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
15145
15717
|
createElementVNode("h6", null, toDisplayString(__props.headline), 1),
|
|
15146
|
-
createVNode(_sfc_main$
|
|
15718
|
+
createVNode(_sfc_main$1f, {
|
|
15147
15719
|
class: "kds-close-button",
|
|
15148
|
-
type: "button",
|
|
15149
15720
|
"leading-icon": "x-close",
|
|
15150
15721
|
size: "small",
|
|
15151
15722
|
ariaLabel: "Close panel",
|
|
@@ -15157,7 +15728,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
15157
15728
|
}
|
|
15158
15729
|
});
|
|
15159
15730
|
|
|
15160
|
-
const KdsPanelHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
15731
|
+
const KdsPanelHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-dd28904c"]]);
|
|
15161
15732
|
|
|
15162
15733
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
15163
15734
|
__name: "TabBarItemAccessory",
|
|
@@ -15617,14 +16188,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
15617
16188
|
const handleApply = (event) => emit("apply", event);
|
|
15618
16189
|
return (_ctx, _cache) => {
|
|
15619
16190
|
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
15620
|
-
createVNode(_sfc_main$
|
|
16191
|
+
createVNode(_sfc_main$1f, {
|
|
15621
16192
|
disabled: __props.disabled,
|
|
15622
16193
|
label: __props.cancelLabel,
|
|
15623
16194
|
size: "small",
|
|
15624
16195
|
variant: "transparent",
|
|
15625
16196
|
onClick: handleCancel
|
|
15626
16197
|
}, null, 8, ["disabled", "label"]),
|
|
15627
|
-
createVNode(_sfc_main$
|
|
16198
|
+
createVNode(_sfc_main$1f, {
|
|
15628
16199
|
disabled: __props.disabled,
|
|
15629
16200
|
label: __props.applyLabel,
|
|
15630
16201
|
size: "small",
|
|
@@ -15741,7 +16312,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
15741
16312
|
disabled: __props.disabled
|
|
15742
16313
|
}, null, 8, ["name", "disabled"])) : createCommentVNode("", true),
|
|
15743
16314
|
__props.badge ? (openBlock(), createBlock(unref(KdsBadge), normalizeProps(mergeProps({ key: 1 }, badgeProps.value)), null, 16)) : createCommentVNode("", true),
|
|
15744
|
-
__props.trailingButton ? (openBlock(), createBlock(unref(_sfc_main$
|
|
16315
|
+
__props.trailingButton ? (openBlock(), createBlock(unref(_sfc_main$1f), mergeProps({ key: 2 }, buttonProps.value, { onClick: onButtonClick }), null, 16)) : createCommentVNode("", true)
|
|
15745
16316
|
])
|
|
15746
16317
|
], 2);
|
|
15747
16318
|
};
|
|
@@ -15877,7 +16448,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
15877
16448
|
size: "medium"
|
|
15878
16449
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
15879
16450
|
createElementVNode("div", _hoisted_2$1, toDisplayString(__props.headline), 1),
|
|
15880
|
-
createVNode(_sfc_main$
|
|
16451
|
+
createVNode(_sfc_main$1f, {
|
|
15881
16452
|
"leading-icon": "x-close",
|
|
15882
16453
|
variant: "transparent",
|
|
15883
16454
|
size: "medium",
|
|
@@ -16150,7 +16721,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
16150
16721
|
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
16151
16722
|
createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
|
|
16152
16723
|
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
16153
|
-
createVNode(_sfc_main$
|
|
16724
|
+
createVNode(_sfc_main$X, {
|
|
16154
16725
|
modelValue: askAgain.value,
|
|
16155
16726
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
16156
16727
|
label: unref(config).value.doNotAskAgain.label,
|
|
@@ -16165,7 +16736,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
16165
16736
|
name: "footer",
|
|
16166
16737
|
fn: withCtx(() => [
|
|
16167
16738
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
|
|
16168
|
-
return openBlock(), createBlock(_sfc_main$
|
|
16739
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
16169
16740
|
key: index,
|
|
16170
16741
|
destructive: button.destructive,
|
|
16171
16742
|
autofocus: button.autofocus,
|
|
@@ -16293,7 +16864,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16293
16864
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
16294
16865
|
createElementVNode("div", _hoisted_1, [
|
|
16295
16866
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.buttons, (button) => {
|
|
16296
|
-
return openBlock(), createBlock(_sfc_main$
|
|
16867
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
16297
16868
|
ref_for: true,
|
|
16298
16869
|
ref: "measureButton",
|
|
16299
16870
|
key: button.id,
|
|
@@ -16302,7 +16873,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16302
16873
|
"leading-icon": button.leadingIcon
|
|
16303
16874
|
}, null, 8, ["label", "variant", "leading-icon"]);
|
|
16304
16875
|
}), 128)),
|
|
16305
|
-
createVNode(_sfc_main$
|
|
16876
|
+
createVNode(_sfc_main$14, {
|
|
16306
16877
|
ref: "measureMenuButton",
|
|
16307
16878
|
"leading-icon": "more-actions",
|
|
16308
16879
|
ariaLabel: "More actions",
|
|
@@ -16313,7 +16884,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16313
16884
|
class: ["kds-button-group", __props.alignment]
|
|
16314
16885
|
}), [
|
|
16315
16886
|
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleButtons.value, (button) => {
|
|
16316
|
-
return openBlock(), createBlock(_sfc_main$
|
|
16887
|
+
return openBlock(), createBlock(_sfc_main$1f, {
|
|
16317
16888
|
key: button.id,
|
|
16318
16889
|
label: button.label,
|
|
16319
16890
|
variant: button.variant ?? "outlined",
|
|
@@ -16324,7 +16895,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16324
16895
|
onClick: ($event) => emit("buttonClick", button.id)
|
|
16325
16896
|
}, null, 8, ["label", "variant", "disabled", "leading-icon", "destructive", "title", "onClick"]);
|
|
16326
16897
|
}), 128)),
|
|
16327
|
-
overflowButtons.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
16898
|
+
overflowButtons.value.length ? (openBlock(), createBlock(_sfc_main$14, {
|
|
16328
16899
|
key: 0,
|
|
16329
16900
|
"leading-icon": "more-actions",
|
|
16330
16901
|
ariaLabel: "More actions",
|
|
@@ -16348,5 +16919,5 @@ const kdsResponsiveButtonGroupAlignments = Object.values(
|
|
|
16348
16919
|
kdsResponsiveButtonGroupAlignment
|
|
16349
16920
|
);
|
|
16350
16921
|
|
|
16351
|
-
export { KdsAvatar, KdsBadge, _sfc_main$
|
|
16922
|
+
export { KdsAvatar, KdsBadge, _sfc_main$1f as KdsButton, KdsCardClickable, _sfc_main$X as KdsCheckbox, KdsCheckboxGroup, _sfc_main$K as KdsColorInput, KdsColorSwatch, _sfc_main$$ as KdsContextMenu, KdsDataType, _sfc_main$D as KdsDateInput, _sfc_main$B as KdsDateTimeFormatInput, KdsDivider, KdsDonutChart, _sfc_main$r as KdsDropdown, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsInlineMessage, _sfc_main$u as KdsIntervalInput, KdsLabel, KdsLink, _sfc_main$1e as KdsLinkButton, KdsListContainer, KdsLiveStatus, KdsLoadingSkeleton, KdsLoadingSpinner, _sfc_main$10 as KdsMenu, _sfc_main$14 as KdsMenuButton, KdsModal, KdsModalLayout, _sfc_main$o as KdsMultiSelectDropdown, KdsNavItem, KdsNavigation, _sfc_main$O as KdsNumberInput, KdsPanelButtonBar, KdsPanelHeader, _sfc_main$J as KdsPasswordInput, _sfc_main$A as KdsPatternInput, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, KdsResponsiveButtonGroup, KdsSearchInput, KdsSortableListBox, KdsSplitButton, KdsSubText, KdsTabBar, KdsTextInput, KdsTextarea, _sfc_main$w as KdsTimeInput, _sfc_main$1c as KdsToggleButton, KdsTwinList, _sfc_main$I as KdsUsernameInput, 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, kdsDateFormatCategories, kdsDateFormatCategory, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsInlineMessageVariant, kdsInlineMessageVariants, kdsIntervalDirectionalities, kdsIntervalDirectionality, kdsIntervalInputFormat, kdsIntervalInputFormats, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSkeletonVariant, kdsLoadingSkeletonVariants, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsPasswordInputAutocomplete, kdsPasswordInputAutocompletes, kdsPasswordInputVariant, kdsPasswordInputVariants, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsResponsiveButtonGroupAlignment, kdsResponsiveButtonGroupAlignments, kdsTabBarSize, kdsTabBarSizes, kdsTemporalType, kdsTemporalTypes, kdsTimeInputGranularities, kdsTimeInputGranularity, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTwinListSearchMode, kdsTwinListSearchModes, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsUsernameInputAutocomplete, kdsUsernameInputAutocompletes, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
|
|
16352
16923
|
//# sourceMappingURL=index.js.map
|