@knime/kds-components 0.14.0 → 0.15.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/accessories/Badge/KdsBadge.vue.d.ts +1 -1
- package/dist/accessories/Icon/KdsDataType.vue.d.ts +3 -7
- package/dist/accessories/Icon/KdsDataType.vue.d.ts.map +1 -1
- package/dist/accessories/Icon/KdsIcon.vue.d.ts +4 -7
- package/dist/accessories/Icon/KdsIcon.vue.d.ts.map +1 -1
- package/dist/accessories/Icon/types.d.ts +40 -2
- package/dist/accessories/Icon/types.d.ts.map +1 -1
- package/dist/accessories/LiveStatus/enums.d.ts +1 -1
- package/dist/forms/Checkbox/KdsCheckboxGroup.vue.d.ts +1 -1
- package/dist/forms/RadioButton/KdsRadioButton.vue.d.ts +1 -1
- package/dist/forms/RadioButton/KdsValueSwitch.vue.d.ts +1 -1
- package/dist/forms/_helper/List/KdsListItem/KdsListItem.vue.d.ts +4 -4
- package/dist/forms/_helper/List/KdsListItem/KdsListItem.vue.d.ts.map +1 -1
- package/dist/forms/_helper/List/ListContainer/KdsListContainer.vue.d.ts +1 -1
- package/dist/forms/_helper/List/ListContainer/KdsListContainer.vue.d.ts.map +1 -1
- package/dist/forms/_helper/List/ListContainer/types.d.ts +1 -1
- package/dist/forms/_helper/List/ListContainer/types.d.ts.map +1 -1
- package/dist/forms/_helper/List/ListItemAccessory/ListItemAccessory.vue.d.ts +4 -1
- package/dist/forms/_helper/List/ListItemAccessory/ListItemAccessory.vue.d.ts.map +1 -1
- package/dist/forms/index.d.ts +2 -0
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/inputs/BaseInput.vue.d.ts +3 -17
- package/dist/forms/inputs/BaseInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/ColorInput/KdsColorInput.vue.d.ts +1 -96
- package/dist/forms/inputs/ColorInput/KdsColorInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/ColorInput/index.d.ts +1 -0
- package/dist/forms/inputs/ColorInput/index.d.ts.map +1 -1
- package/dist/forms/inputs/ColorInput/types.d.ts +3 -0
- package/dist/forms/inputs/ColorInput/types.d.ts.map +1 -0
- package/dist/forms/inputs/NumberInput/KdsNumberInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/NumberInput/index.d.ts +1 -0
- package/dist/forms/inputs/NumberInput/index.d.ts.map +1 -1
- package/dist/forms/inputs/NumberInput/types.d.ts +23 -0
- package/dist/forms/inputs/NumberInput/types.d.ts.map +1 -0
- package/dist/forms/inputs/PatternInput/KdsPatternInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/PatternInput/index.d.ts +1 -0
- package/dist/forms/inputs/PatternInput/index.d.ts.map +1 -1
- package/dist/forms/inputs/PatternInput/types.d.ts +3 -0
- package/dist/forms/inputs/PatternInput/types.d.ts.map +1 -0
- package/dist/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/SearchInput/index.d.ts +1 -0
- package/dist/forms/inputs/SearchInput/index.d.ts.map +1 -1
- package/dist/forms/inputs/SearchInput/types.d.ts +3 -0
- package/dist/forms/inputs/SearchInput/types.d.ts.map +1 -0
- package/dist/forms/inputs/TextInput/KdsTextInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/TextInput/index.d.ts +1 -0
- package/dist/forms/inputs/TextInput/index.d.ts.map +1 -1
- package/dist/forms/inputs/TextInput/types.d.ts +3 -0
- package/dist/forms/inputs/TextInput/types.d.ts.map +1 -0
- package/dist/forms/inputs/Textarea/KdsTextarea.vue.d.ts.map +1 -1
- package/dist/forms/inputs/Textarea/index.d.ts +1 -0
- package/dist/forms/inputs/Textarea/index.d.ts.map +1 -1
- package/dist/forms/inputs/Textarea/types.d.ts +8 -0
- package/dist/forms/inputs/Textarea/types.d.ts.map +1 -0
- package/dist/forms/inputs/index.d.ts +6 -1
- package/dist/forms/inputs/index.d.ts.map +1 -1
- package/dist/forms/inputs/types.d.ts +1 -44
- package/dist/forms/inputs/types.d.ts.map +1 -1
- package/dist/forms/selects/Dropdown/BaseDropdown.vue.d.ts +28 -0
- package/dist/forms/selects/Dropdown/BaseDropdown.vue.d.ts.map +1 -0
- package/dist/forms/selects/Dropdown/DropdownContainer.vue.d.ts +252 -0
- package/dist/forms/selects/Dropdown/DropdownContainer.vue.d.ts.map +1 -0
- package/dist/forms/selects/Dropdown/KdsDropdown.vue.d.ts +3 -0
- package/dist/forms/selects/Dropdown/KdsDropdown.vue.d.ts.map +1 -0
- package/dist/forms/selects/Dropdown/index.d.ts +3 -0
- package/dist/forms/selects/Dropdown/index.d.ts.map +1 -0
- package/dist/forms/selects/Dropdown/types.d.ts +62 -0
- package/dist/forms/selects/Dropdown/types.d.ts.map +1 -0
- package/dist/forms/selects/index.d.ts +3 -0
- package/dist/forms/selects/index.d.ts.map +1 -0
- package/dist/index.css +325 -74
- package/dist/index.js +888 -271
- package/dist/index.js.map +1 -1
- package/dist/overlays/Modal/KdsModal.vue.d.ts +2 -2
- package/dist/overlays/Modal/KdsModalLayout.vue.d.ts +1 -1
- package/dist/overlays/Modal/useKdsDynamicModal.d.ts +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels, createVNode, defineAsyncComponent, useId, Fragment, renderList, onBeforeUpdate, nextTick, watchEffect, withModifiers, normalizeProps, guardReactiveProps, withDirectives, vModelText, createTextVNode, useCssVars, mergeDefaults, createSlots } from 'vue';
|
|
1
|
+
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels, createVNode, defineAsyncComponent, useId, Fragment, renderList, onBeforeUpdate, nextTick, watchEffect, withModifiers, normalizeProps, guardReactiveProps, withDirectives, vModelText, toHandlers, createTextVNode, useCssVars, mergeDefaults, createSlots } from 'vue';
|
|
2
2
|
import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useMutationObserver, useElementSize } from '@vueuse/core';
|
|
3
3
|
|
|
4
4
|
import './index.css';const kdsAvatarSize = {
|
|
@@ -9,14 +9,14 @@ import './index.css';const kdsAvatarSize = {
|
|
|
9
9
|
};
|
|
10
10
|
const kdsAvatarSizes = Object.values(kdsAvatarSize);
|
|
11
11
|
|
|
12
|
-
const _hoisted_1$
|
|
13
|
-
const _hoisted_2$
|
|
14
|
-
const _hoisted_3$
|
|
12
|
+
const _hoisted_1$w = ["role", "title", "aria-hidden", "aria-label"];
|
|
13
|
+
const _hoisted_2$f = ["src"];
|
|
14
|
+
const _hoisted_3$9 = {
|
|
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$J = /* @__PURE__ */ defineComponent({
|
|
20
20
|
__name: "KdsAvatar",
|
|
21
21
|
props: {
|
|
22
22
|
initials: {},
|
|
@@ -59,10 +59,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
alt: "",
|
|
60
60
|
"aria-hidden": "true",
|
|
61
61
|
onError: onImageError
|
|
62
|
-
}, null, 40, _hoisted_2$
|
|
62
|
+
}, null, 40, _hoisted_2$f)) : (openBlock(), createElementBlock("div", _hoisted_3$9, [
|
|
63
63
|
createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)
|
|
64
64
|
]))
|
|
65
|
-
], 10, _hoisted_1$
|
|
65
|
+
], 10, _hoisted_1$w);
|
|
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$J, [["__scopeId", "data-v-d6a313f1"]]);
|
|
79
79
|
|
|
80
80
|
const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
81
81
|
const v = glob$1[path$13];
|
|
@@ -111,11 +111,12 @@ const useIcon = ({
|
|
|
111
111
|
return iconComponent;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
const _sfc_main$
|
|
114
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
115
115
|
__name: "KdsIcon",
|
|
116
116
|
props: {
|
|
117
117
|
name: {},
|
|
118
|
-
size: { default: "medium" }
|
|
118
|
+
size: { default: "medium" },
|
|
119
|
+
disabled: { type: Boolean, default: false }
|
|
119
120
|
},
|
|
120
121
|
setup(__props) {
|
|
121
122
|
const props = __props;
|
|
@@ -123,12 +124,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
123
124
|
return (_ctx, _cache) => {
|
|
124
125
|
return unref(iconComponent) ? (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent)), {
|
|
125
126
|
key: 0,
|
|
126
|
-
class: normalizeClass(["kds-icon", props.size]),
|
|
127
|
+
class: normalizeClass(["kds-icon", props.size, { disabled: __props.disabled }]),
|
|
127
128
|
"aria-hidden": "true",
|
|
128
129
|
focusable: "false"
|
|
129
130
|
}, null, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
130
131
|
key: 1,
|
|
131
|
-
class: normalizeClass(["kds-icon", props.size]),
|
|
132
|
+
class: normalizeClass(["kds-icon", props.size, { disabled: __props.disabled }]),
|
|
132
133
|
"aria-hidden": "true",
|
|
133
134
|
focusable: "false"
|
|
134
135
|
}, null, 2));
|
|
@@ -136,7 +137,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
136
137
|
}
|
|
137
138
|
});
|
|
138
139
|
|
|
139
|
-
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
140
|
+
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-4da5bf3e"]]);
|
|
140
141
|
|
|
141
142
|
const ID_TO_ICON_MAP = {
|
|
142
143
|
// Flow Variables
|
|
@@ -462,13 +463,14 @@ const kdsDataTypeSize = {
|
|
|
462
463
|
};
|
|
463
464
|
const kdsDataTypeSizes = Object.values(kdsDataTypeSize);
|
|
464
465
|
|
|
465
|
-
const _hoisted_1$
|
|
466
|
-
const _sfc_main$
|
|
466
|
+
const _hoisted_1$v = ["title"];
|
|
467
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
467
468
|
__name: "KdsDataType",
|
|
468
469
|
props: {
|
|
469
470
|
iconName: { default: "unknown-datatype" },
|
|
470
471
|
iconTitle: { default: "Unknown Data Type" },
|
|
471
|
-
size: { default: "medium" }
|
|
472
|
+
size: { default: "medium" },
|
|
473
|
+
disabled: { type: Boolean, default: false }
|
|
472
474
|
},
|
|
473
475
|
setup(__props) {
|
|
474
476
|
const DATA_TYPE_SIZE_TO_ICON_SIZE = {
|
|
@@ -495,7 +497,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
495
497
|
});
|
|
496
498
|
return (_ctx, _cache) => {
|
|
497
499
|
return openBlock(), createElementBlock("div", {
|
|
498
|
-
class: normalizeClass(["kds-data-type-icon-container", __props.size]),
|
|
500
|
+
class: normalizeClass(["kds-data-type-icon-container", __props.size, { disabled: __props.disabled }]),
|
|
499
501
|
title: props.iconTitle
|
|
500
502
|
}, [
|
|
501
503
|
(openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent)), {
|
|
@@ -503,12 +505,12 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
503
505
|
"aria-hidden": "true",
|
|
504
506
|
focusable: "false"
|
|
505
507
|
}, null, 8, ["class"]))
|
|
506
|
-
], 10, _hoisted_1$
|
|
508
|
+
], 10, _hoisted_1$v);
|
|
507
509
|
};
|
|
508
510
|
}
|
|
509
511
|
});
|
|
510
512
|
|
|
511
|
-
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
513
|
+
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-806087da"]]);
|
|
512
514
|
|
|
513
515
|
const kdsBadgeVariant = {
|
|
514
516
|
NEUTRAL: "neutral",
|
|
@@ -525,8 +527,8 @@ const kdsBadgeSize = {
|
|
|
525
527
|
};
|
|
526
528
|
const kdsBadgeSizes = Object.values(kdsBadgeSize);
|
|
527
529
|
|
|
528
|
-
const _hoisted_1$
|
|
529
|
-
const _sfc_main$
|
|
530
|
+
const _hoisted_1$u = { class: "label-wrapper" };
|
|
531
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
530
532
|
__name: "KdsBadge",
|
|
531
533
|
props: {
|
|
532
534
|
label: {},
|
|
@@ -548,13 +550,13 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
548
550
|
name: __props.icon,
|
|
549
551
|
size: sizeToIconSize[__props.size]
|
|
550
552
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true),
|
|
551
|
-
createElementVNode("span", _hoisted_1$
|
|
553
|
+
createElementVNode("span", _hoisted_1$u, toDisplayString(__props.label), 1)
|
|
552
554
|
], 2);
|
|
553
555
|
};
|
|
554
556
|
}
|
|
555
557
|
});
|
|
556
558
|
|
|
557
|
-
const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
559
|
+
const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-5c6c74a8"]]);
|
|
558
560
|
|
|
559
561
|
const kdsColorSwatchType = {
|
|
560
562
|
LEARNER: "learner",
|
|
@@ -573,8 +575,8 @@ const kdsColorSwatchSize = {
|
|
|
573
575
|
};
|
|
574
576
|
const kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
|
|
575
577
|
|
|
576
|
-
const _hoisted_1$
|
|
577
|
-
const _sfc_main$
|
|
578
|
+
const _hoisted_1$t = ["role", "title", "aria-hidden", "aria-label"];
|
|
579
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
578
580
|
__name: "KdsColorSwatch",
|
|
579
581
|
props: {
|
|
580
582
|
color: {},
|
|
@@ -609,12 +611,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
609
611
|
style: normalizeStyle({ backgroundColor: backgroundColor.value }),
|
|
610
612
|
"aria-hidden": hasTitle.value ? void 0 : "true",
|
|
611
613
|
"aria-label": hasTitle.value ? accessibleTitle.value : void 0
|
|
612
|
-
}, null, 14, _hoisted_1$
|
|
614
|
+
}, null, 14, _hoisted_1$t);
|
|
613
615
|
};
|
|
614
616
|
}
|
|
615
617
|
});
|
|
616
618
|
|
|
617
|
-
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
619
|
+
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-bdb3dd24"]]);
|
|
618
620
|
|
|
619
621
|
const kdsDarkModeType = {
|
|
620
622
|
LIGHT: "light",
|
|
@@ -734,9 +736,9 @@ function useKdsIsTruncated(elementRef) {
|
|
|
734
736
|
return { isTruncated };
|
|
735
737
|
}
|
|
736
738
|
|
|
737
|
-
const _hoisted_1$
|
|
738
|
-
const _hoisted_2$
|
|
739
|
-
const _sfc_main$
|
|
739
|
+
const _hoisted_1$s = ["title", "aria-label"];
|
|
740
|
+
const _hoisted_2$e = ["title"];
|
|
741
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
740
742
|
__name: "KdsLiveStatus",
|
|
741
743
|
props: {
|
|
742
744
|
status: { default: "red" },
|
|
@@ -765,13 +767,13 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
765
767
|
ref: labelEl,
|
|
766
768
|
class: "label",
|
|
767
769
|
title: unref(isTruncated) ? props.label : void 0
|
|
768
|
-
}, toDisplayString(props.label), 9, _hoisted_2$
|
|
769
|
-
], 10, _hoisted_1$
|
|
770
|
+
}, toDisplayString(props.label), 9, _hoisted_2$e)) : createCommentVNode("", true)
|
|
771
|
+
], 10, _hoisted_1$s);
|
|
770
772
|
};
|
|
771
773
|
}
|
|
772
774
|
});
|
|
773
775
|
|
|
774
|
-
const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
776
|
+
const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-4dec8e94"]]);
|
|
775
777
|
|
|
776
778
|
const kdsLiveStatusStatus = {
|
|
777
779
|
RED: "red",
|
|
@@ -787,8 +789,8 @@ const kdsLiveStatusSize = {
|
|
|
787
789
|
};
|
|
788
790
|
const kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
|
|
789
791
|
|
|
790
|
-
const _hoisted_1$
|
|
791
|
-
const _sfc_main$
|
|
792
|
+
const _hoisted_1$r = ["data-style"];
|
|
793
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
792
794
|
__name: "KdsLoadingSpinner",
|
|
793
795
|
props: {
|
|
794
796
|
size: { default: "medium" },
|
|
@@ -813,12 +815,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
813
815
|
cy: "60",
|
|
814
816
|
r: "50"
|
|
815
817
|
}, null, -1)
|
|
816
|
-
])], 10, _hoisted_1$
|
|
818
|
+
])], 10, _hoisted_1$r);
|
|
817
819
|
};
|
|
818
820
|
}
|
|
819
821
|
});
|
|
820
822
|
|
|
821
|
-
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
823
|
+
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-74bb7c3d"]]);
|
|
822
824
|
|
|
823
825
|
const kdsLoadingSpinnerVariant = {
|
|
824
826
|
ON_PRIMARY: "onPrimary",
|
|
@@ -828,11 +830,11 @@ const kdsLoadingSpinnerVariants = Object.values(
|
|
|
828
830
|
kdsLoadingSpinnerVariant
|
|
829
831
|
);
|
|
830
832
|
|
|
831
|
-
const _hoisted_1$
|
|
833
|
+
const _hoisted_1$q = {
|
|
832
834
|
key: 0,
|
|
833
835
|
class: "label"
|
|
834
836
|
};
|
|
835
|
-
const _sfc_main$
|
|
837
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
836
838
|
__name: "BaseButton",
|
|
837
839
|
props: {
|
|
838
840
|
size: { default: "medium" },
|
|
@@ -891,7 +893,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
891
893
|
size: iconSize.value
|
|
892
894
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
893
895
|
], true),
|
|
894
|
-
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
896
|
+
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$q, toDisplayString(props.label), 1)) : createCommentVNode("", true),
|
|
895
897
|
props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
|
|
896
898
|
key: 1,
|
|
897
899
|
name: props.trailingIcon,
|
|
@@ -904,9 +906,9 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
904
906
|
}
|
|
905
907
|
});
|
|
906
908
|
|
|
907
|
-
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
909
|
+
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-b0f9559f"]]);
|
|
908
910
|
|
|
909
|
-
const _sfc_main$
|
|
911
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
910
912
|
__name: "KdsButton",
|
|
911
913
|
props: {
|
|
912
914
|
size: {},
|
|
@@ -959,7 +961,7 @@ const resolveNuxtLinkComponent = () => {
|
|
|
959
961
|
return fallbackComponent;
|
|
960
962
|
};
|
|
961
963
|
|
|
962
|
-
const _sfc_main$
|
|
964
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
963
965
|
__name: "KdsLinkButton",
|
|
964
966
|
props: {
|
|
965
967
|
size: {},
|
|
@@ -995,7 +997,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
995
997
|
}
|
|
996
998
|
});
|
|
997
999
|
|
|
998
|
-
const _sfc_main$
|
|
1000
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
999
1001
|
__name: "KdsToggleButton",
|
|
1000
1002
|
props: /* @__PURE__ */ mergeModels({
|
|
1001
1003
|
size: {},
|
|
@@ -1030,9 +1032,9 @@ const kdsToggleButtonVariant = {
|
|
|
1030
1032
|
};
|
|
1031
1033
|
const kdsToggleButtonVariants = Object.values(kdsToggleButtonVariant);
|
|
1032
1034
|
|
|
1033
|
-
const _hoisted_1$
|
|
1034
|
-
const _hoisted_2$
|
|
1035
|
-
const _sfc_main$
|
|
1035
|
+
const _hoisted_1$p = ["data-visible"];
|
|
1036
|
+
const _hoisted_2$d = ["data-visible"];
|
|
1037
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
1036
1038
|
__name: "KdsProgressButton",
|
|
1037
1039
|
props: /* @__PURE__ */ mergeModels({
|
|
1038
1040
|
size: { default: "medium" },
|
|
@@ -1095,7 +1097,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1095
1097
|
name: props.leadingIcon,
|
|
1096
1098
|
size: iconSize.value
|
|
1097
1099
|
}, null, 8, ["name", "size"])
|
|
1098
|
-
], 8, _hoisted_1$
|
|
1100
|
+
], 8, _hoisted_1$p),
|
|
1099
1101
|
createElementVNode("span", {
|
|
1100
1102
|
class: "spinner",
|
|
1101
1103
|
"data-visible": state.value === "progress"
|
|
@@ -1104,7 +1106,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1104
1106
|
size: iconSize.value,
|
|
1105
1107
|
variant: props.variant === "filled" ? "onPrimary" : "onSurface"
|
|
1106
1108
|
}, null, 8, ["size", "variant"])
|
|
1107
|
-
], 8, _hoisted_2$
|
|
1109
|
+
], 8, _hoisted_2$d)
|
|
1108
1110
|
], 2)
|
|
1109
1111
|
]),
|
|
1110
1112
|
_: 1
|
|
@@ -1113,7 +1115,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
1113
1115
|
}
|
|
1114
1116
|
});
|
|
1115
1117
|
|
|
1116
|
-
const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1118
|
+
const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-ec08a9ba"]]);
|
|
1117
1119
|
|
|
1118
1120
|
const kdsProgressButtonState = {
|
|
1119
1121
|
DEFAULT: "default",
|
|
@@ -1137,9 +1139,9 @@ const kdsButtonVariant = {
|
|
|
1137
1139
|
};
|
|
1138
1140
|
const kdsButtonVariants = Object.values(kdsButtonVariant);
|
|
1139
1141
|
|
|
1140
|
-
const _hoisted_1$
|
|
1141
|
-
const _hoisted_2$
|
|
1142
|
-
const _sfc_main$
|
|
1142
|
+
const _hoisted_1$o = { class: "kds-label-wrapper" };
|
|
1143
|
+
const _hoisted_2$c = ["id", "for", "title"];
|
|
1144
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
1143
1145
|
__name: "KdsLabel",
|
|
1144
1146
|
props: {
|
|
1145
1147
|
label: {},
|
|
@@ -1156,7 +1158,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1156
1158
|
const labelEl = useTemplateRef("labelEl");
|
|
1157
1159
|
const { isTruncated } = useKdsIsTruncated(labelEl);
|
|
1158
1160
|
return (_ctx, _cache) => {
|
|
1159
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1161
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
1160
1162
|
createElementVNode("label", {
|
|
1161
1163
|
id: props.id,
|
|
1162
1164
|
ref_key: "labelEl",
|
|
@@ -1164,7 +1166,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1164
1166
|
for: props.for,
|
|
1165
1167
|
class: "label",
|
|
1166
1168
|
title: unref(isTruncated) ? props.label : void 0
|
|
1167
|
-
}, toDisplayString(props.label), 9, _hoisted_2$
|
|
1169
|
+
}, toDisplayString(props.label), 9, _hoisted_2$c),
|
|
1168
1170
|
props.description ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
|
|
1169
1171
|
key: 0,
|
|
1170
1172
|
content: props.description,
|
|
@@ -1175,11 +1177,11 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
1175
1177
|
}
|
|
1176
1178
|
});
|
|
1177
1179
|
|
|
1178
|
-
const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1180
|
+
const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-1a5dc1ba"]]);
|
|
1179
1181
|
|
|
1180
|
-
const _hoisted_1$
|
|
1181
|
-
const _hoisted_2$
|
|
1182
|
-
const _sfc_main$
|
|
1182
|
+
const _hoisted_1$n = ["id"];
|
|
1183
|
+
const _hoisted_2$b = { class: "subtext-text" };
|
|
1184
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
1183
1185
|
__name: "KdsSubText",
|
|
1184
1186
|
props: {
|
|
1185
1187
|
id: {},
|
|
@@ -1210,27 +1212,27 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
1210
1212
|
variant: "onSurface",
|
|
1211
1213
|
"aria-hidden": "true"
|
|
1212
1214
|
})) : createCommentVNode("", true),
|
|
1213
|
-
createElementVNode("span", _hoisted_2$
|
|
1214
|
-
], 10, _hoisted_1$
|
|
1215
|
+
createElementVNode("span", _hoisted_2$b, toDisplayString(props.subText), 1)
|
|
1216
|
+
], 10, _hoisted_1$n)) : createCommentVNode("", true);
|
|
1215
1217
|
};
|
|
1216
1218
|
}
|
|
1217
1219
|
});
|
|
1218
1220
|
|
|
1219
|
-
const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1221
|
+
const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-df9a85a4"]]);
|
|
1220
1222
|
|
|
1221
|
-
const _hoisted_1$
|
|
1222
|
-
const _hoisted_2$
|
|
1223
|
-
const _hoisted_3$
|
|
1223
|
+
const _hoisted_1$m = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
|
|
1224
|
+
const _hoisted_2$a = { class: "control" };
|
|
1225
|
+
const _hoisted_3$8 = {
|
|
1224
1226
|
key: 0,
|
|
1225
1227
|
class: "content"
|
|
1226
1228
|
};
|
|
1227
|
-
const _hoisted_4$
|
|
1228
|
-
const _hoisted_5$
|
|
1229
|
-
const _hoisted_6$
|
|
1229
|
+
const _hoisted_4$6 = { class: "label" };
|
|
1230
|
+
const _hoisted_5$3 = ["id"];
|
|
1231
|
+
const _hoisted_6$3 = {
|
|
1230
1232
|
key: 0,
|
|
1231
1233
|
class: "subtext-wrapper"
|
|
1232
1234
|
};
|
|
1233
|
-
const _sfc_main$
|
|
1235
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
1234
1236
|
__name: "BaseCheckbox",
|
|
1235
1237
|
props: /* @__PURE__ */ mergeModels({
|
|
1236
1238
|
disabled: { type: Boolean, default: false },
|
|
@@ -1303,7 +1305,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1303
1305
|
role: "checkbox",
|
|
1304
1306
|
onClick: handleClick
|
|
1305
1307
|
}, [
|
|
1306
|
-
createElementVNode("div", _hoisted_2$
|
|
1308
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
1307
1309
|
icon.value ? (openBlock(), createBlock(KdsIcon, {
|
|
1308
1310
|
key: 0,
|
|
1309
1311
|
name: icon.value,
|
|
@@ -1311,16 +1313,16 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1311
1313
|
size: "xsmall"
|
|
1312
1314
|
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
1313
1315
|
]),
|
|
1314
|
-
props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1315
|
-
createElementVNode("div", _hoisted_4$
|
|
1316
|
+
props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$8, [
|
|
1317
|
+
createElementVNode("div", _hoisted_4$6, toDisplayString(props.label), 1),
|
|
1316
1318
|
props.helperText ? (openBlock(), createElementBlock("div", {
|
|
1317
1319
|
key: 0,
|
|
1318
1320
|
id: unref(helperId),
|
|
1319
1321
|
class: "helper-text"
|
|
1320
|
-
}, toDisplayString(props.helperText), 9, _hoisted_5$
|
|
1322
|
+
}, toDisplayString(props.helperText), 9, _hoisted_5$3)) : createCommentVNode("", true)
|
|
1321
1323
|
])) : createCommentVNode("", true)
|
|
1322
|
-
], 10, _hoisted_1$
|
|
1323
|
-
props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
1324
|
+
], 10, _hoisted_1$m),
|
|
1325
|
+
props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
|
|
1324
1326
|
createVNode(KdsSubText, {
|
|
1325
1327
|
id: unref(descriptionId),
|
|
1326
1328
|
"sub-text": props.subText,
|
|
@@ -1333,9 +1335,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
1333
1335
|
}
|
|
1334
1336
|
});
|
|
1335
1337
|
|
|
1336
|
-
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1338
|
+
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-32f17780"]]);
|
|
1337
1339
|
|
|
1338
|
-
const _sfc_main$
|
|
1340
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
1339
1341
|
__name: "KdsCheckbox",
|
|
1340
1342
|
props: /* @__PURE__ */ mergeModels({
|
|
1341
1343
|
disabled: { type: Boolean, default: false },
|
|
@@ -1367,8 +1369,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
1367
1369
|
}
|
|
1368
1370
|
});
|
|
1369
1371
|
|
|
1370
|
-
const _hoisted_1$
|
|
1371
|
-
const _sfc_main$
|
|
1372
|
+
const _hoisted_1$l = ["id", "aria-labelledby", "aria-describedby"];
|
|
1373
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
1372
1374
|
__name: "KdsCheckboxGroup",
|
|
1373
1375
|
props: /* @__PURE__ */ mergeModels({
|
|
1374
1376
|
id: {},
|
|
@@ -1452,12 +1454,12 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1452
1454
|
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
1453
1455
|
error: hasError.value
|
|
1454
1456
|
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
1455
|
-
], 8, _hoisted_1$
|
|
1457
|
+
], 8, _hoisted_1$l);
|
|
1456
1458
|
};
|
|
1457
1459
|
}
|
|
1458
1460
|
});
|
|
1459
1461
|
|
|
1460
|
-
const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1462
|
+
const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-c38eeda5"]]);
|
|
1461
1463
|
|
|
1462
1464
|
const kdsCheckboxGroupAlignment = {
|
|
1463
1465
|
VERTICAL: "vertical",
|
|
@@ -1473,19 +1475,19 @@ const kdsCheckboxValue = {
|
|
|
1473
1475
|
};
|
|
1474
1476
|
const kdsCheckboxValues = Object.values(kdsCheckboxValue);
|
|
1475
1477
|
|
|
1476
|
-
const _hoisted_1$
|
|
1477
|
-
const _hoisted_2$
|
|
1478
|
-
const _hoisted_3$
|
|
1478
|
+
const _hoisted_1$k = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
|
|
1479
|
+
const _hoisted_2$9 = { class: "control" };
|
|
1480
|
+
const _hoisted_3$7 = {
|
|
1479
1481
|
key: 0,
|
|
1480
1482
|
class: "dot",
|
|
1481
1483
|
viewBox: "0 0 2 2",
|
|
1482
1484
|
"aria-hidden": "true",
|
|
1483
1485
|
focusable: "false"
|
|
1484
1486
|
};
|
|
1485
|
-
const _hoisted_4$
|
|
1486
|
-
const _hoisted_5$
|
|
1487
|
-
const _hoisted_6$
|
|
1488
|
-
const _sfc_main$
|
|
1487
|
+
const _hoisted_4$5 = { class: "content" };
|
|
1488
|
+
const _hoisted_5$2 = { class: "label" };
|
|
1489
|
+
const _hoisted_6$2 = ["id"];
|
|
1490
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
1489
1491
|
__name: "KdsRadioButton",
|
|
1490
1492
|
props: /* @__PURE__ */ mergeModels({
|
|
1491
1493
|
text: {},
|
|
@@ -1525,8 +1527,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1525
1527
|
type: "button",
|
|
1526
1528
|
onClick: handleClick
|
|
1527
1529
|
}, [
|
|
1528
|
-
createElementVNode("div", _hoisted_2$
|
|
1529
|
-
modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$
|
|
1530
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
1531
|
+
modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$7, [..._cache[0] || (_cache[0] = [
|
|
1530
1532
|
createElementVNode("circle", {
|
|
1531
1533
|
cx: "1",
|
|
1532
1534
|
cy: "1",
|
|
@@ -1534,20 +1536,20 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1534
1536
|
}, null, -1)
|
|
1535
1537
|
])])) : createCommentVNode("", true)
|
|
1536
1538
|
]),
|
|
1537
|
-
createElementVNode("div", _hoisted_4$
|
|
1538
|
-
createElementVNode("div", _hoisted_5$
|
|
1539
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
1540
|
+
createElementVNode("div", _hoisted_5$2, toDisplayString(props.text), 1),
|
|
1539
1541
|
props.helperText ? (openBlock(), createElementBlock("div", {
|
|
1540
1542
|
key: 0,
|
|
1541
1543
|
id: `${unref(id)}-helper`,
|
|
1542
1544
|
class: "helper-text"
|
|
1543
|
-
}, toDisplayString(props.helperText), 9, _hoisted_6$
|
|
1545
|
+
}, toDisplayString(props.helperText), 9, _hoisted_6$2)) : createCommentVNode("", true)
|
|
1544
1546
|
])
|
|
1545
|
-
], 10, _hoisted_1$
|
|
1547
|
+
], 10, _hoisted_1$k);
|
|
1546
1548
|
};
|
|
1547
1549
|
}
|
|
1548
1550
|
});
|
|
1549
1551
|
|
|
1550
|
-
const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1552
|
+
const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-27c361e4"]]);
|
|
1551
1553
|
|
|
1552
1554
|
const useRadioSelection = ({
|
|
1553
1555
|
selectedId,
|
|
@@ -1669,8 +1671,8 @@ const useRadioSelection = ({
|
|
|
1669
1671
|
};
|
|
1670
1672
|
};
|
|
1671
1673
|
|
|
1672
|
-
const _hoisted_1$
|
|
1673
|
-
const _sfc_main$
|
|
1674
|
+
const _hoisted_1$j = ["id", "aria-labelledby", "aria-describedby"];
|
|
1675
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
1674
1676
|
__name: "KdsRadioButtonGroup",
|
|
1675
1677
|
props: /* @__PURE__ */ mergeModels({
|
|
1676
1678
|
id: {},
|
|
@@ -1749,15 +1751,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1749
1751
|
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
1750
1752
|
error: unref(hasError)
|
|
1751
1753
|
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
1752
|
-
], 8, _hoisted_1$
|
|
1754
|
+
], 8, _hoisted_1$j);
|
|
1753
1755
|
};
|
|
1754
1756
|
}
|
|
1755
1757
|
});
|
|
1756
1758
|
|
|
1757
|
-
const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1759
|
+
const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-9cc4dcdd"]]);
|
|
1758
1760
|
|
|
1759
|
-
const _hoisted_1$
|
|
1760
|
-
const _sfc_main$
|
|
1761
|
+
const _hoisted_1$i = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
|
|
1762
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
1761
1763
|
__name: "ValueSwitchItem",
|
|
1762
1764
|
props: {
|
|
1763
1765
|
selected: { type: Boolean },
|
|
@@ -1807,12 +1809,12 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
1807
1809
|
name: props.trailingIcon,
|
|
1808
1810
|
size: props.size
|
|
1809
1811
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
1810
|
-
], 10, _hoisted_1$
|
|
1812
|
+
], 10, _hoisted_1$i);
|
|
1811
1813
|
};
|
|
1812
1814
|
}
|
|
1813
1815
|
});
|
|
1814
1816
|
|
|
1815
|
-
const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1817
|
+
const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-93f3f577"]]);
|
|
1816
1818
|
|
|
1817
1819
|
const useValueSwitchIconHiding = ({
|
|
1818
1820
|
width,
|
|
@@ -1863,8 +1865,8 @@ const useValueSwitchIconHiding = ({
|
|
|
1863
1865
|
};
|
|
1864
1866
|
};
|
|
1865
1867
|
|
|
1866
|
-
const _hoisted_1$
|
|
1867
|
-
const _sfc_main$
|
|
1868
|
+
const _hoisted_1$h = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
|
|
1869
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
1868
1870
|
__name: "KdsValueSwitch",
|
|
1869
1871
|
props: /* @__PURE__ */ mergeModels({
|
|
1870
1872
|
id: {},
|
|
@@ -1957,12 +1959,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
1957
1959
|
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
1958
1960
|
error: props.error
|
|
1959
1961
|
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
1960
|
-
], 10, _hoisted_1$
|
|
1962
|
+
], 10, _hoisted_1$h);
|
|
1961
1963
|
};
|
|
1962
1964
|
}
|
|
1963
1965
|
});
|
|
1964
1966
|
|
|
1965
|
-
const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1967
|
+
const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-666d4c10"]]);
|
|
1966
1968
|
|
|
1967
1969
|
const kdsRadioButtonGroupAlignment = {
|
|
1968
1970
|
VERTICAL: "vertical",
|
|
@@ -1982,12 +1984,12 @@ const kdsValueSwitchVariant = {
|
|
|
1982
1984
|
};
|
|
1983
1985
|
const kdsValueSwitchVariants = Object.values(kdsValueSwitchVariant);
|
|
1984
1986
|
|
|
1985
|
-
const _hoisted_1$
|
|
1986
|
-
const _hoisted_2$
|
|
1987
|
+
const _hoisted_1$g = ["id", "role", "aria-label"];
|
|
1988
|
+
const _hoisted_2$8 = {
|
|
1987
1989
|
key: 0,
|
|
1988
1990
|
class: "kds-popover-default-content"
|
|
1989
1991
|
};
|
|
1990
|
-
const _sfc_main$
|
|
1992
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
1991
1993
|
__name: "KdsPopover",
|
|
1992
1994
|
props: /* @__PURE__ */ mergeModels({
|
|
1993
1995
|
placement: { default: "bottom-left" },
|
|
@@ -2028,16 +2030,16 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2028
2030
|
onToggle: _cache[0] || (_cache[0] = ($event) => open.value = $event.newState === "open")
|
|
2029
2031
|
}, [
|
|
2030
2032
|
open.value ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
2031
|
-
props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2033
|
+
props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$8, toDisplayString(props.content), 1)) : createCommentVNode("", true)
|
|
2032
2034
|
], true) : createCommentVNode("", true)
|
|
2033
|
-
], 46, _hoisted_1$
|
|
2035
|
+
], 46, _hoisted_1$g);
|
|
2034
2036
|
};
|
|
2035
2037
|
}
|
|
2036
2038
|
});
|
|
2037
2039
|
|
|
2038
|
-
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2040
|
+
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-9125d023"]]);
|
|
2039
2041
|
|
|
2040
|
-
const _sfc_main$
|
|
2042
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2041
2043
|
__name: "BaseFormFieldWrapper",
|
|
2042
2044
|
props: {
|
|
2043
2045
|
id: {},
|
|
@@ -2089,42 +2091,39 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
2089
2091
|
}
|
|
2090
2092
|
});
|
|
2091
2093
|
|
|
2092
|
-
const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2094
|
+
const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-5d99c134"]]);
|
|
2093
2095
|
|
|
2094
|
-
const _hoisted_1$
|
|
2096
|
+
const _hoisted_1$f = {
|
|
2095
2097
|
key: 0,
|
|
2096
2098
|
class: "icon-wrapper leading"
|
|
2097
2099
|
};
|
|
2098
|
-
const _hoisted_2$
|
|
2100
|
+
const _hoisted_2$7 = {
|
|
2099
2101
|
key: 1,
|
|
2100
2102
|
class: "leading-slot"
|
|
2101
2103
|
};
|
|
2102
|
-
const _hoisted_3$
|
|
2103
|
-
const _hoisted_4$
|
|
2104
|
-
const _hoisted_5 = {
|
|
2104
|
+
const _hoisted_3$6 = ["id", "value", "type", "inputmode", "placeholder", "disabled", "autocomplete", "min", "max", "step", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "role", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext", "aria-activedescendant"];
|
|
2105
|
+
const _hoisted_4$4 = ["aria-disabled"];
|
|
2106
|
+
const _hoisted_5$1 = {
|
|
2105
2107
|
key: 4,
|
|
2106
2108
|
class: "trailing-slot"
|
|
2107
2109
|
};
|
|
2108
|
-
const _hoisted_6 = {
|
|
2110
|
+
const _hoisted_6$1 = {
|
|
2109
2111
|
key: 5,
|
|
2110
2112
|
class: "icon-wrapper trailing"
|
|
2111
2113
|
};
|
|
2112
|
-
const _sfc_main$
|
|
2114
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
2113
2115
|
__name: "BaseInput",
|
|
2114
2116
|
props: /* @__PURE__ */ mergeModels({
|
|
2115
|
-
id: {},
|
|
2117
|
+
id: { default: void 0 },
|
|
2116
2118
|
type: { default: "text" },
|
|
2117
2119
|
min: { default: void 0 },
|
|
2118
2120
|
max: { default: void 0 },
|
|
2119
2121
|
step: { default: void 0 },
|
|
2120
2122
|
placeholder: { default: void 0 },
|
|
2121
2123
|
disabled: { type: Boolean, default: false },
|
|
2122
|
-
readonly: { type: Boolean, default: false },
|
|
2123
|
-
required: { type: Boolean, default: false },
|
|
2124
2124
|
leadingIcon: { default: void 0 },
|
|
2125
2125
|
trailingIcon: { default: void 0 },
|
|
2126
2126
|
error: { type: Boolean, default: false },
|
|
2127
|
-
name: { default: void 0 },
|
|
2128
2127
|
autocomplete: { default: void 0 },
|
|
2129
2128
|
ariaLabel: { default: void 0 },
|
|
2130
2129
|
ariaLabelledby: { default: void 0 },
|
|
@@ -2186,13 +2185,13 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2186
2185
|
}),
|
|
2187
2186
|
onClick: handleContainerClick
|
|
2188
2187
|
}, [
|
|
2189
|
-
props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2188
|
+
props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
2190
2189
|
props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
2191
2190
|
key: 0,
|
|
2192
2191
|
name: props.leadingIcon
|
|
2193
2192
|
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
2194
2193
|
])) : createCommentVNode("", true),
|
|
2195
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2194
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
2196
2195
|
renderSlot(_ctx.$slots, "leading", {}, void 0, true)
|
|
2197
2196
|
])) : createCommentVNode("", true),
|
|
2198
2197
|
createElementVNode("input", {
|
|
@@ -2203,9 +2202,6 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2203
2202
|
inputmode: props.inputmode,
|
|
2204
2203
|
placeholder: props.placeholder,
|
|
2205
2204
|
disabled: props.disabled,
|
|
2206
|
-
readonly: props.readonly,
|
|
2207
|
-
required: props.required,
|
|
2208
|
-
name: props.name,
|
|
2209
2205
|
autocomplete: props.autocomplete,
|
|
2210
2206
|
min: props.min,
|
|
2211
2207
|
max: props.max,
|
|
@@ -2226,7 +2222,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2226
2222
|
onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur", $event)),
|
|
2227
2223
|
onKeydown: _cache[2] || (_cache[2] = ($event) => emit("keydown", $event)),
|
|
2228
2224
|
onClick: _cache[3] || (_cache[3] = ($event) => emit("click", $event))
|
|
2229
|
-
}, null, 42, _hoisted_3$
|
|
2225
|
+
}, null, 42, _hoisted_3$6),
|
|
2230
2226
|
props.unit ? (openBlock(), createElementBlock("span", {
|
|
2231
2227
|
key: 2,
|
|
2232
2228
|
class: normalizeClass({
|
|
@@ -2235,8 +2231,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2235
2231
|
disabled: props.disabled
|
|
2236
2232
|
}),
|
|
2237
2233
|
"aria-disabled": props.disabled || void 0
|
|
2238
|
-
}, toDisplayString(props.unit), 11, _hoisted_4$
|
|
2239
|
-
props.clearable && hasValue.value && !props.disabled
|
|
2234
|
+
}, toDisplayString(props.unit), 11, _hoisted_4$4)) : createCommentVNode("", true),
|
|
2235
|
+
props.clearable && hasValue.value && !props.disabled ? (openBlock(), createBlock(_sfc_main$B, {
|
|
2240
2236
|
key: 3,
|
|
2241
2237
|
class: "clear-button",
|
|
2242
2238
|
type: "button",
|
|
@@ -2247,10 +2243,10 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2247
2243
|
title: "Clear",
|
|
2248
2244
|
onClick: withModifiers(clearAndFocusInput, ["stop"])
|
|
2249
2245
|
})) : createCommentVNode("", true),
|
|
2250
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2246
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
2251
2247
|
renderSlot(_ctx.$slots, "trailing", {}, void 0, true)
|
|
2252
2248
|
])) : createCommentVNode("", true),
|
|
2253
|
-
props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
2249
|
+
props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
|
|
2254
2250
|
createVNode(KdsIcon, {
|
|
2255
2251
|
name: props.trailingIcon
|
|
2256
2252
|
}, null, 8, ["name"])
|
|
@@ -2260,9 +2256,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2260
2256
|
}
|
|
2261
2257
|
});
|
|
2262
2258
|
|
|
2263
|
-
const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2259
|
+
const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-fad4fd1f"]]);
|
|
2264
2260
|
|
|
2265
|
-
const _sfc_main$
|
|
2261
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2266
2262
|
__name: "KdsTextInput",
|
|
2267
2263
|
props: /* @__PURE__ */ mergeModels({
|
|
2268
2264
|
description: {},
|
|
@@ -2275,9 +2271,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2275
2271
|
preserveSubTextSpace: { type: Boolean, default: false },
|
|
2276
2272
|
placeholder: {},
|
|
2277
2273
|
disabled: { type: Boolean, default: false },
|
|
2278
|
-
readonly: { type: Boolean, default: false },
|
|
2279
|
-
required: { type: Boolean, default: false },
|
|
2280
|
-
name: {},
|
|
2281
2274
|
autocomplete: {}
|
|
2282
2275
|
}, {
|
|
2283
2276
|
"modelValue": { default: "" },
|
|
@@ -2303,12 +2296,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2303
2296
|
type: "text",
|
|
2304
2297
|
placeholder: props.placeholder,
|
|
2305
2298
|
disabled: props.disabled,
|
|
2306
|
-
readonly: props.readonly,
|
|
2307
|
-
required: props.required,
|
|
2308
2299
|
error: props.error,
|
|
2309
|
-
name: props.name,
|
|
2310
2300
|
autocomplete: props.autocomplete
|
|
2311
|
-
}), null, 16, ["modelValue", "placeholder", "disabled", "
|
|
2301
|
+
}), null, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
2312
2302
|
]),
|
|
2313
2303
|
_: 1
|
|
2314
2304
|
}, 16);
|
|
@@ -2474,9 +2464,9 @@ const usePointerHandler = (updateFromEvent) => {
|
|
|
2474
2464
|
};
|
|
2475
2465
|
};
|
|
2476
2466
|
|
|
2477
|
-
const _hoisted_1$
|
|
2478
|
-
const _hoisted_2$
|
|
2479
|
-
const _hoisted_3$
|
|
2467
|
+
const _hoisted_1$e = { class: "kds-color-picker" };
|
|
2468
|
+
const _hoisted_2$6 = ["aria-valuetext"];
|
|
2469
|
+
const _hoisted_3$5 = ["aria-valuenow", "aria-valuetext"];
|
|
2480
2470
|
const DEFAULT_HUE_DEG = 270;
|
|
2481
2471
|
const DEFAULT_SATURATION = 0.8;
|
|
2482
2472
|
const DEFAULT_VALUE = 0.9;
|
|
@@ -2488,7 +2478,7 @@ const KEYBOARD_LARGE_STEP = 0.1;
|
|
|
2488
2478
|
const HUE_KEYBOARD_STEP_DEG = 1;
|
|
2489
2479
|
const HUE_KEYBOARD_LARGE_STEP_DEG = 10;
|
|
2490
2480
|
const TO_BOTTOM_GRADIENT = "linear-gradient(to bottom, transparent, black)";
|
|
2491
|
-
const _sfc_main$
|
|
2481
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
2492
2482
|
__name: "ColorPicker",
|
|
2493
2483
|
props: {
|
|
2494
2484
|
"modelValue": { default: "" },
|
|
@@ -2639,7 +2629,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2639
2629
|
}
|
|
2640
2630
|
};
|
|
2641
2631
|
return (_ctx, _cache) => {
|
|
2642
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2632
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
2643
2633
|
createElementVNode("div", {
|
|
2644
2634
|
ref_key: "colorspaceEl",
|
|
2645
2635
|
ref: colorspaceEl,
|
|
@@ -2670,7 +2660,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2670
2660
|
class: "handle",
|
|
2671
2661
|
style: normalizeStyle(colorspaceHandleStyle.value)
|
|
2672
2662
|
}, null, 4)
|
|
2673
|
-
], 44, _hoisted_2$
|
|
2663
|
+
], 44, _hoisted_2$6),
|
|
2674
2664
|
createElementVNode("div", {
|
|
2675
2665
|
ref_key: "hueEl",
|
|
2676
2666
|
ref: hueEl,
|
|
@@ -2702,8 +2692,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2702
2692
|
class: "handle",
|
|
2703
2693
|
style: normalizeStyle(hueHandleStyle.value)
|
|
2704
2694
|
}, null, 4)
|
|
2705
|
-
], 40, _hoisted_3$
|
|
2706
|
-
createVNode(_sfc_main$
|
|
2695
|
+
], 40, _hoisted_3$5),
|
|
2696
|
+
createVNode(_sfc_main$l, {
|
|
2707
2697
|
"model-value": modelValue.value,
|
|
2708
2698
|
"aria-label": "Color hex value",
|
|
2709
2699
|
placeholder: "#FFFFFF",
|
|
@@ -2714,7 +2704,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
2714
2704
|
}
|
|
2715
2705
|
});
|
|
2716
2706
|
|
|
2717
|
-
const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2707
|
+
const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-180fafdd"]]);
|
|
2718
2708
|
|
|
2719
2709
|
const HEX_LENGTH_1 = 1;
|
|
2720
2710
|
const HEX_LENGTH_2 = 2;
|
|
@@ -2774,7 +2764,7 @@ const useColorInputValidationOnFocusOut = (modelValue) => {
|
|
|
2774
2764
|
return { handleFocusOut };
|
|
2775
2765
|
};
|
|
2776
2766
|
|
|
2777
|
-
const _sfc_main$
|
|
2767
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
2778
2768
|
__name: "KdsColorInput",
|
|
2779
2769
|
props: /* @__PURE__ */ mergeModels({
|
|
2780
2770
|
description: {},
|
|
@@ -2787,7 +2777,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2787
2777
|
preserveSubTextSpace: { type: Boolean, default: false },
|
|
2788
2778
|
placeholder: { default: "#FFFFFF" },
|
|
2789
2779
|
disabled: { type: Boolean, default: false },
|
|
2790
|
-
name: { default: void 0 },
|
|
2791
2780
|
autocomplete: { default: void 0 }
|
|
2792
2781
|
}, {
|
|
2793
2782
|
"modelValue": { default: "" },
|
|
@@ -2817,7 +2806,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2817
2806
|
placeholder: props.placeholder,
|
|
2818
2807
|
disabled: props.disabled,
|
|
2819
2808
|
error: props.error,
|
|
2820
|
-
name: props.name,
|
|
2821
2809
|
autocomplete: props.autocomplete
|
|
2822
2810
|
}), {
|
|
2823
2811
|
leading: withCtx(() => [
|
|
@@ -2828,7 +2816,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2828
2816
|
}, null, 8, ["color"])
|
|
2829
2817
|
]),
|
|
2830
2818
|
trailing: withCtx(() => [
|
|
2831
|
-
createVNode(unref(_sfc_main$
|
|
2819
|
+
createVNode(unref(_sfc_main$z), {
|
|
2832
2820
|
modelValue: open.value,
|
|
2833
2821
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
2834
2822
|
size: "xsmall",
|
|
@@ -2842,7 +2830,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
2842
2830
|
}, null, 8, ["modelValue", "aria-controls", "disabled", "title"])
|
|
2843
2831
|
]),
|
|
2844
2832
|
_: 1
|
|
2845
|
-
}, 16, ["modelValue", "placeholder", "disabled", "error", "
|
|
2833
|
+
}, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"]),
|
|
2846
2834
|
createVNode(KdsPopover, {
|
|
2847
2835
|
ref_key: "popoverEl",
|
|
2848
2836
|
ref: popoverEl,
|
|
@@ -2989,7 +2977,7 @@ const createKdsNumberParser = (params) => {
|
|
|
2989
2977
|
};
|
|
2990
2978
|
};
|
|
2991
2979
|
|
|
2992
|
-
const _sfc_main$
|
|
2980
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2993
2981
|
__name: "KdsNumberInput",
|
|
2994
2982
|
props: /* @__PURE__ */ mergeModels({
|
|
2995
2983
|
description: {},
|
|
@@ -3002,16 +2990,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3002
2990
|
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3003
2991
|
placeholder: {},
|
|
3004
2992
|
disabled: { type: Boolean, default: false },
|
|
3005
|
-
readonly: { type: Boolean, default: false },
|
|
3006
|
-
required: { type: Boolean, default: false },
|
|
3007
|
-
name: {},
|
|
3008
2993
|
autocomplete: {},
|
|
3009
2994
|
unit: { default: "" },
|
|
3010
2995
|
min: {},
|
|
3011
2996
|
max: {},
|
|
3012
2997
|
step: { default: 1 }
|
|
3013
2998
|
}, {
|
|
3014
|
-
"modelValue": { default: NaN },
|
|
2999
|
+
"modelValue": { default: Number.NaN },
|
|
3015
3000
|
"modelModifiers": {}
|
|
3016
3001
|
}),
|
|
3017
3002
|
emits: ["update:modelValue"],
|
|
@@ -3034,7 +3019,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3034
3019
|
});
|
|
3035
3020
|
const clamp = (value) => {
|
|
3036
3021
|
if (!Number.isFinite(value)) {
|
|
3037
|
-
return NaN;
|
|
3022
|
+
return Number.NaN;
|
|
3038
3023
|
}
|
|
3039
3024
|
let result = value;
|
|
3040
3025
|
if (props.min !== void 0 && !Number.isNaN(props.min)) {
|
|
@@ -3056,7 +3041,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3056
3041
|
{ immediate: true }
|
|
3057
3042
|
);
|
|
3058
3043
|
const canDecrease = computed(() => {
|
|
3059
|
-
if (props.disabled
|
|
3044
|
+
if (props.disabled) {
|
|
3060
3045
|
return false;
|
|
3061
3046
|
}
|
|
3062
3047
|
if (props.min === void 0 || Number.isNaN(props.min)) {
|
|
@@ -3068,7 +3053,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3068
3053
|
return modelValue.value > props.min;
|
|
3069
3054
|
});
|
|
3070
3055
|
const canIncrease = computed(() => {
|
|
3071
|
-
if (props.disabled
|
|
3056
|
+
if (props.disabled) {
|
|
3072
3057
|
return false;
|
|
3073
3058
|
}
|
|
3074
3059
|
if (props.max === void 0 || Number.isNaN(props.max)) {
|
|
@@ -3091,7 +3076,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3091
3076
|
localValue.value = numberParser.value.formatForDisplay(next);
|
|
3092
3077
|
};
|
|
3093
3078
|
const handleKeydown = (event) => {
|
|
3094
|
-
if (props.disabled
|
|
3079
|
+
if (props.disabled) {
|
|
3095
3080
|
return;
|
|
3096
3081
|
}
|
|
3097
3082
|
if (event.key === "ArrowUp" && canIncrease.value) {
|
|
@@ -3131,10 +3116,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3131
3116
|
inputmode: props.step >= 1 ? "numeric" : "decimal",
|
|
3132
3117
|
placeholder: props.placeholder,
|
|
3133
3118
|
disabled: props.disabled,
|
|
3134
|
-
readonly: props.readonly,
|
|
3135
|
-
required: props.required,
|
|
3136
3119
|
error: props.error,
|
|
3137
|
-
name: props.name,
|
|
3138
3120
|
autocomplete: props.autocomplete,
|
|
3139
3121
|
unit: props.unit,
|
|
3140
3122
|
role: "spinbutton",
|
|
@@ -3148,7 +3130,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3148
3130
|
onBlur: handleBlur
|
|
3149
3131
|
}), {
|
|
3150
3132
|
trailing: withCtx(() => [
|
|
3151
|
-
createVNode(_sfc_main$
|
|
3133
|
+
createVNode(_sfc_main$B, {
|
|
3152
3134
|
type: "button",
|
|
3153
3135
|
size: "xsmall",
|
|
3154
3136
|
variant: "outlined",
|
|
@@ -3157,7 +3139,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3157
3139
|
disabled: !canDecrease.value,
|
|
3158
3140
|
onClick: _cache[0] || (_cache[0] = ($event) => adjustByStep(-1))
|
|
3159
3141
|
}, null, 8, ["aria-label", "disabled"]),
|
|
3160
|
-
createVNode(_sfc_main$
|
|
3142
|
+
createVNode(_sfc_main$B, {
|
|
3161
3143
|
type: "button",
|
|
3162
3144
|
size: "xsmall",
|
|
3163
3145
|
variant: "outlined",
|
|
@@ -3168,7 +3150,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3168
3150
|
}, null, 8, ["aria-label", "disabled"])
|
|
3169
3151
|
]),
|
|
3170
3152
|
_: 1
|
|
3171
|
-
}, 16, ["model-value", "inputmode", "placeholder", "disabled", "
|
|
3153
|
+
}, 16, ["model-value", "inputmode", "placeholder", "disabled", "error", "autocomplete", "unit", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext"])
|
|
3172
3154
|
]),
|
|
3173
3155
|
_: 1
|
|
3174
3156
|
}, 16);
|
|
@@ -3263,7 +3245,7 @@ const parseRegexToPatternInputValue = (regex, options) => {
|
|
|
3263
3245
|
return wildcard ?? body;
|
|
3264
3246
|
};
|
|
3265
3247
|
|
|
3266
|
-
const _sfc_main$
|
|
3248
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
3267
3249
|
__name: "KdsPatternInput",
|
|
3268
3250
|
props: /* @__PURE__ */ mergeModels({
|
|
3269
3251
|
description: {},
|
|
@@ -3276,9 +3258,6 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3276
3258
|
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3277
3259
|
placeholder: {},
|
|
3278
3260
|
disabled: { type: Boolean, default: false },
|
|
3279
|
-
readonly: { type: Boolean, default: false },
|
|
3280
|
-
required: { type: Boolean, default: false },
|
|
3281
|
-
name: {},
|
|
3282
3261
|
autocomplete: {}
|
|
3283
3262
|
}, {
|
|
3284
3263
|
"modelValue": { default: "" },
|
|
@@ -3338,16 +3317,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3338
3317
|
type: "text",
|
|
3339
3318
|
placeholder: props.placeholder,
|
|
3340
3319
|
disabled: props.disabled,
|
|
3341
|
-
readonly: props.readonly,
|
|
3342
|
-
required: props.required,
|
|
3343
3320
|
error: props.error,
|
|
3344
|
-
name: props.name,
|
|
3345
3321
|
autocomplete: props.autocomplete,
|
|
3346
3322
|
"leading-icon": "filter",
|
|
3347
3323
|
clearable: ""
|
|
3348
3324
|
}), {
|
|
3349
3325
|
trailing: withCtx(() => [
|
|
3350
|
-
createVNode(_sfc_main$
|
|
3326
|
+
createVNode(_sfc_main$z, {
|
|
3351
3327
|
modelValue: caseSensitive.value,
|
|
3352
3328
|
"onUpdate:modelValue": [
|
|
3353
3329
|
_cache[0] || (_cache[0] = ($event) => caseSensitive.value = $event),
|
|
@@ -3358,9 +3334,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3358
3334
|
"leading-icon": "case-sensitive",
|
|
3359
3335
|
title: caseSensitiveAriaLabel.value,
|
|
3360
3336
|
"aria-label": caseSensitiveAriaLabel.value,
|
|
3361
|
-
disabled: props.disabled
|
|
3337
|
+
disabled: props.disabled
|
|
3362
3338
|
}, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
|
|
3363
|
-
createVNode(_sfc_main$
|
|
3339
|
+
createVNode(_sfc_main$z, {
|
|
3364
3340
|
modelValue: excludeMatches.value,
|
|
3365
3341
|
"onUpdate:modelValue": [
|
|
3366
3342
|
_cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
|
|
@@ -3371,9 +3347,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3371
3347
|
"leading-icon": "arrows-order",
|
|
3372
3348
|
title: excludeMatchesAriaLabel.value,
|
|
3373
3349
|
"aria-label": excludeMatchesAriaLabel.value,
|
|
3374
|
-
disabled: props.disabled
|
|
3350
|
+
disabled: props.disabled
|
|
3375
3351
|
}, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
|
|
3376
|
-
createVNode(_sfc_main$
|
|
3352
|
+
createVNode(_sfc_main$z, {
|
|
3377
3353
|
modelValue: useRegex.value,
|
|
3378
3354
|
"onUpdate:modelValue": [
|
|
3379
3355
|
_cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
|
|
@@ -3384,11 +3360,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3384
3360
|
"leading-icon": "regex",
|
|
3385
3361
|
title: patternModeAriaLabel.value,
|
|
3386
3362
|
"aria-label": patternModeAriaLabel.value,
|
|
3387
|
-
disabled: props.disabled
|
|
3363
|
+
disabled: props.disabled
|
|
3388
3364
|
}, null, 8, ["modelValue", "title", "aria-label", "disabled"])
|
|
3389
3365
|
]),
|
|
3390
3366
|
_: 1
|
|
3391
|
-
}, 16, ["modelValue", "placeholder", "disabled", "
|
|
3367
|
+
}, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
3392
3368
|
]),
|
|
3393
3369
|
_: 1
|
|
3394
3370
|
}, 16);
|
|
@@ -3396,7 +3372,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3396
3372
|
}
|
|
3397
3373
|
});
|
|
3398
3374
|
|
|
3399
|
-
const _sfc_main$
|
|
3375
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
3400
3376
|
__name: "KdsSearchInput",
|
|
3401
3377
|
props: /* @__PURE__ */ mergeModels({
|
|
3402
3378
|
description: {},
|
|
@@ -3409,18 +3385,16 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3409
3385
|
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3410
3386
|
placeholder: { default: "Search" },
|
|
3411
3387
|
disabled: { type: Boolean, default: false },
|
|
3412
|
-
readonly: { type: Boolean, default: false },
|
|
3413
|
-
required: { type: Boolean, default: false },
|
|
3414
|
-
name: {},
|
|
3415
3388
|
autocomplete: {}
|
|
3416
3389
|
}, {
|
|
3417
3390
|
"modelValue": { default: "" },
|
|
3418
3391
|
"modelModifiers": {}
|
|
3419
3392
|
}),
|
|
3420
|
-
emits: ["update:modelValue"],
|
|
3421
|
-
setup(__props, { expose: __expose }) {
|
|
3393
|
+
emits: /* @__PURE__ */ mergeModels(["focus", "blur", "keydown"], ["update:modelValue"]),
|
|
3394
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3422
3395
|
const props = __props;
|
|
3423
3396
|
const modelValue = useModel(__props, "modelValue");
|
|
3397
|
+
const emit = __emit;
|
|
3424
3398
|
const baseInput = useTemplateRef("baseInput");
|
|
3425
3399
|
__expose({
|
|
3426
3400
|
focus: () => baseInput.value?.focus()
|
|
@@ -3437,14 +3411,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3437
3411
|
type: "search",
|
|
3438
3412
|
placeholder: props.placeholder,
|
|
3439
3413
|
disabled: props.disabled,
|
|
3440
|
-
readonly: props.readonly,
|
|
3441
|
-
required: props.required,
|
|
3442
3414
|
error: props.error,
|
|
3443
|
-
name: props.name,
|
|
3444
3415
|
autocomplete: props.autocomplete,
|
|
3445
3416
|
"leading-icon": "search",
|
|
3446
|
-
clearable: true
|
|
3447
|
-
|
|
3417
|
+
clearable: true,
|
|
3418
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => emit("focus", $event)),
|
|
3419
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur", $event)),
|
|
3420
|
+
onKeydown: _cache[3] || (_cache[3] = ($event) => emit("keydown", $event))
|
|
3421
|
+
}), null, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
3448
3422
|
]),
|
|
3449
3423
|
_: 1
|
|
3450
3424
|
}, 16);
|
|
@@ -3452,8 +3426,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3452
3426
|
}
|
|
3453
3427
|
});
|
|
3454
3428
|
|
|
3455
|
-
const _hoisted_1$
|
|
3456
|
-
const _sfc_main$
|
|
3429
|
+
const _hoisted_1$d = ["rows", "placeholder", "disabled", "autocomplete"];
|
|
3430
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
3457
3431
|
__name: "KdsTextarea",
|
|
3458
3432
|
props: /* @__PURE__ */ mergeModels({
|
|
3459
3433
|
description: {},
|
|
@@ -3466,9 +3440,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3466
3440
|
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3467
3441
|
placeholder: { default: "" },
|
|
3468
3442
|
disabled: { type: Boolean, default: false },
|
|
3469
|
-
readonly: { type: Boolean, default: false },
|
|
3470
|
-
required: { type: Boolean, default: false },
|
|
3471
|
-
name: {},
|
|
3472
3443
|
autocomplete: {},
|
|
3473
3444
|
rows: { default: 3 }
|
|
3474
3445
|
}, {
|
|
@@ -3512,11 +3483,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3512
3483
|
rows: normalizedRows.value,
|
|
3513
3484
|
placeholder: props.placeholder,
|
|
3514
3485
|
disabled: props.disabled,
|
|
3515
|
-
readonly: props.readonly,
|
|
3516
|
-
required: props.required,
|
|
3517
|
-
name: props.name,
|
|
3518
3486
|
autocomplete: props.autocomplete
|
|
3519
|
-
}), null, 16, _hoisted_1$
|
|
3487
|
+
}), null, 16, _hoisted_1$d), [
|
|
3520
3488
|
[vModelText, modelValue.value]
|
|
3521
3489
|
])
|
|
3522
3490
|
]),
|
|
@@ -3526,10 +3494,702 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3526
3494
|
}
|
|
3527
3495
|
});
|
|
3528
3496
|
|
|
3529
|
-
const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3497
|
+
const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-a2df5fed"]]);
|
|
3498
|
+
|
|
3499
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
3500
|
+
__name: "ListItemAccessory",
|
|
3501
|
+
props: {
|
|
3502
|
+
accessory: {},
|
|
3503
|
+
size: {},
|
|
3504
|
+
disabled: { type: Boolean, default: false }
|
|
3505
|
+
},
|
|
3506
|
+
setup(__props) {
|
|
3507
|
+
const props = __props;
|
|
3508
|
+
return (_ctx, _cache) => {
|
|
3509
|
+
return props.accessory.type === "avatar" ? (openBlock(), createBlock(KdsAvatar, {
|
|
3510
|
+
key: 0,
|
|
3511
|
+
title: props.accessory.title,
|
|
3512
|
+
src: props.accessory.src,
|
|
3513
|
+
initials: props.accessory.initials,
|
|
3514
|
+
size: props.size
|
|
3515
|
+
}, null, 8, ["title", "src", "initials", "size"])) : props.accessory.type === "colorSwatch" ? (openBlock(), createBlock(KdsColorSwatch, {
|
|
3516
|
+
key: 1,
|
|
3517
|
+
color: props.accessory.color,
|
|
3518
|
+
title: props.accessory.title,
|
|
3519
|
+
size: props.size
|
|
3520
|
+
}, null, 8, ["color", "title", "size"])) : props.accessory.type === "icon" ? (openBlock(), createBlock(KdsIcon, {
|
|
3521
|
+
key: 2,
|
|
3522
|
+
name: props.accessory.name,
|
|
3523
|
+
size: props.size,
|
|
3524
|
+
disabled: props.disabled
|
|
3525
|
+
}, null, 8, ["name", "size", "disabled"])) : props.accessory.type === "dataType" ? (openBlock(), createBlock(KdsDataType, {
|
|
3526
|
+
key: 3,
|
|
3527
|
+
"icon-name": props.accessory.name,
|
|
3528
|
+
size: props.size,
|
|
3529
|
+
disabled: props.disabled
|
|
3530
|
+
}, null, 8, ["icon-name", "size", "disabled"])) : props.accessory.type === "liveStatus" ? (openBlock(), createBlock(unref(KdsLiveStatus), {
|
|
3531
|
+
key: 4,
|
|
3532
|
+
status: props.accessory.status,
|
|
3533
|
+
title: props.accessory.title,
|
|
3534
|
+
size: props.size
|
|
3535
|
+
}, null, 8, ["status", "title", "size"])) : createCommentVNode("", true);
|
|
3536
|
+
};
|
|
3537
|
+
}
|
|
3538
|
+
});
|
|
3539
|
+
|
|
3540
|
+
const _hoisted_1$c = ["id", "aria-expanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-invalid", "aria-controls", "disabled"];
|
|
3541
|
+
const _hoisted_2$5 = {
|
|
3542
|
+
key: 0,
|
|
3543
|
+
class: "leading",
|
|
3544
|
+
"aria-hidden": "true"
|
|
3545
|
+
};
|
|
3546
|
+
const _hoisted_3$4 = ["id"];
|
|
3547
|
+
const _hoisted_4$3 = {
|
|
3548
|
+
class: "trailing",
|
|
3549
|
+
"aria-hidden": "true"
|
|
3550
|
+
};
|
|
3551
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
3552
|
+
__name: "BaseDropdown",
|
|
3553
|
+
props: /* @__PURE__ */ mergeModels({
|
|
3554
|
+
text: { default: void 0 },
|
|
3555
|
+
placeholder: {},
|
|
3556
|
+
disabled: { type: Boolean, default: false },
|
|
3557
|
+
error: { type: Boolean, default: false },
|
|
3558
|
+
missing: { type: Boolean, default: false },
|
|
3559
|
+
accessory: { default: void 0 },
|
|
3560
|
+
id: { default: void 0 },
|
|
3561
|
+
ariaLabelledby: { default: void 0 },
|
|
3562
|
+
ariaDescribedby: { default: void 0 },
|
|
3563
|
+
ariaLabel: { default: void 0 },
|
|
3564
|
+
ariaInvalid: { type: Boolean, default: void 0 },
|
|
3565
|
+
popoverId: { default: void 0 }
|
|
3566
|
+
}, {
|
|
3567
|
+
"open": { type: Boolean, ...{ default: false } },
|
|
3568
|
+
"openModifiers": {}
|
|
3569
|
+
}),
|
|
3570
|
+
emits: /* @__PURE__ */ mergeModels(["click", "keydown"], ["update:open"]),
|
|
3571
|
+
setup(__props, { emit: __emit }) {
|
|
3572
|
+
const props = __props;
|
|
3573
|
+
const open = useModel(__props, "open");
|
|
3574
|
+
const valueTextId = useId();
|
|
3575
|
+
const ariaLabelledby = computed(() => {
|
|
3576
|
+
if (props.ariaLabel) {
|
|
3577
|
+
return void 0;
|
|
3578
|
+
}
|
|
3579
|
+
if (!props.ariaLabelledby) {
|
|
3580
|
+
return valueTextId;
|
|
3581
|
+
}
|
|
3582
|
+
return `${props.ariaLabelledby} ${valueTextId}`;
|
|
3583
|
+
});
|
|
3584
|
+
const effectiveAriaLabel = computed(() => {
|
|
3585
|
+
if (!props.ariaLabel) {
|
|
3586
|
+
return void 0;
|
|
3587
|
+
}
|
|
3588
|
+
const displayText = props.text ?? props.placeholder;
|
|
3589
|
+
return `${props.ariaLabel}, ${displayText}`;
|
|
3590
|
+
});
|
|
3591
|
+
const emit = __emit;
|
|
3592
|
+
const onKeydown = (event) => {
|
|
3593
|
+
if (props.disabled) {
|
|
3594
|
+
return;
|
|
3595
|
+
}
|
|
3596
|
+
emit("keydown", event);
|
|
3597
|
+
switch (event.key) {
|
|
3598
|
+
case "ArrowDown":
|
|
3599
|
+
case "ArrowUp":
|
|
3600
|
+
event.preventDefault();
|
|
3601
|
+
if (!open.value) {
|
|
3602
|
+
open.value = true;
|
|
3603
|
+
}
|
|
3604
|
+
break;
|
|
3605
|
+
}
|
|
3606
|
+
};
|
|
3607
|
+
return (_ctx, _cache) => {
|
|
3608
|
+
return openBlock(), createElementBlock("button", {
|
|
3609
|
+
id: props.id,
|
|
3610
|
+
class: normalizeClass(["kds-dropdown-trigger-button", { error: props.error }]),
|
|
3611
|
+
type: "button",
|
|
3612
|
+
"aria-expanded": open.value,
|
|
3613
|
+
"aria-labelledby": ariaLabelledby.value,
|
|
3614
|
+
"aria-describedby": props.ariaDescribedby,
|
|
3615
|
+
"aria-label": effectiveAriaLabel.value,
|
|
3616
|
+
"aria-invalid": props.ariaInvalid,
|
|
3617
|
+
"aria-controls": props.popoverId,
|
|
3618
|
+
"aria-haspopup": "dialog",
|
|
3619
|
+
disabled: props.disabled,
|
|
3620
|
+
onClick: _cache[0] || (_cache[0] = ($event) => !props.disabled && emit("click")),
|
|
3621
|
+
onKeydown
|
|
3622
|
+
}, [
|
|
3623
|
+
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$5, [
|
|
3624
|
+
createVNode(_sfc_main$e, {
|
|
3625
|
+
accessory: props.accessory,
|
|
3626
|
+
size: "medium"
|
|
3627
|
+
}, null, 8, ["accessory"])
|
|
3628
|
+
])) : createCommentVNode("", true),
|
|
3629
|
+
createElementVNode("span", {
|
|
3630
|
+
id: unref(valueTextId),
|
|
3631
|
+
class: normalizeClass(["text", {
|
|
3632
|
+
placeholder: !props.text,
|
|
3633
|
+
missing: props.missing
|
|
3634
|
+
}])
|
|
3635
|
+
}, toDisplayString(props.text ?? props.placeholder), 11, _hoisted_3$4),
|
|
3636
|
+
createElementVNode("span", _hoisted_4$3, [
|
|
3637
|
+
createVNode(KdsIcon, {
|
|
3638
|
+
name: open.value ? "chevron-up" : "chevron-down",
|
|
3639
|
+
size: "small"
|
|
3640
|
+
}, null, 8, ["name"])
|
|
3641
|
+
])
|
|
3642
|
+
], 42, _hoisted_1$c);
|
|
3643
|
+
};
|
|
3644
|
+
}
|
|
3645
|
+
});
|
|
3646
|
+
|
|
3647
|
+
const BaseDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-f1917c48"]]);
|
|
3648
|
+
|
|
3649
|
+
const _hoisted_1$b = { class: "kds-empty-state" };
|
|
3650
|
+
const _hoisted_2$4 = { class: "kds-empty-state-headline" };
|
|
3651
|
+
const _hoisted_3$3 = {
|
|
3652
|
+
key: 0,
|
|
3653
|
+
class: "kds-empty-state-description"
|
|
3654
|
+
};
|
|
3655
|
+
const _hoisted_4$2 = {
|
|
3656
|
+
key: 1,
|
|
3657
|
+
class: "kds-empty-state-action"
|
|
3658
|
+
};
|
|
3659
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
3660
|
+
__name: "KdsEmptyState",
|
|
3661
|
+
props: {
|
|
3662
|
+
headline: {},
|
|
3663
|
+
description: {},
|
|
3664
|
+
button: {}
|
|
3665
|
+
},
|
|
3666
|
+
emits: ["buttonClick"],
|
|
3667
|
+
setup(__props, { emit: __emit }) {
|
|
3668
|
+
const props = __props;
|
|
3669
|
+
const emit = __emit;
|
|
3670
|
+
const isLinkButton = computed(
|
|
3671
|
+
() => props.button && "to" in props.button && props.button.to !== void 0
|
|
3672
|
+
);
|
|
3673
|
+
const buttonComponent = computed(
|
|
3674
|
+
() => isLinkButton.value ? _sfc_main$A : _sfc_main$B
|
|
3675
|
+
);
|
|
3676
|
+
return (_ctx, _cache) => {
|
|
3677
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
3678
|
+
createElementVNode("p", _hoisted_2$4, toDisplayString(props.headline), 1),
|
|
3679
|
+
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$3, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
3680
|
+
props.button ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
3681
|
+
(openBlock(), createBlock(resolveDynamicComponent(buttonComponent.value), mergeProps(props.button, {
|
|
3682
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick", $event))
|
|
3683
|
+
}), null, 16))
|
|
3684
|
+
])) : createCommentVNode("", true)
|
|
3685
|
+
]);
|
|
3686
|
+
};
|
|
3687
|
+
}
|
|
3688
|
+
});
|
|
3689
|
+
|
|
3690
|
+
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-b4af30cf"]]);
|
|
3691
|
+
|
|
3692
|
+
const kdsListItemAccessorySize = {
|
|
3693
|
+
SMALL: "small",
|
|
3694
|
+
LARGE: "large"
|
|
3695
|
+
};
|
|
3696
|
+
|
|
3697
|
+
const kdsListItemVariant = {
|
|
3698
|
+
SMALL: "small",
|
|
3699
|
+
LARGE: "large"
|
|
3700
|
+
};
|
|
3701
|
+
|
|
3702
|
+
const _hoisted_1$a = ["id", "aria-selected", "aria-disabled"];
|
|
3703
|
+
const _hoisted_2$3 = {
|
|
3704
|
+
key: 0,
|
|
3705
|
+
class: "accessory"
|
|
3706
|
+
};
|
|
3707
|
+
const _hoisted_3$2 = { class: "content" };
|
|
3708
|
+
const _hoisted_4$1 = ["title"];
|
|
3709
|
+
const _hoisted_5 = {
|
|
3710
|
+
key: 0,
|
|
3711
|
+
class: "prefix"
|
|
3712
|
+
};
|
|
3713
|
+
const _hoisted_6 = ["title"];
|
|
3714
|
+
const _hoisted_7 = {
|
|
3715
|
+
key: 1,
|
|
3716
|
+
class: "trailing-item"
|
|
3717
|
+
};
|
|
3718
|
+
const _hoisted_8 = {
|
|
3719
|
+
key: 0,
|
|
3720
|
+
class: "shortcut"
|
|
3721
|
+
};
|
|
3722
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
3723
|
+
__name: "KdsListItem",
|
|
3724
|
+
props: {
|
|
3725
|
+
id: {},
|
|
3726
|
+
label: {},
|
|
3727
|
+
accessory: { default: void 0 },
|
|
3728
|
+
subText: { default: void 0 },
|
|
3729
|
+
variant: { default: kdsListItemVariant.SMALL },
|
|
3730
|
+
shortcut: { default: void 0 },
|
|
3731
|
+
trailingIcon: { default: void 0 },
|
|
3732
|
+
special: { type: Boolean, default: false },
|
|
3733
|
+
selected: { type: Boolean, default: false },
|
|
3734
|
+
active: { type: Boolean, default: false },
|
|
3735
|
+
missing: { type: Boolean, default: false },
|
|
3736
|
+
disabled: { type: Boolean, default: false }
|
|
3737
|
+
},
|
|
3738
|
+
emits: ["click"],
|
|
3739
|
+
setup(__props, { emit: __emit }) {
|
|
3740
|
+
const props = __props;
|
|
3741
|
+
const emit = __emit;
|
|
3742
|
+
const accessorySize = computed(
|
|
3743
|
+
() => props.variant === kdsListItemVariant.LARGE ? kdsListItemAccessorySize.LARGE : kdsListItemAccessorySize.SMALL
|
|
3744
|
+
);
|
|
3745
|
+
const onClick = (event) => {
|
|
3746
|
+
if (props.disabled) {
|
|
3747
|
+
event.stopPropagation();
|
|
3748
|
+
event.preventDefault();
|
|
3749
|
+
return;
|
|
3750
|
+
}
|
|
3751
|
+
emit("click", event);
|
|
3752
|
+
};
|
|
3753
|
+
const labelEl = useTemplateRef("labelEl");
|
|
3754
|
+
const { isTruncated: isLabelTruncated } = useKdsIsTruncated(labelEl);
|
|
3755
|
+
const subtextEl = useTemplateRef("subtextEl");
|
|
3756
|
+
const { isTruncated: isSubtextTruncated } = useKdsIsTruncated(subtextEl);
|
|
3757
|
+
return (_ctx, _cache) => {
|
|
3758
|
+
return openBlock(), createElementBlock("div", {
|
|
3759
|
+
id: props.id,
|
|
3760
|
+
role: "option",
|
|
3761
|
+
"aria-selected": props.selected,
|
|
3762
|
+
"aria-disabled": props.disabled,
|
|
3763
|
+
class: normalizeClass([
|
|
3764
|
+
"kds-list-item",
|
|
3765
|
+
props.variant,
|
|
3766
|
+
{
|
|
3767
|
+
selected: props.selected,
|
|
3768
|
+
active: props.active,
|
|
3769
|
+
missing: props.missing,
|
|
3770
|
+
disabled: props.disabled
|
|
3771
|
+
}
|
|
3772
|
+
]),
|
|
3773
|
+
onClick
|
|
3774
|
+
}, [
|
|
3775
|
+
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$3, [
|
|
3776
|
+
createVNode(_sfc_main$e, {
|
|
3777
|
+
accessory: props.accessory,
|
|
3778
|
+
size: accessorySize.value,
|
|
3779
|
+
disabled: props.disabled
|
|
3780
|
+
}, null, 8, ["accessory", "size", "disabled"])
|
|
3781
|
+
])) : createCommentVNode("", true),
|
|
3782
|
+
createElementVNode("span", _hoisted_3$2, [
|
|
3783
|
+
createElementVNode("span", {
|
|
3784
|
+
ref_key: "labelEl",
|
|
3785
|
+
ref: labelEl,
|
|
3786
|
+
class: "label",
|
|
3787
|
+
title: unref(isLabelTruncated) ? props.label : void 0
|
|
3788
|
+
}, [
|
|
3789
|
+
props.missing ? (openBlock(), createElementBlock("span", _hoisted_5, "(Missing) ")) : createCommentVNode("", true),
|
|
3790
|
+
createElementVNode("span", {
|
|
3791
|
+
class: normalizeClass({ special: props.special })
|
|
3792
|
+
}, toDisplayString(props.label), 3)
|
|
3793
|
+
], 8, _hoisted_4$1),
|
|
3794
|
+
props.subText ? (openBlock(), createElementBlock("span", {
|
|
3795
|
+
key: 0,
|
|
3796
|
+
ref_key: "subtextEl",
|
|
3797
|
+
ref: subtextEl,
|
|
3798
|
+
class: "subtext",
|
|
3799
|
+
title: unref(isSubtextTruncated) ? props.subText : void 0
|
|
3800
|
+
}, toDisplayString(props.subText), 9, _hoisted_6)) : createCommentVNode("", true)
|
|
3801
|
+
]),
|
|
3802
|
+
props.shortcut || props.trailingIcon ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
3803
|
+
props.shortcut ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(props.shortcut), 1)) : createCommentVNode("", true),
|
|
3804
|
+
props.trailingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
3805
|
+
key: 1,
|
|
3806
|
+
name: props.trailingIcon,
|
|
3807
|
+
size: "small"
|
|
3808
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
3809
|
+
])) : createCommentVNode("", true)
|
|
3810
|
+
], 10, _hoisted_1$a);
|
|
3811
|
+
};
|
|
3812
|
+
}
|
|
3813
|
+
});
|
|
3814
|
+
|
|
3815
|
+
const KdsListItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-fca25fc2"]]);
|
|
3816
|
+
|
|
3817
|
+
const _hoisted_1$9 = ["aria-label", "aria-activedescendant", "tabindex"];
|
|
3818
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
3819
|
+
__name: "KdsListContainer",
|
|
3820
|
+
props: {
|
|
3821
|
+
possibleValues: {},
|
|
3822
|
+
emptyText: { default: "" },
|
|
3823
|
+
ariaLabel: {},
|
|
3824
|
+
controlledExternally: { type: Boolean }
|
|
3825
|
+
},
|
|
3826
|
+
emits: ["itemClick"],
|
|
3827
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3828
|
+
const props = __props;
|
|
3829
|
+
const emit = __emit;
|
|
3830
|
+
const idPrefix = useId();
|
|
3831
|
+
const toOptionId = (elementId) => elementId.slice(idPrefix.length + 1);
|
|
3832
|
+
const emptyOptionId = `${idPrefix}-empty`;
|
|
3833
|
+
const prefixedValues = computed(
|
|
3834
|
+
() => props.possibleValues.map((o) => ({ ...o, id: `${idPrefix}-${o.id}` }))
|
|
3835
|
+
);
|
|
3836
|
+
const activeId = ref(void 0);
|
|
3837
|
+
const lastActiveId = ref(void 0);
|
|
3838
|
+
const isFocused = ref(false);
|
|
3839
|
+
const containerEl = useTemplateRef("containerEl");
|
|
3840
|
+
function scrollToView() {
|
|
3841
|
+
if (!activeId.value || !containerEl.value) {
|
|
3842
|
+
return;
|
|
3843
|
+
}
|
|
3844
|
+
containerEl.value?.querySelector(`#${CSS.escape(activeId.value)}`)?.scrollIntoView({ block: "nearest" });
|
|
3845
|
+
}
|
|
3846
|
+
const onMouseLeave = () => {
|
|
3847
|
+
if (!isFocused.value) {
|
|
3848
|
+
activeId.value = void 0;
|
|
3849
|
+
}
|
|
3850
|
+
};
|
|
3851
|
+
const onMousemove = (event) => {
|
|
3852
|
+
const target = event.target?.closest?.('[role="option"]');
|
|
3853
|
+
if (target instanceof HTMLElement && target.id && target.getAttribute("aria-disabled") !== "true") {
|
|
3854
|
+
activeId.value = target.id;
|
|
3855
|
+
}
|
|
3856
|
+
};
|
|
3857
|
+
const enabledValues = computed(
|
|
3858
|
+
() => prefixedValues.value.filter((o) => !o.disabled)
|
|
3859
|
+
);
|
|
3860
|
+
watch(enabledValues, (values) => {
|
|
3861
|
+
const isValid = (id) => id !== void 0 && values.some((o) => o.id === id);
|
|
3862
|
+
if (activeId.value !== void 0 && !isValid(activeId.value)) {
|
|
3863
|
+
if (values.length > 0) {
|
|
3864
|
+
activeId.value = values[0].id;
|
|
3865
|
+
} else {
|
|
3866
|
+
activeId.value = prefixedValues.value.length === 0 ? emptyOptionId : void 0;
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
if (!isValid(lastActiveId.value)) {
|
|
3870
|
+
lastActiveId.value = void 0;
|
|
3871
|
+
}
|
|
3872
|
+
nextTick(scrollToView);
|
|
3873
|
+
});
|
|
3874
|
+
const findEnabledIndex = (id) => id === void 0 ? -1 : enabledValues.value.findIndex((o) => o.id === id);
|
|
3875
|
+
const handleFocus = () => {
|
|
3876
|
+
isFocused.value = true;
|
|
3877
|
+
if (activeId.value === void 0) {
|
|
3878
|
+
activeId.value = lastActiveId.value ?? enabledValues.value[0]?.id;
|
|
3879
|
+
}
|
|
3880
|
+
};
|
|
3881
|
+
const handleBlur = () => {
|
|
3882
|
+
isFocused.value = false;
|
|
3883
|
+
lastActiveId.value = activeId.value;
|
|
3884
|
+
activeId.value = void 0;
|
|
3885
|
+
};
|
|
3886
|
+
const handleKeydown = (event) => {
|
|
3887
|
+
if (enabledValues.value.length === 0) {
|
|
3888
|
+
return;
|
|
3889
|
+
}
|
|
3890
|
+
const currentIndex = findEnabledIndex(activeId.value);
|
|
3891
|
+
switch (event.key) {
|
|
3892
|
+
case "ArrowDown": {
|
|
3893
|
+
const nextIndex = currentIndex < 0 || currentIndex >= enabledValues.value.length - 1 ? 0 : currentIndex + 1;
|
|
3894
|
+
activeId.value = enabledValues.value[nextIndex].id;
|
|
3895
|
+
scrollToView();
|
|
3896
|
+
event.preventDefault();
|
|
3897
|
+
break;
|
|
3898
|
+
}
|
|
3899
|
+
case "ArrowUp": {
|
|
3900
|
+
const nextIndex = currentIndex <= 0 ? enabledValues.value.length - 1 : currentIndex - 1;
|
|
3901
|
+
activeId.value = enabledValues.value[nextIndex].id;
|
|
3902
|
+
scrollToView();
|
|
3903
|
+
event.preventDefault();
|
|
3904
|
+
break;
|
|
3905
|
+
}
|
|
3906
|
+
case "Enter":
|
|
3907
|
+
if (activeId.value) {
|
|
3908
|
+
emit("itemClick", toOptionId(activeId.value));
|
|
3909
|
+
event.preventDefault();
|
|
3910
|
+
}
|
|
3911
|
+
break;
|
|
3912
|
+
case " ":
|
|
3913
|
+
if (event.target instanceof HTMLElement && ["INPUT", "TEXTAREA", "SELECT"].includes(event.target.tagName)) {
|
|
3914
|
+
break;
|
|
3915
|
+
}
|
|
3916
|
+
if (activeId.value) {
|
|
3917
|
+
emit("itemClick", toOptionId(activeId.value));
|
|
3918
|
+
event.preventDefault();
|
|
3919
|
+
}
|
|
3920
|
+
break;
|
|
3921
|
+
case "Home":
|
|
3922
|
+
activeId.value = enabledValues.value[0].id;
|
|
3923
|
+
scrollToView();
|
|
3924
|
+
event.preventDefault();
|
|
3925
|
+
break;
|
|
3926
|
+
case "End":
|
|
3927
|
+
activeId.value = enabledValues.value[enabledValues.value.length - 1].id;
|
|
3928
|
+
scrollToView();
|
|
3929
|
+
event.preventDefault();
|
|
3930
|
+
break;
|
|
3931
|
+
}
|
|
3932
|
+
};
|
|
3933
|
+
__expose({
|
|
3934
|
+
/** Forward a keydown event to the list for keyboard navigation */
|
|
3935
|
+
handleKeydown,
|
|
3936
|
+
/** Notify the list that its controlling element received focus */
|
|
3937
|
+
handleFocus,
|
|
3938
|
+
/** Notify the list that its controlling element lost focus */
|
|
3939
|
+
handleBlur,
|
|
3940
|
+
activeDescendant: activeId
|
|
3941
|
+
});
|
|
3942
|
+
return (_ctx, _cache) => {
|
|
3943
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
3944
|
+
ref_key: "containerEl",
|
|
3945
|
+
ref: containerEl,
|
|
3946
|
+
role: "listbox",
|
|
3947
|
+
"aria-label": props.ariaLabel,
|
|
3948
|
+
"aria-activedescendant": !props.controlledExternally && activeId.value ? activeId.value : void 0,
|
|
3949
|
+
class: "kds-list-container",
|
|
3950
|
+
tabindex: props.controlledExternally ? void 0 : 0
|
|
3951
|
+
}, toHandlers(
|
|
3952
|
+
props.controlledExternally ? { mousemove: onMousemove, mouseleave: onMouseLeave } : {
|
|
3953
|
+
keydown: handleKeydown,
|
|
3954
|
+
focus: handleFocus,
|
|
3955
|
+
blur: handleBlur,
|
|
3956
|
+
mousemove: onMousemove,
|
|
3957
|
+
mouseleave: onMouseLeave
|
|
3958
|
+
},
|
|
3959
|
+
true
|
|
3960
|
+
)), [
|
|
3961
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(prefixedValues.value, (item) => {
|
|
3962
|
+
return openBlock(), createBlock(unref(KdsListItem), {
|
|
3963
|
+
id: item.id,
|
|
3964
|
+
key: item.id,
|
|
3965
|
+
accessory: item.accessory,
|
|
3966
|
+
label: item.text,
|
|
3967
|
+
"sub-text": item.subText,
|
|
3968
|
+
selected: item.selected,
|
|
3969
|
+
disabled: item.disabled,
|
|
3970
|
+
active: activeId.value === item.id,
|
|
3971
|
+
special: item.special,
|
|
3972
|
+
missing: item.missing,
|
|
3973
|
+
"trailing-icon": item.selected ? "checkmark" : void 0,
|
|
3974
|
+
onMousedown: _cache[0] || (_cache[0] = ($event) => props.controlledExternally && $event.preventDefault()),
|
|
3975
|
+
onClick: withModifiers(($event) => emit("itemClick", toOptionId(item.id)), ["stop"])
|
|
3976
|
+
}, null, 8, ["id", "accessory", "label", "sub-text", "selected", "disabled", "active", "special", "missing", "trailing-icon", "onClick"]);
|
|
3977
|
+
}), 128)),
|
|
3978
|
+
prefixedValues.value.length === 0 ? (openBlock(), createElementBlock("div", {
|
|
3979
|
+
key: 0,
|
|
3980
|
+
id: emptyOptionId,
|
|
3981
|
+
role: "option",
|
|
3982
|
+
"aria-disabled": "true",
|
|
3983
|
+
"aria-selected": void 0,
|
|
3984
|
+
class: "kds-list-container-empty"
|
|
3985
|
+
}, [
|
|
3986
|
+
createVNode(KdsEmptyState, {
|
|
3987
|
+
headline: props.emptyText
|
|
3988
|
+
}, null, 8, ["headline"])
|
|
3989
|
+
])) : createCommentVNode("", true)
|
|
3990
|
+
], 16, _hoisted_1$9);
|
|
3991
|
+
};
|
|
3992
|
+
}
|
|
3993
|
+
});
|
|
3994
|
+
|
|
3995
|
+
const KdsListContainer = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-bfdaa003"]]);
|
|
3996
|
+
|
|
3997
|
+
const _hoisted_1$8 = { class: "kds-dropdown-container" };
|
|
3998
|
+
const _hoisted_2$2 = { class: "kds-dropdown-container-sticky-top" };
|
|
3999
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
4000
|
+
__name: "DropdownContainer",
|
|
4001
|
+
props: /* @__PURE__ */ mergeModels({
|
|
4002
|
+
emptyText: {},
|
|
4003
|
+
possibleValues: {}
|
|
4004
|
+
}, {
|
|
4005
|
+
"modelValue": { default: null },
|
|
4006
|
+
"modelModifiers": {}
|
|
4007
|
+
}),
|
|
4008
|
+
emits: ["update:modelValue"],
|
|
4009
|
+
setup(__props, { expose: __expose }) {
|
|
4010
|
+
const props = __props;
|
|
4011
|
+
const modelValue = useModel(__props, "modelValue");
|
|
4012
|
+
const searchValue = ref("");
|
|
4013
|
+
const searchEl = useTemplateRef("searchEl");
|
|
4014
|
+
const listContainerRef = useTemplateRef("listContainer");
|
|
4015
|
+
const optionsWithSyntheticMissing = computed(
|
|
4016
|
+
() => {
|
|
4017
|
+
if (modelValue.value === null) {
|
|
4018
|
+
return props.possibleValues;
|
|
4019
|
+
}
|
|
4020
|
+
const hasSelected = props.possibleValues.some(
|
|
4021
|
+
(o) => o.id === modelValue.value
|
|
4022
|
+
);
|
|
4023
|
+
if (hasSelected) {
|
|
4024
|
+
return props.possibleValues;
|
|
4025
|
+
}
|
|
4026
|
+
return [
|
|
4027
|
+
{
|
|
4028
|
+
id: modelValue.value,
|
|
4029
|
+
text: modelValue.value,
|
|
4030
|
+
missing: true
|
|
4031
|
+
},
|
|
4032
|
+
...props.possibleValues
|
|
4033
|
+
];
|
|
4034
|
+
}
|
|
4035
|
+
);
|
|
4036
|
+
const filteredOptions = computed(() => {
|
|
4037
|
+
const normalizedQuery = searchValue.value.trim().toLowerCase();
|
|
4038
|
+
const base = optionsWithSyntheticMissing.value;
|
|
4039
|
+
if (normalizedQuery.length === 0) {
|
|
4040
|
+
return base;
|
|
4041
|
+
}
|
|
4042
|
+
return base.filter(
|
|
4043
|
+
(option) => option.text.toLowerCase().includes(normalizedQuery)
|
|
4044
|
+
);
|
|
4045
|
+
});
|
|
4046
|
+
const listOptions = computed(
|
|
4047
|
+
() => filteredOptions.value.map((option) => ({
|
|
4048
|
+
id: option.id,
|
|
4049
|
+
text: option.text,
|
|
4050
|
+
subText: option.subText,
|
|
4051
|
+
accessory: option.accessory,
|
|
4052
|
+
disabled: option.disabled || option.missing,
|
|
4053
|
+
selected: option.id === modelValue.value,
|
|
4054
|
+
special: option.special,
|
|
4055
|
+
missing: option.missing
|
|
4056
|
+
}))
|
|
4057
|
+
);
|
|
4058
|
+
const hasMultiline = computed(
|
|
4059
|
+
() => props.possibleValues.some((o) => o.subText !== void 0)
|
|
4060
|
+
);
|
|
4061
|
+
__expose({
|
|
4062
|
+
focus: () => searchEl.value?.focus()
|
|
4063
|
+
});
|
|
4064
|
+
return (_ctx, _cache) => {
|
|
4065
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
4066
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
4067
|
+
createVNode(BaseInput, {
|
|
4068
|
+
ref_key: "searchEl",
|
|
4069
|
+
ref: searchEl,
|
|
4070
|
+
modelValue: searchValue.value,
|
|
4071
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event),
|
|
4072
|
+
type: "search",
|
|
4073
|
+
placeholder: "Search",
|
|
4074
|
+
"aria-label": "Filter options",
|
|
4075
|
+
"aria-activedescendant": listContainerRef.value?.activeDescendant,
|
|
4076
|
+
"leading-icon": "search",
|
|
4077
|
+
clearable: true,
|
|
4078
|
+
onKeydown: _cache[1] || (_cache[1] = ($event) => listContainerRef.value?.handleKeydown($event)),
|
|
4079
|
+
onFocus: _cache[2] || (_cache[2] = ($event) => listContainerRef.value?.handleFocus()),
|
|
4080
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => listContainerRef.value?.handleBlur())
|
|
4081
|
+
}, null, 8, ["modelValue", "aria-activedescendant"])
|
|
4082
|
+
]),
|
|
4083
|
+
createVNode(unref(KdsListContainer), {
|
|
4084
|
+
ref: "listContainer",
|
|
4085
|
+
class: normalizeClass(["kds-dropdown-container-list", { multiline: hasMultiline.value }]),
|
|
4086
|
+
"possible-values": listOptions.value,
|
|
4087
|
+
"empty-text": props.emptyText,
|
|
4088
|
+
"controlled-externally": "",
|
|
4089
|
+
"aria-label": "Dropdown options",
|
|
4090
|
+
onItemClick: _cache[4] || (_cache[4] = ($event) => modelValue.value = $event)
|
|
4091
|
+
}, null, 8, ["class", "possible-values", "empty-text"])
|
|
4092
|
+
]);
|
|
4093
|
+
};
|
|
4094
|
+
}
|
|
4095
|
+
});
|
|
4096
|
+
|
|
4097
|
+
const DropdownContainer = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-dd55ee4d"]]);
|
|
3530
4098
|
|
|
3531
|
-
const _hoisted_1$8 = { class: "kds-info-popover-content" };
|
|
3532
4099
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
4100
|
+
__name: "KdsDropdown",
|
|
4101
|
+
props: /* @__PURE__ */ mergeModels({
|
|
4102
|
+
placeholder: { default: "Select" },
|
|
4103
|
+
disabled: { type: Boolean, default: false },
|
|
4104
|
+
possibleValues: {},
|
|
4105
|
+
description: {},
|
|
4106
|
+
label: {},
|
|
4107
|
+
ariaLabel: {},
|
|
4108
|
+
id: {},
|
|
4109
|
+
subText: {},
|
|
4110
|
+
error: { type: Boolean, default: false },
|
|
4111
|
+
validating: { type: Boolean, default: false },
|
|
4112
|
+
preserveSubTextSpace: { type: Boolean, default: false }
|
|
4113
|
+
}, {
|
|
4114
|
+
"modelValue": { default: null },
|
|
4115
|
+
"modelModifiers": {}
|
|
4116
|
+
}),
|
|
4117
|
+
emits: ["update:modelValue"],
|
|
4118
|
+
setup(__props) {
|
|
4119
|
+
const props = __props;
|
|
4120
|
+
const modelValue = useModel(__props, "modelValue");
|
|
4121
|
+
const open = ref(false);
|
|
4122
|
+
const popoverEl = useTemplateRef("popoverEl");
|
|
4123
|
+
const dropdownContainerEl = useTemplateRef("dropdownContainerEl");
|
|
4124
|
+
const selectedOption = computed(
|
|
4125
|
+
() => props.possibleValues.find((o) => o.id === modelValue.value)
|
|
4126
|
+
);
|
|
4127
|
+
watchEffect(() => {
|
|
4128
|
+
if (open.value) {
|
|
4129
|
+
nextTick(() => dropdownContainerEl.value?.focus());
|
|
4130
|
+
}
|
|
4131
|
+
});
|
|
4132
|
+
watch(modelValue, () => {
|
|
4133
|
+
if (open.value) {
|
|
4134
|
+
open.value = false;
|
|
4135
|
+
}
|
|
4136
|
+
});
|
|
4137
|
+
return (_ctx, _cache) => {
|
|
4138
|
+
return openBlock(), createBlock(BaseFormFieldWrapper, {
|
|
4139
|
+
id: props.id,
|
|
4140
|
+
label: props.label,
|
|
4141
|
+
"aria-label": props.ariaLabel,
|
|
4142
|
+
description: props.description,
|
|
4143
|
+
"sub-text": props.subText,
|
|
4144
|
+
error: props.error,
|
|
4145
|
+
validating: props.validating,
|
|
4146
|
+
"preserve-sub-text-space": props.preserveSubTextSpace
|
|
4147
|
+
}, {
|
|
4148
|
+
default: withCtx((slotProps) => [
|
|
4149
|
+
createVNode(BaseDropdown, mergeProps(slotProps, {
|
|
4150
|
+
open: open.value,
|
|
4151
|
+
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
4152
|
+
text: modelValue.value !== null && !selectedOption.value ? `(Missing) ${modelValue.value}` : selectedOption.value?.text,
|
|
4153
|
+
placeholder: props.placeholder,
|
|
4154
|
+
disabled: props.disabled,
|
|
4155
|
+
error: props.error,
|
|
4156
|
+
missing: modelValue.value !== null && !selectedOption.value,
|
|
4157
|
+
accessory: selectedOption.value?.accessory,
|
|
4158
|
+
style: popoverEl.value?.anchorStyle,
|
|
4159
|
+
"popover-id": popoverEl.value?.popoverId,
|
|
4160
|
+
onClick: _cache[1] || (_cache[1] = ($event) => open.value = !open.value)
|
|
4161
|
+
}), null, 16, ["open", "text", "placeholder", "disabled", "error", "missing", "accessory", "style", "popover-id"]),
|
|
4162
|
+
createVNode(KdsPopover, {
|
|
4163
|
+
ref_key: "popoverEl",
|
|
4164
|
+
ref: popoverEl,
|
|
4165
|
+
modelValue: open.value,
|
|
4166
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => open.value = $event),
|
|
4167
|
+
placement: "bottom-left",
|
|
4168
|
+
role: "dialog",
|
|
4169
|
+
"full-width": "",
|
|
4170
|
+
"popover-aria-label": "Searchable dropdown options"
|
|
4171
|
+
}, {
|
|
4172
|
+
default: withCtx(() => [
|
|
4173
|
+
createVNode(DropdownContainer, {
|
|
4174
|
+
ref_key: "dropdownContainerEl",
|
|
4175
|
+
ref: dropdownContainerEl,
|
|
4176
|
+
modelValue: modelValue.value,
|
|
4177
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => modelValue.value = $event),
|
|
4178
|
+
"possible-values": props.possibleValues,
|
|
4179
|
+
"empty-text": "No entries found"
|
|
4180
|
+
}, null, 8, ["modelValue", "possible-values"])
|
|
4181
|
+
]),
|
|
4182
|
+
_: 1
|
|
4183
|
+
}, 8, ["modelValue"])
|
|
4184
|
+
]),
|
|
4185
|
+
_: 1
|
|
4186
|
+
}, 8, ["id", "label", "aria-label", "description", "sub-text", "error", "validating", "preserve-sub-text-space"]);
|
|
4187
|
+
};
|
|
4188
|
+
}
|
|
4189
|
+
});
|
|
4190
|
+
|
|
4191
|
+
const _hoisted_1$7 = { class: "kds-info-popover-content" };
|
|
4192
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3533
4193
|
__name: "InfoPopover",
|
|
3534
4194
|
props: {
|
|
3535
4195
|
content: {}
|
|
@@ -3537,7 +4197,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3537
4197
|
setup(__props) {
|
|
3538
4198
|
const props = __props;
|
|
3539
4199
|
return (_ctx, _cache) => {
|
|
3540
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4200
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
3541
4201
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
3542
4202
|
createTextVNode(toDisplayString(props.content), 1)
|
|
3543
4203
|
], true)
|
|
@@ -3546,11 +4206,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3546
4206
|
}
|
|
3547
4207
|
});
|
|
3548
4208
|
|
|
3549
|
-
const InfoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4209
|
+
const InfoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-951f2a2b"]]);
|
|
3550
4210
|
|
|
3551
|
-
const _hoisted_1$
|
|
4211
|
+
const _hoisted_1$6 = ["aria-pressed", "aria-expanded", "aria-controls"];
|
|
3552
4212
|
const TITLE = "Click for more information";
|
|
3553
|
-
const _sfc_main$
|
|
4213
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3554
4214
|
__name: "KdsInfoToggleButton",
|
|
3555
4215
|
props: /* @__PURE__ */ mergeModels({
|
|
3556
4216
|
content: {},
|
|
@@ -3592,7 +4252,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3592
4252
|
name: "circle-question",
|
|
3593
4253
|
size: "small"
|
|
3594
4254
|
})
|
|
3595
|
-
], 16, _hoisted_1$
|
|
4255
|
+
], 16, _hoisted_1$6),
|
|
3596
4256
|
createVNode(KdsPopover, {
|
|
3597
4257
|
ref_key: "popoverEl",
|
|
3598
4258
|
ref: popoverEl,
|
|
@@ -3618,15 +4278,15 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3618
4278
|
}
|
|
3619
4279
|
});
|
|
3620
4280
|
|
|
3621
|
-
const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4281
|
+
const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f98c9924"]]);
|
|
3622
4282
|
|
|
3623
4283
|
const KdsInfoToggleButton$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
3624
4284
|
__proto__: null,
|
|
3625
4285
|
default: KdsInfoToggleButton
|
|
3626
4286
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
3627
4287
|
|
|
3628
|
-
const _hoisted_1$
|
|
3629
|
-
const _sfc_main$
|
|
4288
|
+
const _hoisted_1$5 = { class: "kds-variable-popover" };
|
|
4289
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3630
4290
|
__name: "VariablePopover",
|
|
3631
4291
|
props: {
|
|
3632
4292
|
content: {}
|
|
@@ -3634,7 +4294,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3634
4294
|
setup(__props) {
|
|
3635
4295
|
const props = __props;
|
|
3636
4296
|
return (_ctx, _cache) => {
|
|
3637
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4297
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
3638
4298
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
3639
4299
|
createTextVNode(toDisplayString(props.content), 1)
|
|
3640
4300
|
], true)
|
|
@@ -3643,10 +4303,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3643
4303
|
}
|
|
3644
4304
|
});
|
|
3645
4305
|
|
|
3646
|
-
const VariablePopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4306
|
+
const VariablePopover = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-54c206b9"]]);
|
|
3647
4307
|
|
|
3648
|
-
const _hoisted_1$
|
|
3649
|
-
const _sfc_main$
|
|
4308
|
+
const _hoisted_1$4 = ["title", "aria-label", "aria-pressed", "aria-expanded", "aria-controls"];
|
|
4309
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3650
4310
|
__name: "KdsVariableToggleButton",
|
|
3651
4311
|
props: /* @__PURE__ */ mergeModels({
|
|
3652
4312
|
content: {},
|
|
@@ -3735,7 +4395,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3735
4395
|
name: iconName.value,
|
|
3736
4396
|
size: "small"
|
|
3737
4397
|
}, null, 8, ["name"])
|
|
3738
|
-
], 16, _hoisted_1$
|
|
4398
|
+
], 16, _hoisted_1$4),
|
|
3739
4399
|
createVNode(KdsPopover, {
|
|
3740
4400
|
ref_key: "popoverEl",
|
|
3741
4401
|
ref: popoverEl,
|
|
@@ -3761,50 +4421,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3761
4421
|
}
|
|
3762
4422
|
});
|
|
3763
4423
|
|
|
3764
|
-
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3765
|
-
|
|
3766
|
-
const _hoisted_1$4 = { class: "kds-empty-state" };
|
|
3767
|
-
const _hoisted_2$2 = { class: "kds-empty-state-headline" };
|
|
3768
|
-
const _hoisted_3$2 = {
|
|
3769
|
-
key: 0,
|
|
3770
|
-
class: "kds-empty-state-description"
|
|
3771
|
-
};
|
|
3772
|
-
const _hoisted_4$1 = {
|
|
3773
|
-
key: 1,
|
|
3774
|
-
class: "kds-empty-state-action"
|
|
3775
|
-
};
|
|
3776
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3777
|
-
__name: "KdsEmptyState",
|
|
3778
|
-
props: {
|
|
3779
|
-
headline: {},
|
|
3780
|
-
description: {},
|
|
3781
|
-
button: {}
|
|
3782
|
-
},
|
|
3783
|
-
emits: ["buttonClick"],
|
|
3784
|
-
setup(__props, { emit: __emit }) {
|
|
3785
|
-
const props = __props;
|
|
3786
|
-
const emit = __emit;
|
|
3787
|
-
const isLinkButton = computed(
|
|
3788
|
-
() => props.button && "to" in props.button && props.button.to !== void 0
|
|
3789
|
-
);
|
|
3790
|
-
const buttonComponent = computed(
|
|
3791
|
-
() => isLinkButton.value ? _sfc_main$u : _sfc_main$v
|
|
3792
|
-
);
|
|
3793
|
-
return (_ctx, _cache) => {
|
|
3794
|
-
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
3795
|
-
createElementVNode("p", _hoisted_2$2, toDisplayString(props.headline), 1),
|
|
3796
|
-
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$2, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
3797
|
-
props.button ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
3798
|
-
(openBlock(), createBlock(resolveDynamicComponent(buttonComponent.value), mergeProps(props.button, {
|
|
3799
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick", $event))
|
|
3800
|
-
}), null, 16))
|
|
3801
|
-
])) : createCommentVNode("", true)
|
|
3802
|
-
]);
|
|
3803
|
-
};
|
|
3804
|
-
}
|
|
3805
|
-
});
|
|
3806
|
-
|
|
3807
|
-
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b4af30cf"]]);
|
|
4424
|
+
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-1541cbb3"]]);
|
|
3808
4425
|
|
|
3809
4426
|
const _hoisted_1$3 = ["aria-label", "aria-labelledby", "aria-pressed", "disabled"];
|
|
3810
4427
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
@@ -3941,7 +4558,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3941
4558
|
size: "medium"
|
|
3942
4559
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
3943
4560
|
createElementVNode("div", _hoisted_2$1, toDisplayString(props.title), 1),
|
|
3944
|
-
createVNode(_sfc_main$
|
|
4561
|
+
createVNode(_sfc_main$B, {
|
|
3945
4562
|
"leading-icon": "x-close",
|
|
3946
4563
|
variant: "transparent",
|
|
3947
4564
|
size: "medium",
|
|
@@ -4214,7 +4831,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4214
4831
|
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
4215
4832
|
createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
|
|
4216
4833
|
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
4217
|
-
createVNode(_sfc_main$
|
|
4834
|
+
createVNode(_sfc_main$u, {
|
|
4218
4835
|
modelValue: askAgain.value,
|
|
4219
4836
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
4220
4837
|
label: unref(config).value.doNotAskAgain.label,
|
|
@@ -4229,7 +4846,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4229
4846
|
name: "footer",
|
|
4230
4847
|
fn: withCtx(() => [
|
|
4231
4848
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
|
|
4232
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4849
|
+
return openBlock(), createBlock(_sfc_main$B, {
|
|
4233
4850
|
key: index,
|
|
4234
4851
|
destructive: button.destructive,
|
|
4235
4852
|
autofocus: button.autofocus,
|
|
@@ -4261,5 +4878,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4261
4878
|
|
|
4262
4879
|
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67e036b5"]]);
|
|
4263
4880
|
|
|
4264
|
-
export { KdsAvatar, KdsBadge, _sfc_main$
|
|
4881
|
+
export { KdsAvatar, KdsBadge, _sfc_main$B as KdsButton, KdsCardClickable, _sfc_main$u as KdsCheckbox, KdsCheckboxGroup, _sfc_main$j as KdsColorInput, KdsColorSwatch, KdsDataType, _sfc_main$8 as KdsDropdown, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLabel, _sfc_main$A as KdsLinkButton, KdsLiveStatus, KdsLoadingSpinner, KdsModal, KdsModalLayout, _sfc_main$i as KdsNumberInput, _sfc_main$h as KdsPatternInput, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, _sfc_main$g as KdsSearchInput, KdsSubText, _sfc_main$l as KdsTextInput, KdsTextarea, _sfc_main$z as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, kdsAvatarSize, kdsAvatarSizes, kdsBadgeSize, kdsBadgeSizes, kdsBadgeVariant, kdsBadgeVariants, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCardVariant, kdsCardVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchSize, kdsColorSwatchSizes, kdsColorSwatchType, kdsColorSwatchTypes, kdsDarkModeType, kdsDarkModeTypes, kdsDataTypeSize, kdsDataTypeSizes, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
|
|
4265
4882
|
//# sourceMappingURL=index.js.map
|