@knime/kds-components 0.17.2 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buttons/KdsMenuButton/KdsMenuButton.vue.d.ts.map +1 -1
- package/dist/forms/_helper/List/ListContainer/KdsListContainer.vue.d.ts +3 -2
- package/dist/forms/_helper/List/ListContainer/KdsListContainer.vue.d.ts.map +1 -1
- package/dist/forms/_helper/List/ListContainer/types.d.ts +2 -0
- package/dist/forms/_helper/List/ListContainer/types.d.ts.map +1 -1
- package/dist/forms/inputs/BaseInput.vue.d.ts +17 -0
- package/dist/forms/inputs/BaseInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/DateInput/KdsDateInput.vue.d.ts +16 -1
- package/dist/forms/inputs/DateInput/KdsDateInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/NumberInput/KdsNumberInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/PasswordInput/KdsPasswordInput.vue.d.ts +247 -0
- package/dist/forms/inputs/PasswordInput/KdsPasswordInput.vue.d.ts.map +1 -0
- package/dist/forms/inputs/PasswordInput/enums.d.ts +13 -0
- package/dist/forms/inputs/PasswordInput/enums.d.ts.map +1 -0
- package/dist/forms/inputs/PasswordInput/index.d.ts +4 -0
- package/dist/forms/inputs/PasswordInput/index.d.ts.map +1 -0
- package/dist/forms/inputs/PasswordInput/types.d.ts +25 -0
- package/dist/forms/inputs/PasswordInput/types.d.ts.map +1 -0
- package/dist/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts.map +1 -1
- package/dist/forms/inputs/UsernameInput/KdsUsernameInput.vue.d.ts +245 -0
- package/dist/forms/inputs/UsernameInput/KdsUsernameInput.vue.d.ts.map +1 -0
- package/dist/forms/inputs/UsernameInput/enums.d.ts +6 -0
- package/dist/forms/inputs/UsernameInput/enums.d.ts.map +1 -0
- package/dist/forms/inputs/UsernameInput/index.d.ts +4 -0
- package/dist/forms/inputs/UsernameInput/index.d.ts.map +1 -0
- package/dist/forms/inputs/UsernameInput/types.d.ts +7 -0
- package/dist/forms/inputs/UsernameInput/types.d.ts.map +1 -0
- package/dist/forms/inputs/index.d.ts +4 -0
- package/dist/forms/inputs/index.d.ts.map +1 -1
- package/dist/forms/selects/Dropdown/DropdownContainer.vue.d.ts +21 -4
- package/dist/forms/selects/Dropdown/DropdownContainer.vue.d.ts.map +1 -1
- package/dist/forms/selects/Dropdown/MultiSelectDropdownContainer.vue.d.ts +21 -4
- package/dist/forms/selects/Dropdown/MultiSelectDropdownContainer.vue.d.ts.map +1 -1
- package/dist/index.css +43 -43
- package/dist/index.js +348 -126
- package/dist/index.js.map +1 -1
- 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, createVNode, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels, useId, nextTick, Fragment, renderList, watchEffect, useAttrs, defineAsyncComponent, onBeforeUpdate, withModifiers, normalizeProps, guardReactiveProps, reactive, onMounted, onUnmounted, toRefs, inject, withKeys, withDirectives, provide, createTextVNode, isRef, resolveComponent, Transition, resolveDirective, toHandlers, vModelText, useCssVars, mergeDefaults, createSlots } from 'vue';
|
|
1
|
+
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, createVNode, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels, useId, nextTick, Fragment, renderList, watchEffect, useAttrs, defineAsyncComponent, onBeforeUpdate, withModifiers, normalizeProps, guardReactiveProps, reactive, onMounted, onUnmounted, toRefs, inject, withKeys, withDirectives, provide, createTextVNode, isRef, resolveComponent, Transition, resolveDirective, toHandlers, onBeforeUnmount, vModelText, 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 = {
|
|
@@ -16,7 +16,7 @@ const _hoisted_3$f = {
|
|
|
16
16
|
class: "kds-avatar-initials",
|
|
17
17
|
"aria-hidden": "true"
|
|
18
18
|
};
|
|
19
|
-
const _sfc_main$
|
|
19
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
20
20
|
__name: "KdsAvatar",
|
|
21
21
|
props: {
|
|
22
22
|
initials: {},
|
|
@@ -75,7 +75,7 @@ const _export_sfc$1 = (sfc, props) => {
|
|
|
75
75
|
return target;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
const KdsAvatar = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
78
|
+
const KdsAvatar = /* @__PURE__ */ _export_sfc$1(_sfc_main$W, [["__scopeId", "data-v-d6a313f1"]]);
|
|
79
79
|
|
|
80
80
|
const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
81
81
|
const v = glob$1[path$13];
|
|
@@ -115,7 +115,7 @@ function useIcon({
|
|
|
115
115
|
return iconComponent;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
const _sfc_main$
|
|
118
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
119
119
|
__name: "KdsIcon",
|
|
120
120
|
props: {
|
|
121
121
|
name: {},
|
|
@@ -141,7 +141,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
const KdsIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
144
|
+
const KdsIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$V, [["__scopeId", "data-v-4da5bf3e"]]);
|
|
145
145
|
|
|
146
146
|
const ID_TO_ICON_MAP = {
|
|
147
147
|
// Flow Variables
|
|
@@ -468,7 +468,7 @@ const kdsDataTypeSize = {
|
|
|
468
468
|
const kdsDataTypeSizes = Object.values(kdsDataTypeSize);
|
|
469
469
|
|
|
470
470
|
const _hoisted_1$C = ["title"];
|
|
471
|
-
const _sfc_main$
|
|
471
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
472
472
|
__name: "KdsDataType",
|
|
473
473
|
props: {
|
|
474
474
|
iconName: { default: "unknown-datatype" },
|
|
@@ -514,7 +514,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
514
514
|
}
|
|
515
515
|
});
|
|
516
516
|
|
|
517
|
-
const KdsDataType = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
517
|
+
const KdsDataType = /* @__PURE__ */ _export_sfc$1(_sfc_main$U, [["__scopeId", "data-v-806087da"]]);
|
|
518
518
|
|
|
519
519
|
const kdsBadgeVariant = {
|
|
520
520
|
NEUTRAL: "neutral",
|
|
@@ -532,7 +532,7 @@ const kdsBadgeSize = {
|
|
|
532
532
|
const kdsBadgeSizes = Object.values(kdsBadgeSize);
|
|
533
533
|
|
|
534
534
|
const _hoisted_1$B = { class: "label-wrapper" };
|
|
535
|
-
const _sfc_main$
|
|
535
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
536
536
|
__name: "KdsBadge",
|
|
537
537
|
props: {
|
|
538
538
|
label: {},
|
|
@@ -560,7 +560,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
560
560
|
}
|
|
561
561
|
});
|
|
562
562
|
|
|
563
|
-
const KdsBadge = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
563
|
+
const KdsBadge = /* @__PURE__ */ _export_sfc$1(_sfc_main$T, [["__scopeId", "data-v-0dc42bfc"]]);
|
|
564
564
|
|
|
565
565
|
const kdsColorSwatchType = {
|
|
566
566
|
LEARNER: "learner",
|
|
@@ -580,7 +580,7 @@ const kdsColorSwatchSize = {
|
|
|
580
580
|
const kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
|
|
581
581
|
|
|
582
582
|
const _hoisted_1$A = ["role", "title", "aria-hidden", "aria-label"];
|
|
583
|
-
const _sfc_main$
|
|
583
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
584
584
|
__name: "KdsColorSwatch",
|
|
585
585
|
props: {
|
|
586
586
|
color: {},
|
|
@@ -620,7 +620,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
622
|
|
|
623
|
-
const KdsColorSwatch = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
623
|
+
const KdsColorSwatch = /* @__PURE__ */ _export_sfc$1(_sfc_main$S, [["__scopeId", "data-v-bdb3dd24"]]);
|
|
624
624
|
|
|
625
625
|
const kdsDarkModeType = {
|
|
626
626
|
LIGHT: "light",
|
|
@@ -742,7 +742,7 @@ function useKdsIsTruncated(elementRef) {
|
|
|
742
742
|
|
|
743
743
|
const _hoisted_1$z = ["title", "aria-label"];
|
|
744
744
|
const _hoisted_2$m = ["title"];
|
|
745
|
-
const _sfc_main$
|
|
745
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
746
746
|
__name: "KdsLiveStatus",
|
|
747
747
|
props: {
|
|
748
748
|
status: { default: "red" },
|
|
@@ -777,7 +777,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
777
777
|
}
|
|
778
778
|
});
|
|
779
779
|
|
|
780
|
-
const KdsLiveStatus = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
780
|
+
const KdsLiveStatus = /* @__PURE__ */ _export_sfc$1(_sfc_main$R, [["__scopeId", "data-v-3bd44b22"]]);
|
|
781
781
|
|
|
782
782
|
const kdsLiveStatusStatus = {
|
|
783
783
|
RED: "red",
|
|
@@ -794,7 +794,7 @@ const kdsLiveStatusSize = {
|
|
|
794
794
|
const kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
|
|
795
795
|
|
|
796
796
|
const _hoisted_1$y = ["data-style"];
|
|
797
|
-
const _sfc_main$
|
|
797
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
798
798
|
__name: "KdsLoadingSpinner",
|
|
799
799
|
props: {
|
|
800
800
|
size: { default: "medium" },
|
|
@@ -824,7 +824,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
824
824
|
}
|
|
825
825
|
});
|
|
826
826
|
|
|
827
|
-
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
827
|
+
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc$1(_sfc_main$Q, [["__scopeId", "data-v-74bb7c3d"]]);
|
|
828
828
|
|
|
829
829
|
const kdsLoadingSpinnerVariant = {
|
|
830
830
|
ON_PRIMARY: "onPrimary",
|
|
@@ -841,7 +841,7 @@ const _hoisted_4$a = {
|
|
|
841
841
|
key: 0,
|
|
842
842
|
class: "body"
|
|
843
843
|
};
|
|
844
|
-
const _sfc_main$
|
|
844
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
845
845
|
__name: "KdsInlineMessage",
|
|
846
846
|
props: {
|
|
847
847
|
headline: {},
|
|
@@ -886,7 +886,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
886
886
|
}
|
|
887
887
|
});
|
|
888
888
|
|
|
889
|
-
const KdsInlineMessage = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
889
|
+
const KdsInlineMessage = /* @__PURE__ */ _export_sfc$1(_sfc_main$P, [["__scopeId", "data-v-3d79be7c"]]);
|
|
890
890
|
|
|
891
891
|
const kdsInlineMessageVariant = {
|
|
892
892
|
ERROR: "error",
|
|
@@ -900,7 +900,7 @@ const _hoisted_1$w = {
|
|
|
900
900
|
key: 0,
|
|
901
901
|
class: "label"
|
|
902
902
|
};
|
|
903
|
-
const _sfc_main$
|
|
903
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
904
904
|
__name: "BaseButton",
|
|
905
905
|
props: {
|
|
906
906
|
size: { default: "medium" },
|
|
@@ -972,9 +972,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
|
|
975
|
-
const BaseButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
975
|
+
const BaseButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$O, [["__scopeId", "data-v-b0f9559f"]]);
|
|
976
976
|
|
|
977
|
-
const _sfc_main$
|
|
977
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
978
978
|
__name: "KdsButton",
|
|
979
979
|
props: {
|
|
980
980
|
size: {},
|
|
@@ -1027,7 +1027,7 @@ const resolveNuxtLinkComponent = () => {
|
|
|
1027
1027
|
return fallbackComponent;
|
|
1028
1028
|
};
|
|
1029
1029
|
|
|
1030
|
-
const _sfc_main$
|
|
1030
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
1031
1031
|
__name: "KdsLinkButton",
|
|
1032
1032
|
props: {
|
|
1033
1033
|
size: {},
|
|
@@ -1063,7 +1063,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
1063
1063
|
}
|
|
1064
1064
|
});
|
|
1065
1065
|
|
|
1066
|
-
const _sfc_main$
|
|
1066
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
1067
1067
|
__name: "KdsToggleButton",
|
|
1068
1068
|
props: /* @__PURE__ */ mergeModels({
|
|
1069
1069
|
size: {},
|
|
@@ -1100,7 +1100,7 @@ const kdsToggleButtonVariants = Object.values(kdsToggleButtonVariant);
|
|
|
1100
1100
|
|
|
1101
1101
|
const _hoisted_1$v = ["data-visible"];
|
|
1102
1102
|
const _hoisted_2$k = ["data-visible"];
|
|
1103
|
-
const _sfc_main$
|
|
1103
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
1104
1104
|
__name: "KdsProgressButton",
|
|
1105
1105
|
props: /* @__PURE__ */ mergeModels({
|
|
1106
1106
|
size: { default: "medium" },
|
|
@@ -1181,7 +1181,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
1181
1181
|
}
|
|
1182
1182
|
});
|
|
1183
1183
|
|
|
1184
|
-
const KdsProgressButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1184
|
+
const KdsProgressButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$K, [["__scopeId", "data-v-ec08a9ba"]]);
|
|
1185
1185
|
|
|
1186
1186
|
const kdsProgressButtonState = {
|
|
1187
1187
|
DEFAULT: "default",
|
|
@@ -1201,7 +1201,7 @@ const _hoisted_4$9 = {
|
|
|
1201
1201
|
key: 2,
|
|
1202
1202
|
class: "kds-empty-state-action"
|
|
1203
1203
|
};
|
|
1204
|
-
const _sfc_main$
|
|
1204
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
1205
1205
|
__name: "KdsEmptyState",
|
|
1206
1206
|
props: {
|
|
1207
1207
|
headline: {},
|
|
@@ -1217,7 +1217,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
1217
1217
|
() => props.button && "to" in props.button && props.button.to !== void 0
|
|
1218
1218
|
);
|
|
1219
1219
|
const buttonComponent = computed(
|
|
1220
|
-
() => isLinkButton.value ? _sfc_main$
|
|
1220
|
+
() => isLinkButton.value ? _sfc_main$M : _sfc_main$N
|
|
1221
1221
|
);
|
|
1222
1222
|
return (_ctx, _cache) => {
|
|
1223
1223
|
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
@@ -1240,9 +1240,9 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
1240
1240
|
}
|
|
1241
1241
|
});
|
|
1242
1242
|
|
|
1243
|
-
const KdsEmptyState = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1243
|
+
const KdsEmptyState = /* @__PURE__ */ _export_sfc$1(_sfc_main$J, [["__scopeId", "data-v-02149081"]]);
|
|
1244
1244
|
|
|
1245
|
-
const _sfc_main$
|
|
1245
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
1246
1246
|
__name: "ListItemAccessory",
|
|
1247
1247
|
props: {
|
|
1248
1248
|
accessory: {},
|
|
@@ -1314,7 +1314,7 @@ const _hoisted_9 = {
|
|
|
1314
1314
|
key: 2,
|
|
1315
1315
|
class: "trailing-item-reserve-space"
|
|
1316
1316
|
};
|
|
1317
|
-
const _sfc_main$
|
|
1317
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
1318
1318
|
__name: "KdsListItem",
|
|
1319
1319
|
props: {
|
|
1320
1320
|
id: {},
|
|
@@ -1369,7 +1369,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
1369
1369
|
onClick
|
|
1370
1370
|
}, [
|
|
1371
1371
|
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$i, [
|
|
1372
|
-
createVNode(_sfc_main$
|
|
1372
|
+
createVNode(_sfc_main$I, {
|
|
1373
1373
|
accessory: props.accessory,
|
|
1374
1374
|
size: accessorySize.value,
|
|
1375
1375
|
disabled: props.disabled
|
|
@@ -1408,16 +1408,16 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
1408
1408
|
}
|
|
1409
1409
|
});
|
|
1410
1410
|
|
|
1411
|
-
const KdsListItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1411
|
+
const KdsListItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$H, [["__scopeId", "data-v-7fba4bc1"]]);
|
|
1412
1412
|
|
|
1413
|
-
const _sfc_main$
|
|
1413
|
+
const _sfc_main$G = { };
|
|
1414
1414
|
|
|
1415
1415
|
const _hoisted_1$s = { class: "kds-list-item-divider" };
|
|
1416
1416
|
|
|
1417
1417
|
function _sfc_render$8(_ctx, _cache) {
|
|
1418
1418
|
return (openBlock(), createElementBlock("hr", _hoisted_1$s))
|
|
1419
1419
|
}
|
|
1420
|
-
const ListItemDivider = /*#__PURE__*/_export_sfc$1(_sfc_main$
|
|
1420
|
+
const ListItemDivider = /*#__PURE__*/_export_sfc$1(_sfc_main$G, [['render',_sfc_render$8],['__scopeId',"data-v-3ee92695"]]);
|
|
1421
1421
|
|
|
1422
1422
|
const _hoisted_1$r = { class: "kds-list-item-section-title" };
|
|
1423
1423
|
const _hoisted_2$h = {
|
|
@@ -1425,7 +1425,7 @@ const _hoisted_2$h = {
|
|
|
1425
1425
|
class: "icon"
|
|
1426
1426
|
};
|
|
1427
1427
|
const _hoisted_3$b = ["title"];
|
|
1428
|
-
const _sfc_main$
|
|
1428
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
1429
1429
|
__name: "ListItemSectionTitle",
|
|
1430
1430
|
props: {
|
|
1431
1431
|
label: {},
|
|
@@ -1454,12 +1454,12 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
1454
1454
|
}
|
|
1455
1455
|
});
|
|
1456
1456
|
|
|
1457
|
-
const ListItemSectionTitle = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1457
|
+
const ListItemSectionTitle = /* @__PURE__ */ _export_sfc$1(_sfc_main$F, [["__scopeId", "data-v-53382531"]]);
|
|
1458
1458
|
|
|
1459
1459
|
const _hoisted_1$q = ["role", "aria-busy", "aria-label", "aria-activedescendant", "tabindex"];
|
|
1460
1460
|
const _hoisted_2$g = ["role"];
|
|
1461
1461
|
const loadingStateText = "Loading entries";
|
|
1462
|
-
const _sfc_main$
|
|
1462
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
1463
1463
|
__name: "KdsListContainer",
|
|
1464
1464
|
props: {
|
|
1465
1465
|
possibleValues: {},
|
|
@@ -1468,6 +1468,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
1468
1468
|
loading: { type: Boolean, default: false },
|
|
1469
1469
|
ariaLabel: {},
|
|
1470
1470
|
controlledExternally: { type: Boolean },
|
|
1471
|
+
allowNoSelection: { type: Boolean, default: false },
|
|
1471
1472
|
role: { default: "listbox" }
|
|
1472
1473
|
},
|
|
1473
1474
|
emits: ["itemClick"],
|
|
@@ -1475,8 +1476,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
1475
1476
|
const props = __props;
|
|
1476
1477
|
const emit = __emit;
|
|
1477
1478
|
const idPrefix = useId();
|
|
1478
|
-
const toOptionId = (elementId) => elementId.slice(idPrefix.length + 1);
|
|
1479
1479
|
const emptyOptionId = `${idPrefix}-empty`;
|
|
1480
|
+
function toOptionId(elementId) {
|
|
1481
|
+
if (elementId === emptyOptionId) {
|
|
1482
|
+
return void 0;
|
|
1483
|
+
}
|
|
1484
|
+
return elementId?.slice(idPrefix.length + 1);
|
|
1485
|
+
}
|
|
1480
1486
|
const prefixedValues = computed(
|
|
1481
1487
|
() => (props.loading ? [] : props.possibleValues).map((o) => ({
|
|
1482
1488
|
...o,
|
|
@@ -1548,7 +1554,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
1548
1554
|
const findEnabledIndex = (id) => id === void 0 ? -1 : enabledValues.value.findIndex((o) => o.id === id);
|
|
1549
1555
|
const handleFocus = () => {
|
|
1550
1556
|
isFocused.value = true;
|
|
1551
|
-
if (activeId.value === void 0) {
|
|
1557
|
+
if (activeId.value === void 0 && !props.allowNoSelection) {
|
|
1552
1558
|
activeId.value = lastActiveId.value ?? enabledValues.value[0]?.id;
|
|
1553
1559
|
}
|
|
1554
1560
|
};
|
|
@@ -1557,46 +1563,52 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
1557
1563
|
lastActiveId.value = activeId.value;
|
|
1558
1564
|
activeId.value = void 0;
|
|
1559
1565
|
};
|
|
1566
|
+
const moveDown = (currentIndex) => {
|
|
1567
|
+
if (currentIndex < 0) {
|
|
1568
|
+
return enabledValues.value[0].id;
|
|
1569
|
+
}
|
|
1570
|
+
if (currentIndex >= enabledValues.value.length - 1) {
|
|
1571
|
+
return props.allowNoSelection ? void 0 : enabledValues.value[0].id;
|
|
1572
|
+
}
|
|
1573
|
+
return enabledValues.value[currentIndex + 1].id;
|
|
1574
|
+
};
|
|
1575
|
+
const moveUp = (currentIndex) => {
|
|
1576
|
+
if (props.allowNoSelection && currentIndex === 0) {
|
|
1577
|
+
return void 0;
|
|
1578
|
+
}
|
|
1579
|
+
if (currentIndex <= 0) {
|
|
1580
|
+
return enabledValues.value[enabledValues.value.length - 1].id;
|
|
1581
|
+
}
|
|
1582
|
+
return enabledValues.value[currentIndex - 1].id;
|
|
1583
|
+
};
|
|
1584
|
+
const isTextInput = (target) => target instanceof HTMLElement && ["INPUT", "TEXTAREA", "SELECT"].includes(target.tagName);
|
|
1560
1585
|
const handleKeydown = (event) => {
|
|
1561
1586
|
if (enabledValues.value.length === 0) {
|
|
1587
|
+
activeId.value = selectableValues.value.length === 0 ? emptyOptionId : void 0;
|
|
1562
1588
|
return;
|
|
1563
1589
|
}
|
|
1564
1590
|
const currentIndex = findEnabledIndex(activeId.value);
|
|
1565
1591
|
switch (event.key) {
|
|
1566
|
-
case "ArrowDown":
|
|
1567
|
-
|
|
1568
|
-
activeId.value = enabledValues.value[nextIndex].id;
|
|
1592
|
+
case "ArrowDown":
|
|
1593
|
+
activeId.value = moveDown(currentIndex);
|
|
1569
1594
|
scrollToView();
|
|
1570
1595
|
event.preventDefault();
|
|
1571
1596
|
break;
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
const nextIndex = currentIndex <= 0 ? enabledValues.value.length - 1 : currentIndex - 1;
|
|
1575
|
-
activeId.value = enabledValues.value[nextIndex].id;
|
|
1597
|
+
case "ArrowUp":
|
|
1598
|
+
activeId.value = moveUp(currentIndex);
|
|
1576
1599
|
scrollToView();
|
|
1577
1600
|
event.preventDefault();
|
|
1578
1601
|
break;
|
|
1579
|
-
}
|
|
1580
1602
|
case "Enter":
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
}
|
|
1584
|
-
if (activeId.value) {
|
|
1585
|
-
emit("itemClick", toOptionId(activeId.value));
|
|
1586
|
-
event.preventDefault();
|
|
1587
|
-
}
|
|
1603
|
+
emit("itemClick", toOptionId(activeId.value));
|
|
1604
|
+
event.preventDefault();
|
|
1588
1605
|
break;
|
|
1589
1606
|
case " ":
|
|
1590
|
-
if (
|
|
1591
|
-
break;
|
|
1592
|
-
}
|
|
1593
|
-
if (event.target instanceof HTMLElement && ["BUTTON"].includes(event.target.tagName) && event.target.ariaExpanded === "false") {
|
|
1607
|
+
if (isTextInput(event.target)) {
|
|
1594
1608
|
break;
|
|
1595
1609
|
}
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
event.preventDefault();
|
|
1599
|
-
}
|
|
1610
|
+
emit("itemClick", toOptionId(activeId.value));
|
|
1611
|
+
event.preventDefault();
|
|
1600
1612
|
break;
|
|
1601
1613
|
case "Home":
|
|
1602
1614
|
activeId.value = enabledValues.value[0].id;
|
|
@@ -1687,7 +1699,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
1687
1699
|
}
|
|
1688
1700
|
});
|
|
1689
1701
|
|
|
1690
|
-
const KdsListContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1702
|
+
const KdsListContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$E, [["__scopeId", "data-v-9b505d0b"]]);
|
|
1691
1703
|
|
|
1692
1704
|
const KdsListContainer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1693
1705
|
__proto__: null,
|
|
@@ -1699,7 +1711,7 @@ const _hoisted_2$f = {
|
|
|
1699
1711
|
key: 0,
|
|
1700
1712
|
class: "kds-popover-default-content"
|
|
1701
1713
|
};
|
|
1702
|
-
const _sfc_main$
|
|
1714
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
1703
1715
|
__name: "KdsPopover",
|
|
1704
1716
|
props: /* @__PURE__ */ mergeModels({
|
|
1705
1717
|
placement: { default: "bottom-left" },
|
|
@@ -1751,14 +1763,14 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
1751
1763
|
}
|
|
1752
1764
|
});
|
|
1753
1765
|
|
|
1754
|
-
const KdsPopover = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1766
|
+
const KdsPopover = /* @__PURE__ */ _export_sfc$1(_sfc_main$D, [["__scopeId", "data-v-786e523e"]]);
|
|
1755
1767
|
|
|
1756
1768
|
const KdsPopover$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1757
1769
|
__proto__: null,
|
|
1758
1770
|
default: KdsPopover
|
|
1759
1771
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1760
1772
|
|
|
1761
|
-
const _sfc_main$
|
|
1773
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
1762
1774
|
...{
|
|
1763
1775
|
inheritAttrs: false
|
|
1764
1776
|
},
|
|
@@ -1803,12 +1815,15 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
1803
1815
|
};
|
|
1804
1816
|
});
|
|
1805
1817
|
const onItemClick = (itemId) => {
|
|
1818
|
+
if (!itemId) {
|
|
1819
|
+
return;
|
|
1820
|
+
}
|
|
1806
1821
|
isMenuOpen.value = false;
|
|
1807
1822
|
emit("itemClick", itemId);
|
|
1808
1823
|
};
|
|
1809
1824
|
return (_ctx, _cache) => {
|
|
1810
1825
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1811
|
-
createVNode(_sfc_main$
|
|
1826
|
+
createVNode(_sfc_main$L, mergeProps({
|
|
1812
1827
|
modelValue: isMenuOpen.value,
|
|
1813
1828
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isMenuOpen.value = $event)
|
|
1814
1829
|
}, toggleButtonProps.value, {
|
|
@@ -1817,14 +1832,14 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
1817
1832
|
"aria-controls": unref(menuId),
|
|
1818
1833
|
style: popoverEl.value?.anchorStyle,
|
|
1819
1834
|
onFocus: listContainerEl.value?.handleFocus,
|
|
1820
|
-
onKeydown: listContainerEl.value?.handleKeydown,
|
|
1821
|
-
onBlur: _cache[
|
|
1822
|
-
}), null, 16, ["modelValue", "aria-expanded", "aria-controls", "style", "onFocus"
|
|
1835
|
+
onKeydown: _cache[1] || (_cache[1] = ($event) => isMenuOpen.value && listContainerEl.value?.handleKeydown),
|
|
1836
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => isMenuOpen.value = false)
|
|
1837
|
+
}), null, 16, ["modelValue", "aria-expanded", "aria-controls", "style", "onFocus"]),
|
|
1823
1838
|
createVNode(KdsPopover, {
|
|
1824
1839
|
ref_key: "popoverEl",
|
|
1825
1840
|
ref: popoverEl,
|
|
1826
1841
|
modelValue: isMenuOpen.value,
|
|
1827
|
-
"onUpdate:modelValue": _cache[
|
|
1842
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isMenuOpen.value = $event),
|
|
1828
1843
|
placement: "bottom-left",
|
|
1829
1844
|
"popover-aria-label": "Menu"
|
|
1830
1845
|
}, {
|
|
@@ -1853,7 +1868,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
1853
1868
|
}
|
|
1854
1869
|
});
|
|
1855
1870
|
|
|
1856
|
-
const KdsMenuButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1871
|
+
const KdsMenuButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$C, [["__scopeId", "data-v-be36bcd4"]]);
|
|
1857
1872
|
|
|
1858
1873
|
const kdsButtonSize = {
|
|
1859
1874
|
XSMALL: "xsmall",
|
|
@@ -1871,7 +1886,7 @@ const kdsButtonVariants = Object.values(kdsButtonVariant);
|
|
|
1871
1886
|
|
|
1872
1887
|
const _hoisted_1$o = { class: "kds-label-wrapper" };
|
|
1873
1888
|
const _hoisted_2$e = ["id", "for", "title"];
|
|
1874
|
-
const _sfc_main$
|
|
1889
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
1875
1890
|
__name: "KdsLabel",
|
|
1876
1891
|
props: {
|
|
1877
1892
|
label: {},
|
|
@@ -1907,11 +1922,11 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
1907
1922
|
}
|
|
1908
1923
|
});
|
|
1909
1924
|
|
|
1910
|
-
const KdsLabel = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1925
|
+
const KdsLabel = /* @__PURE__ */ _export_sfc$1(_sfc_main$B, [["__scopeId", "data-v-1a5dc1ba"]]);
|
|
1911
1926
|
|
|
1912
1927
|
const _hoisted_1$n = ["id"];
|
|
1913
1928
|
const _hoisted_2$d = { class: "subtext-text" };
|
|
1914
|
-
const _sfc_main$
|
|
1929
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
1915
1930
|
__name: "KdsSubText",
|
|
1916
1931
|
props: {
|
|
1917
1932
|
id: {},
|
|
@@ -1948,7 +1963,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
1948
1963
|
}
|
|
1949
1964
|
});
|
|
1950
1965
|
|
|
1951
|
-
const KdsSubText = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
1966
|
+
const KdsSubText = /* @__PURE__ */ _export_sfc$1(_sfc_main$A, [["__scopeId", "data-v-df9a85a4"]]);
|
|
1952
1967
|
|
|
1953
1968
|
const _hoisted_1$m = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
|
|
1954
1969
|
const _hoisted_2$c = { class: "control" };
|
|
@@ -1962,7 +1977,7 @@ const _hoisted_6$3 = {
|
|
|
1962
1977
|
key: 0,
|
|
1963
1978
|
class: "subtext-wrapper"
|
|
1964
1979
|
};
|
|
1965
|
-
const _sfc_main$
|
|
1980
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
1966
1981
|
__name: "BaseCheckbox",
|
|
1967
1982
|
props: /* @__PURE__ */ mergeModels({
|
|
1968
1983
|
disabled: { type: Boolean, default: false },
|
|
@@ -2065,9 +2080,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
2065
2080
|
}
|
|
2066
2081
|
});
|
|
2067
2082
|
|
|
2068
|
-
const BaseCheckbox = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
2083
|
+
const BaseCheckbox = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__scopeId", "data-v-32f17780"]]);
|
|
2069
2084
|
|
|
2070
|
-
const _sfc_main$
|
|
2085
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
2071
2086
|
__name: "KdsCheckbox",
|
|
2072
2087
|
props: /* @__PURE__ */ mergeModels({
|
|
2073
2088
|
disabled: { type: Boolean, default: false },
|
|
@@ -2100,7 +2115,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
2100
2115
|
});
|
|
2101
2116
|
|
|
2102
2117
|
const _hoisted_1$l = ["id", "aria-labelledby", "aria-describedby"];
|
|
2103
|
-
const _sfc_main$
|
|
2118
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
2104
2119
|
__name: "KdsCheckboxGroup",
|
|
2105
2120
|
props: /* @__PURE__ */ mergeModels({
|
|
2106
2121
|
id: {},
|
|
@@ -2189,7 +2204,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
2189
2204
|
}
|
|
2190
2205
|
});
|
|
2191
2206
|
|
|
2192
|
-
const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
2207
|
+
const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$x, [["__scopeId", "data-v-c38eeda5"]]);
|
|
2193
2208
|
|
|
2194
2209
|
const kdsCheckboxGroupAlignment = {
|
|
2195
2210
|
VERTICAL: "vertical",
|
|
@@ -2217,7 +2232,7 @@ const _hoisted_3$9 = {
|
|
|
2217
2232
|
const _hoisted_4$6 = { class: "content" };
|
|
2218
2233
|
const _hoisted_5$4 = { class: "label" };
|
|
2219
2234
|
const _hoisted_6$2 = ["id"];
|
|
2220
|
-
const _sfc_main$
|
|
2235
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
2221
2236
|
__name: "KdsRadioButton",
|
|
2222
2237
|
props: /* @__PURE__ */ mergeModels({
|
|
2223
2238
|
text: {},
|
|
@@ -2279,7 +2294,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2279
2294
|
}
|
|
2280
2295
|
});
|
|
2281
2296
|
|
|
2282
|
-
const KdsRadioButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
2297
|
+
const KdsRadioButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$w, [["__scopeId", "data-v-27c361e4"]]);
|
|
2283
2298
|
|
|
2284
2299
|
const useRadioSelection = ({
|
|
2285
2300
|
selectedId,
|
|
@@ -2402,7 +2417,7 @@ const useRadioSelection = ({
|
|
|
2402
2417
|
};
|
|
2403
2418
|
|
|
2404
2419
|
const _hoisted_1$j = ["id", "aria-labelledby", "aria-describedby"];
|
|
2405
|
-
const _sfc_main$
|
|
2420
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
2406
2421
|
__name: "KdsRadioButtonGroup",
|
|
2407
2422
|
props: /* @__PURE__ */ mergeModels({
|
|
2408
2423
|
id: {},
|
|
@@ -2486,10 +2501,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
2486
2501
|
}
|
|
2487
2502
|
});
|
|
2488
2503
|
|
|
2489
|
-
const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
2504
|
+
const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__scopeId", "data-v-9cc4dcdd"]]);
|
|
2490
2505
|
|
|
2491
2506
|
const _hoisted_1$i = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
|
|
2492
|
-
const _sfc_main$
|
|
2507
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
2493
2508
|
__name: "ValueSwitchItem",
|
|
2494
2509
|
props: {
|
|
2495
2510
|
selected: { type: Boolean },
|
|
@@ -2544,7 +2559,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
2544
2559
|
}
|
|
2545
2560
|
});
|
|
2546
2561
|
|
|
2547
|
-
const ValueSwitchItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
2562
|
+
const ValueSwitchItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$u, [["__scopeId", "data-v-93f3f577"]]);
|
|
2548
2563
|
|
|
2549
2564
|
const useValueSwitchIconHiding = ({
|
|
2550
2565
|
width,
|
|
@@ -2596,7 +2611,7 @@ const useValueSwitchIconHiding = ({
|
|
|
2596
2611
|
};
|
|
2597
2612
|
|
|
2598
2613
|
const _hoisted_1$h = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
|
|
2599
|
-
const _sfc_main$
|
|
2614
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
2600
2615
|
__name: "KdsValueSwitch",
|
|
2601
2616
|
props: /* @__PURE__ */ mergeModels({
|
|
2602
2617
|
id: {},
|
|
@@ -2694,7 +2709,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
2694
2709
|
}
|
|
2695
2710
|
});
|
|
2696
2711
|
|
|
2697
|
-
const KdsValueSwitch = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
2712
|
+
const KdsValueSwitch = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["__scopeId", "data-v-666d4c10"]]);
|
|
2698
2713
|
|
|
2699
2714
|
const kdsRadioButtonGroupAlignment = {
|
|
2700
2715
|
VERTICAL: "vertical",
|
|
@@ -2714,7 +2729,7 @@ const kdsValueSwitchVariant = {
|
|
|
2714
2729
|
};
|
|
2715
2730
|
const kdsValueSwitchVariants = Object.values(kdsValueSwitchVariant);
|
|
2716
2731
|
|
|
2717
|
-
const _sfc_main$
|
|
2732
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
2718
2733
|
__name: "BaseFormFieldWrapper",
|
|
2719
2734
|
props: {
|
|
2720
2735
|
id: {},
|
|
@@ -2766,7 +2781,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
2766
2781
|
}
|
|
2767
2782
|
});
|
|
2768
2783
|
|
|
2769
|
-
const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
2784
|
+
const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$s, [["__scopeId", "data-v-5d99c134"]]);
|
|
2770
2785
|
|
|
2771
2786
|
const _hoisted_1$g = {
|
|
2772
2787
|
key: 0,
|
|
@@ -2776,7 +2791,7 @@ const _hoisted_2$a = {
|
|
|
2776
2791
|
key: 1,
|
|
2777
2792
|
class: "leading-slot"
|
|
2778
2793
|
};
|
|
2779
|
-
const _hoisted_3$8 = ["id", "value", "type", "inputmode", "placeholder", "disabled", "autocomplete", "min", "max", "step", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "role", "pattern", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext", "aria-activedescendant"];
|
|
2794
|
+
const _hoisted_3$8 = ["id", "value", "type", "inputmode", "placeholder", "disabled", "autocomplete", "min", "max", "step", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "role", "pattern", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext", "aria-activedescendant", "aria-haspopup", "aria-controls", "aria-expanded"];
|
|
2780
2795
|
const _hoisted_4$5 = ["aria-disabled"];
|
|
2781
2796
|
const _hoisted_5$3 = {
|
|
2782
2797
|
key: 4,
|
|
@@ -2786,13 +2801,14 @@ const _hoisted_6$1 = {
|
|
|
2786
2801
|
key: 5,
|
|
2787
2802
|
class: "icon-wrapper trailing"
|
|
2788
2803
|
};
|
|
2789
|
-
const _sfc_main$
|
|
2804
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
2790
2805
|
__name: "BaseInput",
|
|
2791
2806
|
props: /* @__PURE__ */ mergeModels({
|
|
2792
2807
|
id: { default: void 0 },
|
|
2793
2808
|
type: { default: "text" },
|
|
2794
2809
|
min: { default: void 0 },
|
|
2795
2810
|
max: { default: void 0 },
|
|
2811
|
+
ariaExpanded: { type: Boolean, default: void 0 },
|
|
2796
2812
|
step: { default: void 0 },
|
|
2797
2813
|
placeholder: { default: void 0 },
|
|
2798
2814
|
disabled: { type: Boolean, default: false },
|
|
@@ -2810,6 +2826,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2810
2826
|
ariaValuemax: { default: void 0 },
|
|
2811
2827
|
ariaValuetext: { default: void 0 },
|
|
2812
2828
|
ariaActivedescendant: { default: void 0 },
|
|
2829
|
+
ariaHaspopup: { default: void 0 },
|
|
2830
|
+
ariaControls: { default: void 0 },
|
|
2813
2831
|
unit: { default: void 0 },
|
|
2814
2832
|
inputmode: { default: void 0 },
|
|
2815
2833
|
clearable: { type: Boolean, default: false },
|
|
@@ -2893,6 +2911,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2893
2911
|
"aria-valuemax": props.ariaValuemax,
|
|
2894
2912
|
"aria-valuetext": props.ariaValuetext,
|
|
2895
2913
|
"aria-activedescendant": props.ariaActivedescendant,
|
|
2914
|
+
"aria-haspopup": props.ariaHaspopup,
|
|
2915
|
+
"aria-controls": props.ariaControls,
|
|
2916
|
+
"aria-expanded": props.ariaExpanded,
|
|
2896
2917
|
class: normalizeClass({ "input-field": true, "has-value": hasValue.value }),
|
|
2897
2918
|
onInput: handleInput,
|
|
2898
2919
|
onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus", $event)),
|
|
@@ -2909,7 +2930,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2909
2930
|
}),
|
|
2910
2931
|
"aria-disabled": props.disabled || void 0
|
|
2911
2932
|
}, toDisplayString(props.unit), 11, _hoisted_4$5)) : createCommentVNode("", true),
|
|
2912
|
-
props.clearable && hasValue.value && !props.disabled ? (openBlock(), createBlock(_sfc_main$
|
|
2933
|
+
props.clearable && hasValue.value && !props.disabled ? (openBlock(), createBlock(_sfc_main$N, {
|
|
2913
2934
|
key: 3,
|
|
2914
2935
|
class: "clear-button",
|
|
2915
2936
|
type: "button",
|
|
@@ -2933,9 +2954,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2933
2954
|
}
|
|
2934
2955
|
});
|
|
2935
2956
|
|
|
2936
|
-
const BaseInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
2957
|
+
const BaseInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$r, [["__scopeId", "data-v-d8e771c0"]]);
|
|
2937
2958
|
|
|
2938
|
-
const _sfc_main$
|
|
2959
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
2939
2960
|
__name: "KdsTextInput",
|
|
2940
2961
|
props: /* @__PURE__ */ mergeModels({
|
|
2941
2962
|
description: {},
|
|
@@ -3155,7 +3176,7 @@ const KEYBOARD_LARGE_STEP = 0.1;
|
|
|
3155
3176
|
const HUE_KEYBOARD_STEP_DEG = 1;
|
|
3156
3177
|
const HUE_KEYBOARD_LARGE_STEP_DEG = 10;
|
|
3157
3178
|
const TO_BOTTOM_GRADIENT = "linear-gradient(to bottom, transparent, black)";
|
|
3158
|
-
const _sfc_main$
|
|
3179
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
3159
3180
|
__name: "ColorPicker",
|
|
3160
3181
|
props: {
|
|
3161
3182
|
"modelValue": { default: "" },
|
|
@@ -3370,7 +3391,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3370
3391
|
style: normalizeStyle(hueHandleStyle.value)
|
|
3371
3392
|
}, null, 4)
|
|
3372
3393
|
], 40, _hoisted_3$7),
|
|
3373
|
-
createVNode(_sfc_main$
|
|
3394
|
+
createVNode(_sfc_main$q, {
|
|
3374
3395
|
"model-value": modelValue.value,
|
|
3375
3396
|
"aria-label": "Color hex value",
|
|
3376
3397
|
placeholder: "#FFFFFF",
|
|
@@ -3381,7 +3402,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3381
3402
|
}
|
|
3382
3403
|
});
|
|
3383
3404
|
|
|
3384
|
-
const ColorPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
3405
|
+
const ColorPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$p, [["__scopeId", "data-v-180fafdd"]]);
|
|
3385
3406
|
|
|
3386
3407
|
const HEX_LENGTH_1 = 1;
|
|
3387
3408
|
const HEX_LENGTH_2 = 2;
|
|
@@ -3441,7 +3462,7 @@ const useColorInputValidationOnFocusOut = (modelValue) => {
|
|
|
3441
3462
|
return { handleFocusOut };
|
|
3442
3463
|
};
|
|
3443
3464
|
|
|
3444
|
-
const _sfc_main$
|
|
3465
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
3445
3466
|
__name: "KdsColorInput",
|
|
3446
3467
|
props: /* @__PURE__ */ mergeModels({
|
|
3447
3468
|
description: {},
|
|
@@ -3500,7 +3521,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3500
3521
|
}, null, 8, ["color", "style"])
|
|
3501
3522
|
]),
|
|
3502
3523
|
trailing: withCtx(() => [
|
|
3503
|
-
createVNode(unref(_sfc_main$
|
|
3524
|
+
createVNode(unref(_sfc_main$L), {
|
|
3504
3525
|
modelValue: open.value,
|
|
3505
3526
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
3506
3527
|
size: "xsmall",
|
|
@@ -3540,6 +3561,161 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3540
3561
|
}
|
|
3541
3562
|
});
|
|
3542
3563
|
|
|
3564
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
3565
|
+
__name: "KdsPasswordInput",
|
|
3566
|
+
props: /* @__PURE__ */ mergeModels({
|
|
3567
|
+
description: {},
|
|
3568
|
+
label: {},
|
|
3569
|
+
ariaLabel: {},
|
|
3570
|
+
id: {},
|
|
3571
|
+
subText: {},
|
|
3572
|
+
error: { type: Boolean, default: false },
|
|
3573
|
+
validating: { type: Boolean, default: false },
|
|
3574
|
+
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3575
|
+
placeholder: {},
|
|
3576
|
+
disabled: { type: Boolean, default: false },
|
|
3577
|
+
variant: { default: "password" },
|
|
3578
|
+
showVisibilityToggle: { type: Boolean, default: true },
|
|
3579
|
+
toggleLabel: {},
|
|
3580
|
+
autocomplete: {}
|
|
3581
|
+
}, {
|
|
3582
|
+
"modelValue": { default: "" },
|
|
3583
|
+
"modelModifiers": {}
|
|
3584
|
+
}),
|
|
3585
|
+
emits: ["update:modelValue"],
|
|
3586
|
+
setup(__props, { expose: __expose }) {
|
|
3587
|
+
const props = __props;
|
|
3588
|
+
const modelValue = useModel(__props, "modelValue");
|
|
3589
|
+
const showValue = ref(false);
|
|
3590
|
+
const preventBlurFromToggle = ref(false);
|
|
3591
|
+
const input = useTemplateRef("input");
|
|
3592
|
+
const effectiveToggleLabel = computed(
|
|
3593
|
+
() => props.toggleLabel ?? (props.variant === "key" ? "Key" : "Password")
|
|
3594
|
+
);
|
|
3595
|
+
const handleBlur = () => {
|
|
3596
|
+
if (preventBlurFromToggle.value) {
|
|
3597
|
+
input.value?.focus();
|
|
3598
|
+
}
|
|
3599
|
+
};
|
|
3600
|
+
__expose({
|
|
3601
|
+
focus: () => input.value?.focus()
|
|
3602
|
+
});
|
|
3603
|
+
return (_ctx, _cache) => {
|
|
3604
|
+
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
3605
|
+
default: withCtx((slotProps) => [
|
|
3606
|
+
createVNode(BaseInput, mergeProps({
|
|
3607
|
+
ref_key: "input",
|
|
3608
|
+
ref: input
|
|
3609
|
+
}, slotProps, {
|
|
3610
|
+
modelValue: modelValue.value,
|
|
3611
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
|
|
3612
|
+
type: showValue.value && props.showVisibilityToggle ? "text" : "password",
|
|
3613
|
+
"leading-icon": props.variant === "key" ? "key" : "lock",
|
|
3614
|
+
placeholder: props.placeholder,
|
|
3615
|
+
disabled: props.disabled,
|
|
3616
|
+
error: props.error,
|
|
3617
|
+
autocomplete: props.autocomplete,
|
|
3618
|
+
onBlur: handleBlur
|
|
3619
|
+
}), {
|
|
3620
|
+
trailing: withCtx(() => [
|
|
3621
|
+
props.showVisibilityToggle ? (openBlock(), createBlock(_sfc_main$L, {
|
|
3622
|
+
key: 0,
|
|
3623
|
+
modelValue: showValue.value,
|
|
3624
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showValue.value = $event),
|
|
3625
|
+
type: "button",
|
|
3626
|
+
variant: "outlined",
|
|
3627
|
+
size: "xsmall",
|
|
3628
|
+
"leading-icon": "eye",
|
|
3629
|
+
"aria-label": showValue.value ? `Hide ${effectiveToggleLabel.value}` : `Show ${effectiveToggleLabel.value}`,
|
|
3630
|
+
title: showValue.value ? `Hide ${effectiveToggleLabel.value}` : `Show ${effectiveToggleLabel.value}`,
|
|
3631
|
+
disabled: props.disabled,
|
|
3632
|
+
onPointerdown: _cache[1] || (_cache[1] = ($event) => preventBlurFromToggle.value = true),
|
|
3633
|
+
onPointerup: _cache[2] || (_cache[2] = ($event) => preventBlurFromToggle.value = false),
|
|
3634
|
+
onPointercancel: _cache[3] || (_cache[3] = ($event) => preventBlurFromToggle.value = false),
|
|
3635
|
+
onClick: _cache[4] || (_cache[4] = ($event) => preventBlurFromToggle.value = false)
|
|
3636
|
+
}, null, 8, ["modelValue", "aria-label", "title", "disabled"])) : createCommentVNode("", true)
|
|
3637
|
+
]),
|
|
3638
|
+
_: 1
|
|
3639
|
+
}, 16, ["modelValue", "type", "leading-icon", "placeholder", "disabled", "error", "autocomplete"])
|
|
3640
|
+
]),
|
|
3641
|
+
_: 1
|
|
3642
|
+
}, 16);
|
|
3643
|
+
};
|
|
3644
|
+
}
|
|
3645
|
+
});
|
|
3646
|
+
|
|
3647
|
+
const kdsPasswordInputVariant = {
|
|
3648
|
+
PASSWORD: "password",
|
|
3649
|
+
KEY: "key"
|
|
3650
|
+
};
|
|
3651
|
+
const kdsPasswordInputVariants = Object.values(kdsPasswordInputVariant);
|
|
3652
|
+
const kdsPasswordInputAutocomplete = {
|
|
3653
|
+
CURRENT_PASSWORD: "current-password",
|
|
3654
|
+
NEW_PASSWORD: "new-password",
|
|
3655
|
+
ONE_TIME_CODE: "one-time-code",
|
|
3656
|
+
OFF: "off"
|
|
3657
|
+
};
|
|
3658
|
+
const kdsPasswordInputAutocompletes = Object.values(
|
|
3659
|
+
kdsPasswordInputAutocomplete
|
|
3660
|
+
);
|
|
3661
|
+
|
|
3662
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
3663
|
+
__name: "KdsUsernameInput",
|
|
3664
|
+
props: /* @__PURE__ */ mergeModels({
|
|
3665
|
+
description: {},
|
|
3666
|
+
label: {},
|
|
3667
|
+
ariaLabel: {},
|
|
3668
|
+
id: {},
|
|
3669
|
+
subText: {},
|
|
3670
|
+
error: { type: Boolean, default: false },
|
|
3671
|
+
validating: { type: Boolean, default: false },
|
|
3672
|
+
preserveSubTextSpace: { type: Boolean, default: false },
|
|
3673
|
+
placeholder: {},
|
|
3674
|
+
disabled: { type: Boolean, default: false },
|
|
3675
|
+
autocomplete: {}
|
|
3676
|
+
}, {
|
|
3677
|
+
"modelValue": { default: "" },
|
|
3678
|
+
"modelModifiers": {}
|
|
3679
|
+
}),
|
|
3680
|
+
emits: ["update:modelValue"],
|
|
3681
|
+
setup(__props, { expose: __expose }) {
|
|
3682
|
+
const props = __props;
|
|
3683
|
+
const modelValue = useModel(__props, "modelValue");
|
|
3684
|
+
const baseInput = useTemplateRef("baseInput");
|
|
3685
|
+
__expose({
|
|
3686
|
+
focus: () => baseInput.value?.focus()
|
|
3687
|
+
});
|
|
3688
|
+
return (_ctx, _cache) => {
|
|
3689
|
+
return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
|
|
3690
|
+
default: withCtx((slotProps) => [
|
|
3691
|
+
createVNode(BaseInput, mergeProps({
|
|
3692
|
+
ref_key: "baseInput",
|
|
3693
|
+
ref: baseInput
|
|
3694
|
+
}, slotProps, {
|
|
3695
|
+
modelValue: modelValue.value,
|
|
3696
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
3697
|
+
type: "text",
|
|
3698
|
+
"leading-icon": "user",
|
|
3699
|
+
placeholder: props.placeholder,
|
|
3700
|
+
disabled: props.disabled,
|
|
3701
|
+
error: props.error,
|
|
3702
|
+
autocomplete: props.autocomplete
|
|
3703
|
+
}), null, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
3704
|
+
]),
|
|
3705
|
+
_: 1
|
|
3706
|
+
}, 16);
|
|
3707
|
+
};
|
|
3708
|
+
}
|
|
3709
|
+
});
|
|
3710
|
+
|
|
3711
|
+
const kdsUsernameInputAutocomplete = {
|
|
3712
|
+
USERNAME: "username",
|
|
3713
|
+
OFF: "off"
|
|
3714
|
+
};
|
|
3715
|
+
const kdsUsernameInputAutocompletes = Object.values(
|
|
3716
|
+
kdsUsernameInputAutocomplete
|
|
3717
|
+
);
|
|
3718
|
+
|
|
3543
3719
|
var top = 'top';
|
|
3544
3720
|
var bottom = 'bottom';
|
|
3545
3721
|
var right = 'right';
|
|
@@ -13661,7 +13837,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
13661
13837
|
onBlur: onTextInputBlur
|
|
13662
13838
|
}), {
|
|
13663
13839
|
trailing: withCtx(() => [
|
|
13664
|
-
createVNode(_sfc_main$
|
|
13840
|
+
createVNode(_sfc_main$L, {
|
|
13665
13841
|
modelValue: popoverIsVisible.value,
|
|
13666
13842
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => popoverIsVisible.value = $event),
|
|
13667
13843
|
type: "button",
|
|
@@ -13880,14 +14056,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
13880
14056
|
variant: "large",
|
|
13881
14057
|
"possible-values": possibleFormats.value,
|
|
13882
14058
|
"empty-text": "No recently used formats",
|
|
13883
|
-
onItemClick: _cache[2] || (_cache[2] = ($event) => selection.value = decodeURIComponent($event))
|
|
14059
|
+
onItemClick: _cache[2] || (_cache[2] = ($event) => $event && (selection.value = decodeURIComponent($event)))
|
|
13884
14060
|
}, null, 8, ["possible-values"])
|
|
13885
14061
|
]);
|
|
13886
14062
|
};
|
|
13887
14063
|
}
|
|
13888
14064
|
});
|
|
13889
14065
|
|
|
13890
|
-
const DateTimeFormatPopover = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["__scopeId", "data-v-
|
|
14066
|
+
const DateTimeFormatPopover = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["__scopeId", "data-v-f75ebe1b"]]);
|
|
13891
14067
|
|
|
13892
14068
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
13893
14069
|
__name: "KdsDateTimeFormatInput",
|
|
@@ -13932,7 +14108,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
13932
14108
|
autocomplete: props.autocomplete
|
|
13933
14109
|
}), {
|
|
13934
14110
|
trailing: withCtx(() => [
|
|
13935
|
-
createVNode(unref(_sfc_main$
|
|
14111
|
+
createVNode(unref(_sfc_main$L), {
|
|
13936
14112
|
modelValue: open.value,
|
|
13937
14113
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
13938
14114
|
size: "xsmall",
|
|
@@ -14123,6 +14299,8 @@ const createKdsNumberParser = (params) => {
|
|
|
14123
14299
|
};
|
|
14124
14300
|
};
|
|
14125
14301
|
|
|
14302
|
+
const REPEAT_INITIAL_DELAY_MS = 400;
|
|
14303
|
+
const REPEAT_INTERVAL_MS = 100;
|
|
14126
14304
|
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
14127
14305
|
__name: "KdsNumberInput",
|
|
14128
14306
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -14239,14 +14417,43 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14239
14417
|
localValue.value = value;
|
|
14240
14418
|
modelValue.value = numberParser.value.parseFromInput(value);
|
|
14241
14419
|
};
|
|
14420
|
+
const baseInput = useTemplateRef("baseInput");
|
|
14421
|
+
let repeatTimer = null;
|
|
14422
|
+
let isStepping = false;
|
|
14242
14423
|
const handleBlur = () => {
|
|
14424
|
+
if (isStepping) {
|
|
14425
|
+
baseInput.value?.focus();
|
|
14426
|
+
return;
|
|
14427
|
+
}
|
|
14243
14428
|
isFocused.value = false;
|
|
14244
14429
|
const parsed = numberParser.value.parseFromInput(localValue.value);
|
|
14245
14430
|
const normalized = clamp(parsed);
|
|
14246
14431
|
modelValue.value = normalized;
|
|
14247
14432
|
localValue.value = numberParser.value.formatForDisplay(normalized);
|
|
14248
14433
|
};
|
|
14249
|
-
const
|
|
14434
|
+
const stopRepeating = () => {
|
|
14435
|
+
if (repeatTimer !== null) {
|
|
14436
|
+
clearTimeout(repeatTimer);
|
|
14437
|
+
repeatTimer = null;
|
|
14438
|
+
}
|
|
14439
|
+
isStepping = false;
|
|
14440
|
+
};
|
|
14441
|
+
const startRepeating = (direction) => {
|
|
14442
|
+
stopRepeating();
|
|
14443
|
+
isStepping = true;
|
|
14444
|
+
adjustByStep(direction);
|
|
14445
|
+
repeatTimer = setTimeout(function tick() {
|
|
14446
|
+
adjustByStep(direction);
|
|
14447
|
+
repeatTimer = setTimeout(tick, REPEAT_INTERVAL_MS);
|
|
14448
|
+
}, REPEAT_INITIAL_DELAY_MS);
|
|
14449
|
+
};
|
|
14450
|
+
onBeforeUnmount(stopRepeating);
|
|
14451
|
+
const handleButtonClick = (direction, event) => {
|
|
14452
|
+
if (event.detail !== 0) {
|
|
14453
|
+
return;
|
|
14454
|
+
}
|
|
14455
|
+
adjustByStep(direction);
|
|
14456
|
+
};
|
|
14250
14457
|
__expose({
|
|
14251
14458
|
focus: () => baseInput.value?.focus()
|
|
14252
14459
|
});
|
|
@@ -14259,7 +14466,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14259
14466
|
}, slotProps, {
|
|
14260
14467
|
"model-value": localValue.value,
|
|
14261
14468
|
type: "text",
|
|
14262
|
-
inputmode: props.step
|
|
14469
|
+
inputmode: Number.isInteger(props.step) ? "numeric" : "decimal",
|
|
14263
14470
|
placeholder: props.placeholder,
|
|
14264
14471
|
disabled: props.disabled,
|
|
14265
14472
|
error: props.error,
|
|
@@ -14272,27 +14479,35 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
14272
14479
|
"aria-valuetext": ariaValuetext.value,
|
|
14273
14480
|
"onUpdate:modelValue": handleUpdateModelValue,
|
|
14274
14481
|
onKeydown: handleKeydown,
|
|
14275
|
-
onFocus: _cache[
|
|
14482
|
+
onFocus: _cache[4] || (_cache[4] = ($event) => isFocused.value = true),
|
|
14276
14483
|
onBlur: handleBlur
|
|
14277
14484
|
}), {
|
|
14278
14485
|
trailing: withCtx(() => [
|
|
14279
|
-
createVNode(_sfc_main$
|
|
14486
|
+
createVNode(_sfc_main$N, {
|
|
14280
14487
|
type: "button",
|
|
14281
14488
|
size: "xsmall",
|
|
14282
14489
|
variant: "outlined",
|
|
14283
14490
|
"leading-icon": "minus",
|
|
14284
14491
|
"aria-label": `Decrease ${props.label ?? props.ariaLabel}`,
|
|
14285
14492
|
disabled: !canDecrease.value,
|
|
14286
|
-
onClick: _cache[0] || (_cache[0] = ($event) =>
|
|
14493
|
+
onClick: _cache[0] || (_cache[0] = ($event) => handleButtonClick(-1, $event)),
|
|
14494
|
+
onPointerdown: _cache[1] || (_cache[1] = ($event) => startRepeating(-1)),
|
|
14495
|
+
onPointerup: stopRepeating,
|
|
14496
|
+
onPointerleave: stopRepeating,
|
|
14497
|
+
onPointercancel: stopRepeating
|
|
14287
14498
|
}, null, 8, ["aria-label", "disabled"]),
|
|
14288
|
-
createVNode(_sfc_main$
|
|
14499
|
+
createVNode(_sfc_main$N, {
|
|
14289
14500
|
type: "button",
|
|
14290
14501
|
size: "xsmall",
|
|
14291
14502
|
variant: "outlined",
|
|
14292
14503
|
"leading-icon": "plus",
|
|
14293
14504
|
"aria-label": `Increase ${props.label ?? props.ariaLabel}`,
|
|
14294
14505
|
disabled: !canIncrease.value,
|
|
14295
|
-
onClick: _cache[
|
|
14506
|
+
onClick: _cache[2] || (_cache[2] = ($event) => handleButtonClick(1, $event)),
|
|
14507
|
+
onPointerdown: _cache[3] || (_cache[3] = ($event) => startRepeating(1)),
|
|
14508
|
+
onPointerup: stopRepeating,
|
|
14509
|
+
onPointerleave: stopRepeating,
|
|
14510
|
+
onPointercancel: stopRepeating
|
|
14296
14511
|
}, null, 8, ["aria-label", "disabled"])
|
|
14297
14512
|
]),
|
|
14298
14513
|
_: 1
|
|
@@ -14469,7 +14684,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14469
14684
|
clearable: ""
|
|
14470
14685
|
}), {
|
|
14471
14686
|
trailing: withCtx(() => [
|
|
14472
|
-
createVNode(_sfc_main$
|
|
14687
|
+
createVNode(_sfc_main$L, {
|
|
14473
14688
|
modelValue: caseSensitive.value,
|
|
14474
14689
|
"onUpdate:modelValue": [
|
|
14475
14690
|
_cache[0] || (_cache[0] = ($event) => caseSensitive.value = $event),
|
|
@@ -14482,7 +14697,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14482
14697
|
"aria-label": caseSensitiveAriaLabel.value,
|
|
14483
14698
|
disabled: props.disabled
|
|
14484
14699
|
}, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
|
|
14485
|
-
createVNode(_sfc_main$
|
|
14700
|
+
createVNode(_sfc_main$L, {
|
|
14486
14701
|
modelValue: excludeMatches.value,
|
|
14487
14702
|
"onUpdate:modelValue": [
|
|
14488
14703
|
_cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
|
|
@@ -14495,7 +14710,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
14495
14710
|
"aria-label": excludeMatchesAriaLabel.value,
|
|
14496
14711
|
disabled: props.disabled
|
|
14497
14712
|
}, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
|
|
14498
|
-
createVNode(_sfc_main$
|
|
14713
|
+
createVNode(_sfc_main$L, {
|
|
14499
14714
|
modelValue: useRegex.value,
|
|
14500
14715
|
"onUpdate:modelValue": [
|
|
14501
14716
|
_cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
|
|
@@ -14553,6 +14768,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
14553
14768
|
const popoverEl = useTemplateRef("popover");
|
|
14554
14769
|
const listContainerEl = useTemplateRef("listContainer");
|
|
14555
14770
|
const resultsOpen = ref(false);
|
|
14771
|
+
const resultsId = useId();
|
|
14556
14772
|
const onKeyDown = (event) => {
|
|
14557
14773
|
if (resultsOpen.value) {
|
|
14558
14774
|
listContainerEl.value?.handleKeydown(event);
|
|
@@ -14622,12 +14838,16 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
14622
14838
|
"leading-icon": "search",
|
|
14623
14839
|
clearable: true,
|
|
14624
14840
|
style: popoverEl.value?.anchorStyle,
|
|
14841
|
+
role: __props.results ? "combobox" : void 0,
|
|
14625
14842
|
"aria-activedescendant": resultsOpen.value ? listContainerEl.value?.activeDescendant : void 0,
|
|
14843
|
+
"aria-haspopup": __props.results ? "listbox" : void 0,
|
|
14844
|
+
"aria-controls": __props.results ? unref(resultsId) : void 0,
|
|
14845
|
+
"aria-expanded": __props.results ? resultsOpen.value : void 0,
|
|
14626
14846
|
onKeydown: onKeyDown,
|
|
14627
14847
|
onFocus,
|
|
14628
14848
|
onBlur,
|
|
14629
14849
|
onClick
|
|
14630
|
-
}), null, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete", "style", "aria-activedescendant"]),
|
|
14850
|
+
}), null, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete", "style", "role", "aria-activedescendant", "aria-haspopup", "aria-controls", "aria-expanded"]),
|
|
14631
14851
|
__props.results ? (openBlock(), createBlock(unref(KdsPopover), {
|
|
14632
14852
|
key: 0,
|
|
14633
14853
|
ref: "popover",
|
|
@@ -14643,14 +14863,16 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
14643
14863
|
style: normalizeStyle(maxHeightStyle.value)
|
|
14644
14864
|
}, [
|
|
14645
14865
|
createVNode(unref(KdsListContainer), {
|
|
14866
|
+
id: unref(resultsId),
|
|
14646
14867
|
ref: "listContainer",
|
|
14647
14868
|
variant: "large",
|
|
14648
14869
|
"possible-values": __props.results,
|
|
14649
14870
|
"controlled-externally": "",
|
|
14871
|
+
"allow-no-selection": "",
|
|
14650
14872
|
"empty-text": "No search results",
|
|
14651
14873
|
"aria-label": "Search results list",
|
|
14652
14874
|
onItemClick: onResultClick
|
|
14653
|
-
}, null, 8, ["possible-values"])
|
|
14875
|
+
}, null, 8, ["id", "possible-values"])
|
|
14654
14876
|
], 4)
|
|
14655
14877
|
]),
|
|
14656
14878
|
_: 1
|
|
@@ -14662,7 +14884,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
14662
14884
|
}
|
|
14663
14885
|
});
|
|
14664
14886
|
|
|
14665
|
-
const KdsSearchInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__scopeId", "data-v-
|
|
14887
|
+
const KdsSearchInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__scopeId", "data-v-df327342"]]);
|
|
14666
14888
|
|
|
14667
14889
|
const _hoisted_1$c = ["rows", "placeholder", "disabled", "autocomplete"];
|
|
14668
14890
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
@@ -14818,7 +15040,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
14818
15040
|
onKeydown
|
|
14819
15041
|
}, [
|
|
14820
15042
|
props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$5, [
|
|
14821
|
-
createVNode(_sfc_main$
|
|
15043
|
+
createVNode(_sfc_main$I, {
|
|
14822
15044
|
accessory: props.accessory,
|
|
14823
15045
|
size: "medium"
|
|
14824
15046
|
}, null, 8, ["accessory"])
|
|
@@ -14938,14 +15160,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
14938
15160
|
"empty-text": props.emptyText,
|
|
14939
15161
|
"controlled-externally": "",
|
|
14940
15162
|
"aria-label": "Dropdown options",
|
|
14941
|
-
onItemClick: _cache[4] || (_cache[4] = ($event) => modelValue.value = $event)
|
|
15163
|
+
onItemClick: _cache[4] || (_cache[4] = ($event) => $event && (modelValue.value = $event))
|
|
14942
15164
|
}, null, 8, ["class", "possible-values", "loading", "empty-text"])
|
|
14943
15165
|
]);
|
|
14944
15166
|
};
|
|
14945
15167
|
}
|
|
14946
15168
|
});
|
|
14947
15169
|
|
|
14948
|
-
const DropdownContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-
|
|
15170
|
+
const DropdownContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-ceeaf8b9"]]);
|
|
14949
15171
|
|
|
14950
15172
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
14951
15173
|
__name: "KdsDropdown",
|
|
@@ -15231,7 +15453,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
15231
15453
|
"empty-text": props.emptyText,
|
|
15232
15454
|
"controlled-externally": "",
|
|
15233
15455
|
"aria-label": "Dropdown options",
|
|
15234
|
-
onItemClick
|
|
15456
|
+
onItemClick: _cache[4] || (_cache[4] = ($event) => $event && onItemClick($event))
|
|
15235
15457
|
}, null, 8, ["class", "possible-values", "loading", "empty-text"]),
|
|
15236
15458
|
!props.loading && visibleEnabledIds.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
15237
15459
|
createVNode(unref(KdsListItemButton), {
|
|
@@ -15246,7 +15468,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
15246
15468
|
}
|
|
15247
15469
|
});
|
|
15248
15470
|
|
|
15249
|
-
const MultiSelectDropdownContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__scopeId", "data-v-
|
|
15471
|
+
const MultiSelectDropdownContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__scopeId", "data-v-bb63f252"]]);
|
|
15250
15472
|
|
|
15251
15473
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
15252
15474
|
__name: "KdsMultiSelectDropdown",
|
|
@@ -15745,7 +15967,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
15745
15967
|
size: "medium"
|
|
15746
15968
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
15747
15969
|
createElementVNode("div", _hoisted_2$1, toDisplayString(props.headline), 1),
|
|
15748
|
-
createVNode(_sfc_main$
|
|
15970
|
+
createVNode(_sfc_main$N, {
|
|
15749
15971
|
"leading-icon": "x-close",
|
|
15750
15972
|
variant: "transparent",
|
|
15751
15973
|
size: "medium",
|
|
@@ -16018,7 +16240,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16018
16240
|
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
16019
16241
|
createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
|
|
16020
16242
|
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
16021
|
-
createVNode(_sfc_main$
|
|
16243
|
+
createVNode(_sfc_main$y, {
|
|
16022
16244
|
modelValue: askAgain.value,
|
|
16023
16245
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
16024
16246
|
label: unref(config).value.doNotAskAgain.label,
|
|
@@ -16033,7 +16255,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16033
16255
|
name: "footer",
|
|
16034
16256
|
fn: withCtx(() => [
|
|
16035
16257
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
|
|
16036
|
-
return openBlock(), createBlock(_sfc_main$
|
|
16258
|
+
return openBlock(), createBlock(_sfc_main$N, {
|
|
16037
16259
|
key: index,
|
|
16038
16260
|
destructive: button.destructive,
|
|
16039
16261
|
autofocus: button.autofocus,
|
|
@@ -16065,5 +16287,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16065
16287
|
|
|
16066
16288
|
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__scopeId", "data-v-41fc8d84"]]);
|
|
16067
16289
|
|
|
16068
|
-
export { KdsAvatar, KdsBadge, _sfc_main$
|
|
16290
|
+
export { KdsAvatar, KdsBadge, _sfc_main$N as KdsButton, KdsCardClickable, _sfc_main$y as KdsCheckbox, KdsCheckboxGroup, _sfc_main$o as KdsColorInput, KdsColorSwatch, KdsDataType, _sfc_main$k as KdsDateInput, _sfc_main$i as KdsDateTimeFormatInput, _sfc_main$b as KdsDropdown, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsInlineMessage, KdsLabel, _sfc_main$M as KdsLinkButton, KdsLiveStatus, KdsLoadingSpinner, KdsMenuButton, KdsModal, KdsModalLayout, _sfc_main$8 as KdsMultiSelectDropdown, _sfc_main$h as KdsNumberInput, _sfc_main$n as KdsPasswordInput, _sfc_main$g as KdsPatternInput, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, KdsSearchInput, KdsSubText, _sfc_main$q as KdsTextInput, KdsTextarea, _sfc_main$L as KdsToggleButton, _sfc_main$m as KdsUsernameInput, KdsValueSwitch, KdsVariableToggleButton, kdsAvatarSize, kdsAvatarSizes, kdsBadgeSize, kdsBadgeSizes, kdsBadgeVariant, kdsBadgeVariants, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCardVariant, kdsCardVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchSize, kdsColorSwatchSizes, kdsColorSwatchType, kdsColorSwatchTypes, kdsDarkModeType, kdsDarkModeTypes, kdsDataTypeSize, kdsDataTypeSizes, kdsDateFormatCategories, kdsDateFormatCategory, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsInlineMessageVariant, kdsInlineMessageVariants, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsPasswordInputAutocomplete, kdsPasswordInputAutocompletes, kdsPasswordInputVariant, kdsPasswordInputVariants, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsTemporalType, kdsTemporalTypes, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsUsernameInputAutocomplete, kdsUsernameInputAutocompletes, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
|
|
16069
16291
|
//# sourceMappingURL=index.js.map
|