@knime/kds-components 1.1.5 → 1.2.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/CHANGELOG.md +14 -0
- package/dist/index.css +486 -486
- package/dist/index.js +1405 -1410
- package/dist/index.js.map +1 -1
- package/dist/src/accessories/Avatar/types.d.ts +1 -1
- package/dist/src/accessories/Avatar/types.d.ts.map +1 -1
- package/dist/src/accessories/ColorSwatch/types.d.ts +1 -1
- package/dist/src/accessories/ColorSwatch/types.d.ts.map +1 -1
- package/dist/src/accessories/DonutChart/types.d.ts +3 -3
- package/dist/src/accessories/LiveStatus/types.d.ts +1 -1
- package/dist/src/accessories/LiveStatus/types.d.ts.map +1 -1
- package/dist/src/accessories/ProgressBar/KdsProgressBar.vue.d.ts +4 -4
- package/dist/src/accessories/ProgressBar/KdsProgressBar.vue.d.ts.map +1 -1
- package/dist/src/accessories/ProgressBar/types.d.ts +2 -2
- package/dist/src/accessories/ProgressBar/types.d.ts.map +1 -1
- package/dist/src/buttons/BaseButton.vue.d.ts +4 -4
- package/dist/src/buttons/KdsButton/KdsButton.vue.d.ts +4 -4
- package/dist/src/buttons/KdsMenuButton/KdsMenuButton.vue.d.ts +12 -12
- package/dist/src/buttons/KdsProgressButton/KdsProgressButton.vue.d.ts +4 -4
- package/dist/src/buttons/KdsProgressButton/KdsProgressButton.vue.d.ts.map +1 -1
- package/dist/src/buttons/KdsSplitButton/KdsSplitButton.vue.d.ts +4 -4
- package/dist/src/buttons/KdsToggleButton/KdsToggleButton.vue.d.ts +4 -4
- package/dist/src/buttons/KdsToggleButton/enums.d.ts +1 -1
- package/dist/src/buttons/ResponsiveButtonGroup/KdsResponsiveButtonGroup.vue.d.ts +16 -16
- package/dist/src/buttons/ResponsiveButtonGroup/mapping.d.ts +14 -14
- package/dist/src/buttons/ResponsiveButtonGroup/types.d.ts +1 -1
- package/dist/src/buttons/enums.d.ts +1 -1
- package/dist/src/buttons/links/KdsLinkButton/KdsLinkButton.vue.d.ts +4 -4
- package/dist/src/buttons/types.d.ts +1 -1
- package/dist/src/buttons/types.d.ts.map +1 -1
- package/dist/src/containers/ListItem/ListItemAccessory/types.d.ts +3 -3
- package/dist/src/containers/ListItem/ListItemAccessory/types.d.ts.map +1 -1
- package/dist/src/forms/Checkbox/BaseCheckbox.vue.d.ts +4 -4
- package/dist/src/forms/Checkbox/KdsCheckbox.vue.d.ts +4 -4
- package/dist/src/forms/Checkbox/types.d.ts +2 -2
- package/dist/src/forms/Checkbox/types.d.ts.map +1 -1
- package/dist/src/forms/RadioButton/ValueSwitchItem.vue.d.ts +4 -4
- package/dist/src/forms/RadioButton/types.d.ts +2 -2
- package/dist/src/forms/RadioButton/types.d.ts.map +1 -1
- package/dist/src/forms/inputs/ColorInput/KdsColorInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/DateInput/KdsDateInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/DateTimeFormatInput/KdsDateTimeFormatInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/IntervalInput/KdsIntervalInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/PasswordInput/KdsPasswordInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/PatternInput/KdsPatternInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/TimeInput/KdsTimeInput.vue.d.ts.map +1 -1
- package/dist/src/forms/inputs/TimeInput/TimePicker.vue.d.ts.map +1 -1
- package/dist/src/layouts/Card/enums.d.ts +1 -1
- package/dist/src/overlays/Modal/enums.d.ts +2 -2
- package/dist/src/overlays/Modal/useKdsDynamicModal.d.ts +6 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, effectScope, defineComponent, createPropsRestProxy, watch, computed, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, unref, Fragment, renderList, createBlock, normalizeStyle, createCommentVNode, shallowRef, markRaw, readonly, toRef, resolveDynamicComponent,
|
|
1
|
+
import { ref, effectScope, defineComponent, createPropsRestProxy, watch, computed, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, unref, Fragment, renderList, createBlock, normalizeStyle, createCommentVNode, shallowRef, markRaw, readonly, toRef, resolveDynamicComponent, withCtx, renderSlot, mergeProps, useCssVars, createVNode, useTemplateRef, nextTick, withModifiers, useModel, useId, mergeModels, createSlots, normalizeProps, guardReactiveProps, watchEffect, onMounted, createTextVNode, h as h$1, useSlots, getCurrentInstance, onUnmounted, inject, provide, resolveComponent, withKeys, useAttrs, defineAsyncComponent, toRefs, vShow, onBeforeUpdate, onBeforeUnmount, isRef, vModelText, toRaw } from 'vue';
|
|
2
2
|
import { useResizeObserver, useMutationObserver, useEventListener, useElementSize, onClickOutside, useVirtualList, useMousePressed, useTemplateRefsList, useLocalStorage, useDark, usePreferredDark } from '@vueuse/core';
|
|
3
3
|
|
|
4
4
|
import './index.css';function elementOverflowsHorizontally(element) {
|
|
@@ -249,7 +249,7 @@ const kdsAvatarSize = {
|
|
|
249
249
|
const kdsAvatarSizes = Object.values(kdsAvatarSize);
|
|
250
250
|
|
|
251
251
|
const _hoisted_1$1e = ["role", "aria-hidden", "aria-label", "data-color"];
|
|
252
|
-
const _hoisted_2$
|
|
252
|
+
const _hoisted_2$K = ["src"];
|
|
253
253
|
const _hoisted_3$w = {
|
|
254
254
|
key: 1,
|
|
255
255
|
class: "kds-avatar-initials",
|
|
@@ -261,7 +261,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
|
|
|
261
261
|
initials: {},
|
|
262
262
|
src: {},
|
|
263
263
|
size: { default: () => kdsAvatarSize.XLARGE },
|
|
264
|
-
|
|
264
|
+
tooltip: {}
|
|
265
265
|
},
|
|
266
266
|
setup(__props) {
|
|
267
267
|
const props = createPropsRestProxy(__props, ["size"]);
|
|
@@ -297,7 +297,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
|
|
|
297
297
|
const onImageError = () => {
|
|
298
298
|
imageLoadFailed.value = true;
|
|
299
299
|
};
|
|
300
|
-
const accessibleTitle = computed(() => props.
|
|
300
|
+
const accessibleTitle = computed(() => props.tooltip?.trim() ?? "");
|
|
301
301
|
const hasTitle = computed(() => accessibleTitle.value.length > 0);
|
|
302
302
|
const displayedInitials = computed(
|
|
303
303
|
() => (props.initials ?? "").trim().slice(0, 2).toUpperCase()
|
|
@@ -318,7 +318,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
|
|
|
318
318
|
alt: "",
|
|
319
319
|
"aria-hidden": "true",
|
|
320
320
|
onError: onImageError
|
|
321
|
-
}, null, 40, _hoisted_2$
|
|
321
|
+
}, null, 40, _hoisted_2$K)) : (openBlock(), createElementBlock("div", _hoisted_3$w, [
|
|
322
322
|
createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)
|
|
323
323
|
]))
|
|
324
324
|
], 10, _hoisted_1$1e)), [
|
|
@@ -336,10 +336,10 @@ const _export_sfc = (sfc, props) => {
|
|
|
336
336
|
return target;
|
|
337
337
|
};
|
|
338
338
|
|
|
339
|
-
const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["__scopeId", "data-v-
|
|
339
|
+
const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["__scopeId", "data-v-4da85666"]]);
|
|
340
340
|
|
|
341
341
|
const _hoisted_1$1d = ["aria-label"];
|
|
342
|
-
const _hoisted_2$
|
|
342
|
+
const _hoisted_2$J = { class: "avatars" };
|
|
343
343
|
const _hoisted_3$v = {
|
|
344
344
|
key: 0,
|
|
345
345
|
class: "more-count",
|
|
@@ -355,7 +355,7 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
355
355
|
setup(__props) {
|
|
356
356
|
const ariaLabel = computed(() => {
|
|
357
357
|
const prefix = "Avatar of ";
|
|
358
|
-
const users = __props.avatars.map((avatar) => avatar.
|
|
358
|
+
const users = __props.avatars.map((avatar) => avatar.tooltip ?? avatar.initials).join(", ");
|
|
359
359
|
const moreText = ` and ${__props.moreCount} more.`;
|
|
360
360
|
return [prefix, users, __props.moreCount > 0 ? moreText : "."].join("");
|
|
361
361
|
});
|
|
@@ -365,7 +365,7 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
365
365
|
role: "group",
|
|
366
366
|
"aria-label": ariaLabel.value
|
|
367
367
|
}, [
|
|
368
|
-
createElementVNode("div", _hoisted_2$
|
|
368
|
+
createElementVNode("div", _hoisted_2$J, [
|
|
369
369
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.avatars, (avatar, index) => {
|
|
370
370
|
return openBlock(), createBlock(KdsAvatar, {
|
|
371
371
|
key: index,
|
|
@@ -374,9 +374,9 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
374
374
|
class: "avatar",
|
|
375
375
|
size: __props.size,
|
|
376
376
|
initials: avatar.initials,
|
|
377
|
-
|
|
377
|
+
tooltip: avatar.tooltip,
|
|
378
378
|
src: avatar.src
|
|
379
|
-
}, null, 8, ["style", "size", "initials", "
|
|
379
|
+
}, null, 8, ["style", "size", "initials", "tooltip", "src"]);
|
|
380
380
|
}), 128))
|
|
381
381
|
]),
|
|
382
382
|
__props.moreCount > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$v, " +" + toDisplayString(__props.moreCount), 1)) : createCommentVNode("", true)
|
|
@@ -385,7 +385,7 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
387
|
|
|
388
|
-
const KdsAvatarCounter = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["__scopeId", "data-v-
|
|
388
|
+
const KdsAvatarCounter = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["__scopeId", "data-v-d3a7b887"]]);
|
|
389
389
|
|
|
390
390
|
const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
391
391
|
const v = glob$1[path$13];
|
|
@@ -938,226 +938,338 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
938
938
|
|
|
939
939
|
const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["__scopeId", "data-v-df64f7cf"]]);
|
|
940
940
|
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
|
|
941
|
+
const isMac = () => navigator?.userAgent?.toLowerCase()?.includes("mac");
|
|
942
|
+
|
|
943
|
+
const createUnwrappedPromise = () => {
|
|
944
|
+
let resolve = () => {
|
|
945
|
+
};
|
|
946
|
+
let reject = () => {
|
|
947
|
+
};
|
|
948
|
+
const promise = new Promise((res, rej) => {
|
|
949
|
+
resolve = res;
|
|
950
|
+
reject = rej;
|
|
951
|
+
});
|
|
952
|
+
return { resolve, reject, promise };
|
|
944
953
|
};
|
|
945
|
-
const kdsProgressBarSizes = Object.values(kdsProgressBarSize);
|
|
946
954
|
|
|
947
|
-
|
|
948
|
-
|
|
955
|
+
function sleep(ms) {
|
|
956
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
const getMetaOrCtrlKey = () => {
|
|
960
|
+
return isMac() ? "metaKey" : "ctrlKey";
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
const _hoisted_1$19 = {
|
|
949
964
|
key: 0,
|
|
950
|
-
class: "
|
|
951
|
-
"aria-hidden": "true"
|
|
965
|
+
class: "label"
|
|
952
966
|
};
|
|
953
967
|
const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
954
|
-
__name: "
|
|
968
|
+
__name: "BaseButton",
|
|
955
969
|
props: {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
970
|
+
dataTestId: {},
|
|
971
|
+
size: { default: "medium" },
|
|
972
|
+
disabled: { type: Boolean, default: false },
|
|
973
|
+
tooltip: {},
|
|
974
|
+
variant: {},
|
|
975
|
+
label: {},
|
|
976
|
+
leadingIcon: {},
|
|
977
|
+
trailingIcon: {},
|
|
978
|
+
ariaLabel: {},
|
|
979
|
+
destructive: { type: Boolean, default: false },
|
|
980
|
+
success: { type: Boolean, default: false },
|
|
981
|
+
error: { type: Boolean, default: false },
|
|
982
|
+
toggled: { type: Boolean, default: false },
|
|
983
|
+
removeBorderRadius: { default: () => void 0 },
|
|
984
|
+
component: { default: "button" }
|
|
960
985
|
},
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
986
|
+
emits: ["click"],
|
|
987
|
+
setup(__props, { emit: __emit }) {
|
|
988
|
+
const props = createPropsRestProxy(__props, ["component", "size", "destructive", "success", "error", "disabled", "toggled", "removeBorderRadius"]);
|
|
989
|
+
const emit = __emit;
|
|
990
|
+
const classes = computed(() => [
|
|
991
|
+
"button",
|
|
992
|
+
__props.size,
|
|
993
|
+
props.variant,
|
|
994
|
+
{ destructive: __props.destructive },
|
|
995
|
+
{ disabled: __props.disabled },
|
|
996
|
+
{ toggled: __props.toggled },
|
|
997
|
+
{ success: __props.success },
|
|
998
|
+
{ error: __props.error },
|
|
999
|
+
__props.removeBorderRadius ? `remove-border-radius-${__props.removeBorderRadius}` : void 0
|
|
1000
|
+
]);
|
|
1001
|
+
const iconSize = computed(() => {
|
|
1002
|
+
if (__props.size === "xsmall") {
|
|
1003
|
+
return "small";
|
|
1004
|
+
} else {
|
|
1005
|
+
return __props.size;
|
|
965
1006
|
}
|
|
966
|
-
return Math.min(Math.max(__props.percentage, 0), 100);
|
|
967
1007
|
});
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
return customTitle;
|
|
1008
|
+
function onClick(e) {
|
|
1009
|
+
if (!__props.disabled) {
|
|
1010
|
+
emit("click", e);
|
|
972
1011
|
}
|
|
973
|
-
|
|
974
|
-
});
|
|
1012
|
+
}
|
|
975
1013
|
return (_ctx, _cache) => {
|
|
976
|
-
return openBlock(),
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1014
|
+
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(__props.component), {
|
|
1015
|
+
type: __props.component === "button" ? "button" : void 0,
|
|
1016
|
+
class: normalizeClass(classes.value),
|
|
1017
|
+
disabled: __props.disabled,
|
|
1018
|
+
"aria-label": props.ariaLabel,
|
|
1019
|
+
"data-test-id": props.dataTestId,
|
|
1020
|
+
onClick: _cache[0] || (_cache[0] = ($event) => onClick($event))
|
|
1021
|
+
}, {
|
|
1022
|
+
default: withCtx(() => [
|
|
1023
|
+
renderSlot(_ctx.$slots, "leading", {}, () => [
|
|
1024
|
+
props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
1025
|
+
key: 0,
|
|
1026
|
+
name: props.leadingIcon,
|
|
1027
|
+
size: iconSize.value
|
|
1028
|
+
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
1029
|
+
], true),
|
|
1030
|
+
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$19, toDisplayString(props.label), 1)) : createCommentVNode("", true),
|
|
1031
|
+
props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
|
|
1032
|
+
key: 1,
|
|
1033
|
+
name: props.trailingIcon,
|
|
1034
|
+
size: iconSize.value
|
|
1035
|
+
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
990
1036
|
]),
|
|
991
|
-
|
|
992
|
-
],
|
|
1037
|
+
_: 3
|
|
1038
|
+
}, 8, ["type", "class", "disabled", "aria-label", "data-test-id"])), [
|
|
1039
|
+
[unref(vKdsTooltip), props.tooltip]
|
|
1040
|
+
]);
|
|
993
1041
|
};
|
|
994
1042
|
}
|
|
995
1043
|
});
|
|
996
1044
|
|
|
997
|
-
const
|
|
998
|
-
|
|
999
|
-
const kdsColorSwatchType = {
|
|
1000
|
-
LEARNER: "learner",
|
|
1001
|
-
MANIPULATOR: "manipulator",
|
|
1002
|
-
PREDICTOR: "predictor",
|
|
1003
|
-
SINK: "sink",
|
|
1004
|
-
SOURCE: "source",
|
|
1005
|
-
VISUALIZER: "visualizer",
|
|
1006
|
-
OTHER: "other"
|
|
1007
|
-
};
|
|
1008
|
-
const kdsColorSwatchTypes = Object.values(kdsColorSwatchType);
|
|
1009
|
-
const kdsColorSwatchSize = {
|
|
1010
|
-
SMALL: "small",
|
|
1011
|
-
MEDIUM: "medium",
|
|
1012
|
-
LARGE: "large"
|
|
1013
|
-
};
|
|
1014
|
-
const kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
|
|
1045
|
+
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["__scopeId", "data-v-6fbab10f"]]);
|
|
1015
1046
|
|
|
1016
|
-
const _hoisted_1$18 = ["role", "aria-hidden", "aria-label"];
|
|
1017
|
-
const RGBA_SHORT_HEX_LENGTH = 4;
|
|
1018
|
-
const RGBA_LONG_HEX_LENGTH = 8;
|
|
1019
|
-
const ALPHA_NIBBLE_INDEX = 3;
|
|
1020
|
-
const ALPHA_BYTE_START = 6;
|
|
1021
|
-
const RGB_SHORT_HEX_LENGTH = 3;
|
|
1022
|
-
const RGB_LONG_HEX_LENGTH = 6;
|
|
1023
1047
|
const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
1024
|
-
__name: "
|
|
1048
|
+
__name: "KdsButton",
|
|
1025
1049
|
props: {
|
|
1026
|
-
|
|
1027
|
-
size: {
|
|
1028
|
-
|
|
1050
|
+
dataTestId: {},
|
|
1051
|
+
size: {},
|
|
1052
|
+
disabled: { type: Boolean },
|
|
1053
|
+
tooltip: {},
|
|
1054
|
+
variant: { default: "filled" },
|
|
1055
|
+
label: {},
|
|
1056
|
+
leadingIcon: {},
|
|
1057
|
+
trailingIcon: {},
|
|
1058
|
+
ariaLabel: {},
|
|
1059
|
+
destructive: { type: Boolean }
|
|
1029
1060
|
},
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1034
|
-
manipulator: "var(--kds-color-nodes-and-variables-manipulator)",
|
|
1035
|
-
predictor: "var(--kds-color-nodes-and-variables-predictor)",
|
|
1036
|
-
sink: "var(--kds-color-nodes-and-variables-sink)",
|
|
1037
|
-
source: "var(--kds-color-nodes-and-variables-source)",
|
|
1038
|
-
visualizer: "var(--kds-color-nodes-and-variables-visualizer)",
|
|
1039
|
-
other: "var(--kds-color-nodes-and-variables-other)"
|
|
1040
|
-
};
|
|
1041
|
-
const isKdsColorSwatchType = (value) => Object.hasOwn(typeToTokenColor, value);
|
|
1042
|
-
const isTransparentAlphaHexColor = (value) => {
|
|
1043
|
-
const withoutHash = value.startsWith("#") ? value.slice(1) : value;
|
|
1044
|
-
if (withoutHash.length === RGBA_SHORT_HEX_LENGTH) {
|
|
1045
|
-
return withoutHash[ALPHA_NIBBLE_INDEX].toLowerCase() !== "f";
|
|
1046
|
-
}
|
|
1047
|
-
if (withoutHash.length === RGBA_LONG_HEX_LENGTH) {
|
|
1048
|
-
return withoutHash.slice(ALPHA_BYTE_START).toLowerCase() !== "ff";
|
|
1049
|
-
}
|
|
1050
|
-
return false;
|
|
1051
|
-
};
|
|
1052
|
-
const toOpaqueHexColor = (value) => {
|
|
1053
|
-
const withoutHash = value.startsWith("#") ? value.slice(1) : value;
|
|
1054
|
-
if (withoutHash.length === RGBA_SHORT_HEX_LENGTH) {
|
|
1055
|
-
return `#${withoutHash.slice(0, RGB_SHORT_HEX_LENGTH)}`;
|
|
1056
|
-
}
|
|
1057
|
-
if (withoutHash.length === RGBA_LONG_HEX_LENGTH) {
|
|
1058
|
-
return `#${withoutHash.slice(0, RGB_LONG_HEX_LENGTH)}`;
|
|
1059
|
-
}
|
|
1060
|
-
return value;
|
|
1061
|
-
};
|
|
1062
|
-
const backgroundColor = computed(() => {
|
|
1063
|
-
if (isKdsColorSwatchType(props.color)) {
|
|
1064
|
-
return typeToTokenColor[props.color];
|
|
1065
|
-
}
|
|
1066
|
-
return props.color;
|
|
1067
|
-
});
|
|
1068
|
-
const showAlphaPreview = computed(
|
|
1069
|
-
() => !isKdsColorSwatchType(props.color) && isTransparentAlphaHexColor(props.color)
|
|
1070
|
-
);
|
|
1071
|
-
const swatchStyle = computed(() => {
|
|
1072
|
-
if (!showAlphaPreview.value) {
|
|
1073
|
-
return { backgroundColor: backgroundColor.value };
|
|
1074
|
-
}
|
|
1075
|
-
const opaqueColor = toOpaqueHexColor(props.color);
|
|
1076
|
-
return {
|
|
1077
|
-
backgroundImage: `
|
|
1078
|
-
linear-gradient(to right, ${backgroundColor.value} 0 50%, ${opaqueColor} 50% 100%),
|
|
1079
|
-
repeating-conic-gradient(
|
|
1080
|
-
var(--kds-color-background-neutral-active) 0 25%,
|
|
1081
|
-
var(--kds-color-surface-default) 0 50%
|
|
1082
|
-
)
|
|
1083
|
-
`,
|
|
1084
|
-
backgroundSize: "100% 100%, var(--kds-color-swatch-checker-size) var(--kds-color-swatch-checker-size)",
|
|
1085
|
-
backgroundPosition: "0 0, 0 0"
|
|
1086
|
-
};
|
|
1087
|
-
});
|
|
1088
|
-
const accessibleTitle = computed(() => props.title?.trim() ?? "");
|
|
1089
|
-
const hasTitle = computed(() => accessibleTitle.value.length > 0);
|
|
1061
|
+
emits: ["click"],
|
|
1062
|
+
setup(__props, { emit: __emit }) {
|
|
1063
|
+
const props = createPropsRestProxy(__props, ["variant"]);
|
|
1064
|
+
const emit = __emit;
|
|
1090
1065
|
return (_ctx, _cache) => {
|
|
1091
|
-
return
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
"aria-hidden": hasTitle.value ? void 0 : "true",
|
|
1096
|
-
"aria-label": hasTitle.value ? accessibleTitle.value : void 0
|
|
1097
|
-
}, null, 14, _hoisted_1$18)), [
|
|
1098
|
-
[unref(vKdsTooltip), hasTitle.value ? accessibleTitle.value : void 0]
|
|
1099
|
-
]);
|
|
1066
|
+
return openBlock(), createBlock(BaseButton, mergeProps(props, {
|
|
1067
|
+
variant: __props.variant,
|
|
1068
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event))
|
|
1069
|
+
}), null, 16, ["variant"]);
|
|
1100
1070
|
};
|
|
1101
1071
|
}
|
|
1102
1072
|
});
|
|
1103
1073
|
|
|
1104
|
-
const
|
|
1074
|
+
const kdsModalClosedBy = {
|
|
1075
|
+
ANY: "any",
|
|
1076
|
+
CLOSEREQUEST: "closerequest",
|
|
1077
|
+
NONE: "none"
|
|
1078
|
+
};
|
|
1079
|
+
const kdsModalClosedByOptions = Object.values(kdsModalClosedBy);
|
|
1080
|
+
const kdsModalWidth = {
|
|
1081
|
+
SMALL: "small",
|
|
1082
|
+
MEDIUM: "medium",
|
|
1083
|
+
LARGE: "large",
|
|
1084
|
+
XLARGE: "xlarge",
|
|
1085
|
+
FULL: "full"
|
|
1086
|
+
};
|
|
1087
|
+
const kdsModalWidthSizes = Object.values(kdsModalWidth);
|
|
1088
|
+
const kdsModalHeight = {
|
|
1089
|
+
AUTO: "auto",
|
|
1090
|
+
FULL: "full"
|
|
1091
|
+
};
|
|
1092
|
+
const kdsModalHeightSizes = Object.values(kdsModalHeight);
|
|
1093
|
+
const kdsModalVariant = {
|
|
1094
|
+
PADDED: "padded",
|
|
1095
|
+
PLAIN: "plain"
|
|
1096
|
+
};
|
|
1097
|
+
const kdsModalVariants = Object.values(kdsModalVariant);
|
|
1098
|
+
({
|
|
1099
|
+
variant: kdsModalVariant.PADDED});
|
|
1100
|
+
({
|
|
1101
|
+
height: kdsModalHeight.AUTO,
|
|
1102
|
+
width: kdsModalWidth.MEDIUM,
|
|
1103
|
+
closedby: kdsModalClosedBy.CLOSEREQUEST});
|
|
1105
1104
|
|
|
1106
|
-
const _hoisted_1$
|
|
1107
|
-
const _hoisted_2$I = {
|
|
1105
|
+
const _hoisted_1$18 = { class: "modal-header" };
|
|
1106
|
+
const _hoisted_2$I = { class: "modal-header-headline" };
|
|
1107
|
+
const _hoisted_3$u = ["data-variant"];
|
|
1108
|
+
const _hoisted_4$q = {
|
|
1108
1109
|
key: 0,
|
|
1109
|
-
class: "
|
|
1110
|
+
class: "modal-footer"
|
|
1110
1111
|
};
|
|
1111
1112
|
const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
1112
|
-
|
|
1113
|
+
...{ inheritAttrs: false },
|
|
1114
|
+
__name: "KdsModalLayout",
|
|
1113
1115
|
props: {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1116
|
+
headline: { default: "" },
|
|
1117
|
+
variant: { default: () => kdsModalVariant.PADDED },
|
|
1118
|
+
leadingIcon: {},
|
|
1119
|
+
overflow: { default: "auto" },
|
|
1120
|
+
onClose: { type: Function }
|
|
1118
1121
|
},
|
|
1119
1122
|
setup(__props) {
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
+
useCssVars((_ctx) => ({
|
|
1124
|
+
"v0cb7acbb": _ctx.overflow
|
|
1125
|
+
}));
|
|
1126
|
+
const props = createPropsRestProxy(__props, ["headline", "variant", "overflow"]);
|
|
1127
|
+
return (_ctx, _cache) => {
|
|
1128
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
1129
|
+
createElementVNode("header", _hoisted_1$18, [
|
|
1130
|
+
props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
1131
|
+
key: 0,
|
|
1132
|
+
name: props.leadingIcon,
|
|
1133
|
+
size: "medium"
|
|
1134
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
1135
|
+
createElementVNode("div", _hoisted_2$I, toDisplayString(__props.headline), 1),
|
|
1136
|
+
createVNode(_sfc_main$1I, {
|
|
1137
|
+
"leading-icon": "x-close",
|
|
1138
|
+
variant: "transparent",
|
|
1139
|
+
size: "medium",
|
|
1140
|
+
tooltip: "Close",
|
|
1141
|
+
ariaLabel: "Close",
|
|
1142
|
+
onClick: props.onClose
|
|
1143
|
+
}, null, 8, ["onClick"])
|
|
1144
|
+
]),
|
|
1145
|
+
createElementVNode("div", {
|
|
1146
|
+
class: "modal-body",
|
|
1147
|
+
"data-variant": __props.variant
|
|
1148
|
+
}, [
|
|
1149
|
+
renderSlot(_ctx.$slots, "body", {}, void 0, true)
|
|
1150
|
+
], 8, _hoisted_3$u),
|
|
1151
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4$q, [
|
|
1152
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1153
|
+
])) : createCommentVNode("", true)
|
|
1154
|
+
], 64);
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
});
|
|
1158
|
+
|
|
1159
|
+
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["__scopeId", "data-v-5129eb03"]]);
|
|
1160
|
+
|
|
1161
|
+
const _hoisted_1$17 = ["closedby"];
|
|
1162
|
+
const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
1163
|
+
__name: "KdsModal",
|
|
1164
|
+
props: {
|
|
1165
|
+
leadingIcon: {},
|
|
1166
|
+
headline: { default: "" },
|
|
1167
|
+
variant: { default: () => kdsModalVariant.PADDED },
|
|
1168
|
+
width: { default: () => kdsModalWidth.MEDIUM },
|
|
1169
|
+
height: { default: () => kdsModalHeight.AUTO },
|
|
1170
|
+
active: { type: Boolean, default: false },
|
|
1171
|
+
closedby: { default: () => kdsModalClosedBy.CLOSEREQUEST },
|
|
1172
|
+
overflow: { default: "auto" }
|
|
1173
|
+
},
|
|
1174
|
+
emits: ["close", "closed"],
|
|
1175
|
+
setup(__props, { emit: __emit }) {
|
|
1176
|
+
useCssVars((_ctx) => ({
|
|
1177
|
+
"v8f271084": _ctx.overflow
|
|
1178
|
+
}));
|
|
1179
|
+
const emit = __emit;
|
|
1180
|
+
const dialog = useTemplateRef("dialogElement");
|
|
1181
|
+
const onClose = (event) => {
|
|
1182
|
+
emit("close", event);
|
|
1183
|
+
};
|
|
1184
|
+
watch(
|
|
1185
|
+
() => __props.active,
|
|
1186
|
+
async (isActive) => {
|
|
1187
|
+
if (isActive) {
|
|
1188
|
+
await nextTick();
|
|
1189
|
+
dialog.value?.showModal();
|
|
1190
|
+
} else {
|
|
1191
|
+
dialog.value?.close();
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
{ immediate: true }
|
|
1195
|
+
);
|
|
1196
|
+
const renderDialog = ref(__props.active);
|
|
1197
|
+
const removeDialog = () => {
|
|
1198
|
+
if (!renderDialog.value) {
|
|
1199
|
+
return;
|
|
1200
|
+
}
|
|
1201
|
+
renderDialog.value = false;
|
|
1202
|
+
emit("closed");
|
|
1203
|
+
};
|
|
1204
|
+
watch(
|
|
1205
|
+
() => __props.active,
|
|
1206
|
+
async (value, lastValue) => {
|
|
1207
|
+
if (value === false && lastValue === true) {
|
|
1208
|
+
if (dialog.value) {
|
|
1209
|
+
Promise.all(
|
|
1210
|
+
dialog.value.getAnimations({ subtree: true }).map((animation) => animation.finished)
|
|
1211
|
+
).then(removeDialog).catch((error) => {
|
|
1212
|
+
if (error.name === "AbortError") {
|
|
1213
|
+
removeDialog();
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
throw error;
|
|
1217
|
+
});
|
|
1218
|
+
await sleep(350);
|
|
1219
|
+
removeDialog();
|
|
1220
|
+
} else {
|
|
1221
|
+
removeDialog();
|
|
1222
|
+
}
|
|
1223
|
+
} else {
|
|
1224
|
+
renderDialog.value = value;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1123
1227
|
);
|
|
1124
1228
|
return (_ctx, _cache) => {
|
|
1125
|
-
return
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1229
|
+
return renderDialog.value ? (openBlock(), createElementBlock("dialog", {
|
|
1230
|
+
key: 0,
|
|
1231
|
+
ref: "dialogElement",
|
|
1232
|
+
class: normalizeClass([
|
|
1233
|
+
"kds-modal",
|
|
1234
|
+
`width-${__props.width}`,
|
|
1235
|
+
`height-${__props.height}`,
|
|
1236
|
+
`overflow-${__props.overflow}`
|
|
1237
|
+
]),
|
|
1238
|
+
closedby: __props.closedby,
|
|
1239
|
+
onCancel: withModifiers(onClose, ["prevent"])
|
|
1129
1240
|
}, [
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1241
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1242
|
+
headline: __props.headline,
|
|
1243
|
+
leadingIcon: __props.leadingIcon,
|
|
1244
|
+
variant: __props.variant,
|
|
1245
|
+
overflow: __props.overflow,
|
|
1246
|
+
onClose
|
|
1247
|
+
}, () => [
|
|
1248
|
+
createVNode(KdsModalLayout, {
|
|
1249
|
+
headline: __props.headline,
|
|
1250
|
+
"leading-icon": __props.leadingIcon,
|
|
1251
|
+
variant: __props.variant,
|
|
1252
|
+
overflow: __props.overflow,
|
|
1253
|
+
onClose
|
|
1254
|
+
}, {
|
|
1255
|
+
body: withCtx(() => [
|
|
1256
|
+
renderSlot(_ctx.$slots, "body", {}, void 0, true)
|
|
1257
|
+
]),
|
|
1258
|
+
footer: withCtx(() => [
|
|
1259
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1260
|
+
]),
|
|
1261
|
+
_: 3
|
|
1262
|
+
}, 8, ["headline", "leading-icon", "variant", "overflow"])
|
|
1263
|
+
], true)
|
|
1264
|
+
], 42, _hoisted_1$17)) : createCommentVNode("", true);
|
|
1139
1265
|
};
|
|
1140
1266
|
}
|
|
1141
1267
|
});
|
|
1142
1268
|
|
|
1143
|
-
const
|
|
1144
|
-
|
|
1145
|
-
const kdsLiveStatusStatus = {
|
|
1146
|
-
RED: "red",
|
|
1147
|
-
ORANGE: "orange",
|
|
1148
|
-
GREEN: "green",
|
|
1149
|
-
DISABLED: "disabled"
|
|
1150
|
-
};
|
|
1151
|
-
const kdsLiveStatusStatuses = Object.values(kdsLiveStatusStatus);
|
|
1152
|
-
const kdsLiveStatusSize = {
|
|
1153
|
-
LARGE: "large",
|
|
1154
|
-
MEDIUM: "medium",
|
|
1155
|
-
SMALL: "small"
|
|
1156
|
-
};
|
|
1157
|
-
const kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
|
|
1269
|
+
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["__scopeId", "data-v-1f306093"]]);
|
|
1158
1270
|
|
|
1159
1271
|
const _hoisted_1$16 = ["data-style"];
|
|
1160
|
-
const _sfc_main$
|
|
1272
|
+
const _sfc_main$1F = /* @__PURE__ */ defineComponent({
|
|
1161
1273
|
__name: "KdsLoadingSpinner",
|
|
1162
1274
|
props: {
|
|
1163
1275
|
size: { default: "medium" },
|
|
@@ -1187,1269 +1299,1153 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
1187
1299
|
}
|
|
1188
1300
|
});
|
|
1189
1301
|
|
|
1190
|
-
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1191
|
-
|
|
1192
|
-
const kdsLoadingSpinnerVariant = {
|
|
1193
|
-
ON_PRIMARY: "onPrimary",
|
|
1194
|
-
ON_SURFACE: "onSurface"
|
|
1195
|
-
};
|
|
1196
|
-
const kdsLoadingSpinnerVariants = Object.values(
|
|
1197
|
-
kdsLoadingSpinnerVariant
|
|
1198
|
-
);
|
|
1302
|
+
const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-54835dc0"]]);
|
|
1199
1303
|
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1304
|
+
const _hoisted_1$15 = ["id"];
|
|
1305
|
+
const _hoisted_2$H = { class: "subtext-text" };
|
|
1306
|
+
const _sfc_main$1E = /* @__PURE__ */ defineComponent({
|
|
1307
|
+
__name: "KdsSubText",
|
|
1202
1308
|
props: {
|
|
1203
|
-
|
|
1309
|
+
id: {},
|
|
1310
|
+
subText: {},
|
|
1311
|
+
error: { type: Boolean, default: false },
|
|
1312
|
+
validating: { type: Boolean, default: false },
|
|
1313
|
+
preserveSubTextSpace: { type: Boolean, default: false }
|
|
1204
1314
|
},
|
|
1205
1315
|
setup(__props) {
|
|
1316
|
+
const props = createPropsRestProxy(__props, ["error", "validating", "preserveSubTextSpace"]);
|
|
1206
1317
|
return (_ctx, _cache) => {
|
|
1207
|
-
return openBlock(),
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
class:
|
|
1211
|
-
|
|
1318
|
+
return props.subText || __props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", {
|
|
1319
|
+
key: 0,
|
|
1320
|
+
id: props.id,
|
|
1321
|
+
class: normalizeClass({
|
|
1322
|
+
subtext: true,
|
|
1323
|
+
error: __props.error
|
|
1324
|
+
})
|
|
1325
|
+
}, [
|
|
1326
|
+
__props.error && props.subText ? (openBlock(), createBlock(KdsIcon, {
|
|
1327
|
+
key: 0,
|
|
1328
|
+
name: "circle-error",
|
|
1329
|
+
size: "small",
|
|
1330
|
+
"aria-label": "Error"
|
|
1331
|
+
})) : __props.validating && props.subText ? (openBlock(), createBlock(KdsLoadingSpinner, {
|
|
1332
|
+
key: 1,
|
|
1333
|
+
size: "small",
|
|
1334
|
+
variant: "onSurface",
|
|
1335
|
+
"aria-hidden": "true"
|
|
1336
|
+
})) : createCommentVNode("", true),
|
|
1337
|
+
createElementVNode("span", _hoisted_2$H, toDisplayString(props.subText), 1)
|
|
1338
|
+
], 10, _hoisted_1$15)) : createCommentVNode("", true);
|
|
1212
1339
|
};
|
|
1213
1340
|
}
|
|
1214
1341
|
});
|
|
1215
1342
|
|
|
1216
|
-
const
|
|
1343
|
+
const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["__scopeId", "data-v-2e6ba10c"]]);
|
|
1217
1344
|
|
|
1218
|
-
const _hoisted_1$
|
|
1219
|
-
const _hoisted_2$
|
|
1220
|
-
const _hoisted_3$
|
|
1221
|
-
const _hoisted_4$q = ["r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "transform"];
|
|
1222
|
-
const _hoisted_5$g = ["r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "transform"];
|
|
1223
|
-
const _hoisted_6$b = {
|
|
1345
|
+
const _hoisted_1$14 = ["disabled", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
|
|
1346
|
+
const _hoisted_2$G = { class: "control" };
|
|
1347
|
+
const _hoisted_3$t = {
|
|
1224
1348
|
key: 0,
|
|
1225
|
-
class: "
|
|
1349
|
+
class: "content"
|
|
1226
1350
|
};
|
|
1227
|
-
const
|
|
1228
|
-
const
|
|
1351
|
+
const _hoisted_4$p = { class: "label" };
|
|
1352
|
+
const _hoisted_5$g = ["id"];
|
|
1353
|
+
const _hoisted_6$b = {
|
|
1229
1354
|
key: 0,
|
|
1230
|
-
class: "
|
|
1355
|
+
class: "subtext-wrapper"
|
|
1231
1356
|
};
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1357
|
+
const _sfc_main$1D = /* @__PURE__ */ defineComponent({
|
|
1358
|
+
__name: "BaseCheckbox",
|
|
1359
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1360
|
+
disabled: { type: Boolean, default: false },
|
|
1361
|
+
error: { type: Boolean, default: false },
|
|
1362
|
+
subText: {},
|
|
1363
|
+
preserveSubTextSpace: { type: Boolean },
|
|
1364
|
+
label: {},
|
|
1365
|
+
tooltip: {},
|
|
1366
|
+
helperText: {}
|
|
1367
|
+
}, {
|
|
1368
|
+
"modelValue": { default: false },
|
|
1369
|
+
"modelModifiers": {}
|
|
1370
|
+
}),
|
|
1371
|
+
emits: ["update:modelValue"],
|
|
1245
1372
|
setup(__props) {
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
const r = computed(() => radius - strokeWidth.value / 2);
|
|
1256
|
-
const diameter = computed(() => 2 * radius);
|
|
1257
|
-
const viewBox = computed(() => `0 0 ${diameter.value} ${diameter.value}`);
|
|
1258
|
-
const circumference = computed(() => 2 * Math.PI * r.value);
|
|
1259
|
-
const calcStrokeDashOffset = (value) => {
|
|
1260
|
-
if (__props.maxValue <= 0 || !Number.isFinite(__props.maxValue)) {
|
|
1261
|
-
return circumference.value;
|
|
1373
|
+
const props = createPropsRestProxy(__props, ["disabled", "error"]);
|
|
1374
|
+
const modelValue = useModel(__props, "modelValue");
|
|
1375
|
+
const helperId = useId();
|
|
1376
|
+
const descriptionId = useId();
|
|
1377
|
+
const isChecked = computed(() => modelValue.value === true);
|
|
1378
|
+
const isIndeterminate = computed(() => modelValue.value === "indeterminate");
|
|
1379
|
+
const icon = computed(() => {
|
|
1380
|
+
if (isChecked.value) {
|
|
1381
|
+
return "checkmark";
|
|
1262
1382
|
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1383
|
+
if (isIndeterminate.value) {
|
|
1384
|
+
return "minus";
|
|
1385
|
+
}
|
|
1386
|
+
return null;
|
|
1387
|
+
});
|
|
1388
|
+
const ariaChecked = computed(() => {
|
|
1389
|
+
if (isIndeterminate.value) {
|
|
1390
|
+
return "mixed";
|
|
1391
|
+
}
|
|
1392
|
+
return isChecked.value;
|
|
1393
|
+
});
|
|
1394
|
+
const ariaDescribedBy = computed(() => {
|
|
1395
|
+
const ids = [];
|
|
1396
|
+
if (props.helperText) {
|
|
1397
|
+
ids.push(helperId);
|
|
1398
|
+
}
|
|
1399
|
+
if (props.subText) {
|
|
1400
|
+
ids.push(descriptionId);
|
|
1401
|
+
}
|
|
1402
|
+
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
1403
|
+
});
|
|
1404
|
+
const handleClick = () => {
|
|
1405
|
+
if (__props.disabled) {
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
modelValue.value = isIndeterminate.value ? true : !isChecked.value;
|
|
1268
1409
|
};
|
|
1269
|
-
const strokeDashOffset = computed(
|
|
1270
|
-
() => calcStrokeDashOffset(clippedValue.value)
|
|
1271
|
-
);
|
|
1272
|
-
const secondaryStrokeDashOffset = computed(
|
|
1273
|
-
() => calcStrokeDashOffset(secondaryClippedValue.value)
|
|
1274
|
-
);
|
|
1275
|
-
const transformWedge = computed(() => `rotate(-90, ${radius}, ${radius})`);
|
|
1276
|
-
const disabled = computed(() => !Number.isFinite(__props.maxValue));
|
|
1277
1410
|
return (_ctx, _cache) => {
|
|
1278
|
-
return openBlock(), createElementBlock("div",
|
|
1279
|
-
(openBlock(), createElementBlock("
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1411
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1412
|
+
withDirectives((openBlock(), createElementBlock("button", {
|
|
1413
|
+
class: normalizeClass({
|
|
1414
|
+
checkbox: true,
|
|
1415
|
+
checked: isChecked.value,
|
|
1416
|
+
indeterminate: isIndeterminate.value,
|
|
1417
|
+
disabled: __props.disabled,
|
|
1418
|
+
error: __props.error
|
|
1419
|
+
}),
|
|
1420
|
+
disabled: __props.disabled,
|
|
1421
|
+
"aria-label": props.tooltip,
|
|
1422
|
+
"aria-checked": ariaChecked.value,
|
|
1423
|
+
"aria-describedby": ariaDescribedBy.value,
|
|
1424
|
+
"aria-invalid": __props.error,
|
|
1425
|
+
type: "button",
|
|
1426
|
+
role: "checkbox",
|
|
1427
|
+
onClick: handleClick
|
|
1284
1428
|
}, [
|
|
1285
|
-
createElementVNode("
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
"
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
"stroke-width": strokeWidth.value,
|
|
1312
|
-
"stroke-dasharray": circumference.value,
|
|
1313
|
-
"stroke-dashoffset": strokeDashOffset.value,
|
|
1314
|
-
fill: "transparent",
|
|
1315
|
-
transform: transformWedge.value
|
|
1316
|
-
}, null, 10, _hoisted_5$g)) : createCommentVNode("", true)
|
|
1317
|
-
], 8, _hoisted_2$H)),
|
|
1318
|
-
__props.title ? (openBlock(), createElementBlock("div", _hoisted_6$b, [
|
|
1319
|
-
createElementVNode("div", _hoisted_7$3, toDisplayString(__props.title), 1),
|
|
1320
|
-
__props.subText ? (openBlock(), createElementBlock("div", _hoisted_8$3, toDisplayString(__props.subText), 1)) : createCommentVNode("", true)
|
|
1429
|
+
createElementVNode("div", _hoisted_2$G, [
|
|
1430
|
+
icon.value ? (openBlock(), createBlock(KdsIcon, {
|
|
1431
|
+
key: 0,
|
|
1432
|
+
name: icon.value,
|
|
1433
|
+
class: "icon",
|
|
1434
|
+
size: "xsmall"
|
|
1435
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
1436
|
+
]),
|
|
1437
|
+
props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
|
|
1438
|
+
createElementVNode("div", _hoisted_4$p, toDisplayString(props.label), 1),
|
|
1439
|
+
props.helperText ? (openBlock(), createElementBlock("div", {
|
|
1440
|
+
key: 0,
|
|
1441
|
+
id: unref(helperId),
|
|
1442
|
+
class: "helper-text"
|
|
1443
|
+
}, toDisplayString(props.helperText), 9, _hoisted_5$g)) : createCommentVNode("", true)
|
|
1444
|
+
])) : createCommentVNode("", true)
|
|
1445
|
+
], 10, _hoisted_1$14)), [
|
|
1446
|
+
[unref(vKdsTooltip), props.tooltip]
|
|
1447
|
+
]),
|
|
1448
|
+
props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$b, [
|
|
1449
|
+
createVNode(KdsSubText, {
|
|
1450
|
+
id: unref(descriptionId),
|
|
1451
|
+
"sub-text": props.subText,
|
|
1452
|
+
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
1453
|
+
error: __props.error
|
|
1454
|
+
}, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
|
|
1321
1455
|
])) : createCommentVNode("", true)
|
|
1322
1456
|
]);
|
|
1323
1457
|
};
|
|
1324
1458
|
}
|
|
1325
1459
|
});
|
|
1326
1460
|
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1329
|
-
const _sfc_main$1D = { };
|
|
1330
|
-
|
|
1331
|
-
const _hoisted_1$14 = { class: "kds-divider" };
|
|
1332
|
-
|
|
1333
|
-
function _sfc_render$1(_ctx, _cache) {
|
|
1334
|
-
return (openBlock(), createElementBlock("hr", _hoisted_1$14))
|
|
1335
|
-
}
|
|
1336
|
-
const KdsDivider = /*#__PURE__*/_export_sfc(_sfc_main$1D, [['render',_sfc_render$1],['__scopeId',"data-v-4d059bd3"]]);
|
|
1461
|
+
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["__scopeId", "data-v-cc0338d9"]]);
|
|
1337
1462
|
|
|
1338
|
-
const _hoisted_1$13 = {
|
|
1339
|
-
key: 0,
|
|
1340
|
-
class: "label"
|
|
1341
|
-
};
|
|
1342
1463
|
const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
1343
|
-
__name: "
|
|
1344
|
-
props: {
|
|
1345
|
-
dataTestId: {},
|
|
1346
|
-
size: { default: "medium" },
|
|
1464
|
+
__name: "KdsCheckbox",
|
|
1465
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1347
1466
|
disabled: { type: Boolean, default: false },
|
|
1348
|
-
title: {},
|
|
1349
|
-
variant: {},
|
|
1350
|
-
label: {},
|
|
1351
|
-
leadingIcon: {},
|
|
1352
|
-
trailingIcon: {},
|
|
1353
|
-
ariaLabel: {},
|
|
1354
|
-
destructive: { type: Boolean, default: false },
|
|
1355
|
-
success: { type: Boolean, default: false },
|
|
1356
1467
|
error: { type: Boolean, default: false },
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
component: { default: "button" }
|
|
1360
|
-
},
|
|
1361
|
-
emits: ["click"],
|
|
1362
|
-
setup(__props, { emit: __emit }) {
|
|
1363
|
-
const props = createPropsRestProxy(__props, ["component", "size", "destructive", "success", "error", "disabled", "toggled", "removeBorderRadius"]);
|
|
1364
|
-
const emit = __emit;
|
|
1365
|
-
const classes = computed(() => [
|
|
1366
|
-
"button",
|
|
1367
|
-
__props.size,
|
|
1368
|
-
props.variant,
|
|
1369
|
-
{ destructive: __props.destructive },
|
|
1370
|
-
{ disabled: __props.disabled },
|
|
1371
|
-
{ toggled: __props.toggled },
|
|
1372
|
-
{ success: __props.success },
|
|
1373
|
-
{ error: __props.error },
|
|
1374
|
-
__props.removeBorderRadius ? `remove-border-radius-${__props.removeBorderRadius}` : void 0
|
|
1375
|
-
]);
|
|
1376
|
-
const iconSize = computed(() => {
|
|
1377
|
-
if (__props.size === "xsmall") {
|
|
1378
|
-
return "small";
|
|
1379
|
-
} else {
|
|
1380
|
-
return __props.size;
|
|
1381
|
-
}
|
|
1382
|
-
});
|
|
1383
|
-
function onClick(e) {
|
|
1384
|
-
if (!__props.disabled) {
|
|
1385
|
-
emit("click", e);
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
return (_ctx, _cache) => {
|
|
1389
|
-
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(__props.component), {
|
|
1390
|
-
type: __props.component === "button" ? "button" : void 0,
|
|
1391
|
-
class: normalizeClass(classes.value),
|
|
1392
|
-
disabled: __props.disabled,
|
|
1393
|
-
"aria-label": props.ariaLabel,
|
|
1394
|
-
"data-test-id": props.dataTestId,
|
|
1395
|
-
onClick: _cache[0] || (_cache[0] = ($event) => onClick($event))
|
|
1396
|
-
}, {
|
|
1397
|
-
default: withCtx(() => [
|
|
1398
|
-
renderSlot(_ctx.$slots, "leading", {}, () => [
|
|
1399
|
-
props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
|
|
1400
|
-
key: 0,
|
|
1401
|
-
name: props.leadingIcon,
|
|
1402
|
-
size: iconSize.value
|
|
1403
|
-
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
1404
|
-
], true),
|
|
1405
|
-
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$13, toDisplayString(props.label), 1)) : createCommentVNode("", true),
|
|
1406
|
-
props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
|
|
1407
|
-
key: 1,
|
|
1408
|
-
name: props.trailingIcon,
|
|
1409
|
-
size: iconSize.value
|
|
1410
|
-
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
1411
|
-
]),
|
|
1412
|
-
_: 3
|
|
1413
|
-
}, 8, ["type", "class", "disabled", "aria-label", "data-test-id"])), [
|
|
1414
|
-
[unref(vKdsTooltip), props.title]
|
|
1415
|
-
]);
|
|
1416
|
-
};
|
|
1417
|
-
}
|
|
1418
|
-
});
|
|
1419
|
-
|
|
1420
|
-
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["__scopeId", "data-v-ee3f8b5d"]]);
|
|
1421
|
-
|
|
1422
|
-
const _sfc_main$1B = /* @__PURE__ */ defineComponent({
|
|
1423
|
-
__name: "KdsButton",
|
|
1424
|
-
props: {
|
|
1425
|
-
dataTestId: {},
|
|
1426
|
-
size: {},
|
|
1427
|
-
disabled: { type: Boolean },
|
|
1428
|
-
title: {},
|
|
1429
|
-
variant: { default: "filled" },
|
|
1468
|
+
subText: {},
|
|
1469
|
+
preserveSubTextSpace: { type: Boolean, default: false },
|
|
1430
1470
|
label: {},
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
const
|
|
1471
|
+
tooltip: {},
|
|
1472
|
+
modelValue: {}
|
|
1473
|
+
}, {
|
|
1474
|
+
"modelValue": { default: false },
|
|
1475
|
+
"modelModifiers": {}
|
|
1476
|
+
}),
|
|
1477
|
+
emits: ["update:modelValue"],
|
|
1478
|
+
setup(__props) {
|
|
1479
|
+
const props = createPropsRestProxy(__props, ["disabled", "error", "preserveSubTextSpace"]);
|
|
1480
|
+
const modelValue = useModel(__props, "modelValue");
|
|
1440
1481
|
return (_ctx, _cache) => {
|
|
1441
|
-
return openBlock(), createBlock(
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1482
|
+
return openBlock(), createBlock(BaseCheckbox, mergeProps(props, {
|
|
1483
|
+
modelValue: modelValue.value,
|
|
1484
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
1485
|
+
disabled: __props.disabled,
|
|
1486
|
+
error: __props.error,
|
|
1487
|
+
"preserve-sub-text-space": __props.preserveSubTextSpace
|
|
1488
|
+
}), null, 16, ["modelValue", "disabled", "error", "preserve-sub-text-space"]);
|
|
1445
1489
|
};
|
|
1446
1490
|
}
|
|
1447
1491
|
});
|
|
1448
1492
|
|
|
1449
|
-
const
|
|
1450
|
-
|
|
1451
|
-
|
|
1493
|
+
const defaultCancelButton = {
|
|
1494
|
+
type: "cancel",
|
|
1495
|
+
label: "Cancel"
|
|
1452
1496
|
};
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
return h$1("a", { href: this.to }, [useSlots().default?.()]);
|
|
1472
|
-
}
|
|
1497
|
+
const defaultConfirmButton = {
|
|
1498
|
+
type: "confirm",
|
|
1499
|
+
label: "Confirm"
|
|
1500
|
+
};
|
|
1501
|
+
const isActive = ref(false);
|
|
1502
|
+
const activeModalConfig = ref(null);
|
|
1503
|
+
const unwrappedPromise = ref(createUnwrappedPromise());
|
|
1504
|
+
const resetInternalState = () => {
|
|
1505
|
+
isActive.value = false;
|
|
1506
|
+
unwrappedPromise.value = createUnwrappedPromise();
|
|
1507
|
+
};
|
|
1508
|
+
const onClosed = () => {
|
|
1509
|
+
activeModalConfig.value = null;
|
|
1510
|
+
};
|
|
1511
|
+
const confirm = (doNotAskAgain = false) => {
|
|
1512
|
+
unwrappedPromise.value.resolve({
|
|
1513
|
+
confirmed: true,
|
|
1514
|
+
doNotAskAgain
|
|
1473
1515
|
});
|
|
1474
|
-
|
|
1516
|
+
resetInternalState();
|
|
1475
1517
|
};
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1518
|
+
const close = () => {
|
|
1519
|
+
const isConfirm = activeModalConfig.value?.type === "confirm";
|
|
1520
|
+
unwrappedPromise.value.resolve(isConfirm ? { confirmed: false } : void 0);
|
|
1521
|
+
resetInternalState();
|
|
1522
|
+
};
|
|
1523
|
+
const isTemplateBasedConfirm = (config) => {
|
|
1524
|
+
return "component" in config;
|
|
1525
|
+
};
|
|
1526
|
+
const updateConfig = (config) => {
|
|
1527
|
+
if (!isActive.value || !activeModalConfig.value || activeModalConfig.value.type === "confirm") {
|
|
1528
|
+
consola.warn("useKdsDynamicModal: invalid invocation of updateConfig");
|
|
1529
|
+
return;
|
|
1484
1530
|
}
|
|
1485
|
-
|
|
1531
|
+
activeModalConfig.value.value = {
|
|
1532
|
+
...activeModalConfig.value.value,
|
|
1533
|
+
...config
|
|
1534
|
+
};
|
|
1535
|
+
};
|
|
1536
|
+
const internal = {
|
|
1537
|
+
confirm,
|
|
1538
|
+
close,
|
|
1539
|
+
isTemplateBasedConfirm,
|
|
1540
|
+
onClosed,
|
|
1541
|
+
updateConfig
|
|
1542
|
+
};
|
|
1543
|
+
function askConfirmation(config) {
|
|
1544
|
+
activeModalConfig.value = {
|
|
1545
|
+
type: "confirm",
|
|
1546
|
+
value: {
|
|
1547
|
+
buttons: [defaultCancelButton, defaultConfirmButton],
|
|
1548
|
+
...config
|
|
1549
|
+
}
|
|
1550
|
+
};
|
|
1551
|
+
isActive.value = true;
|
|
1552
|
+
return unwrappedPromise.value.promise;
|
|
1486
1553
|
}
|
|
1554
|
+
const showByTemplate = (config) => {
|
|
1555
|
+
activeModalConfig.value = {
|
|
1556
|
+
type: "dynamic",
|
|
1557
|
+
value: config
|
|
1558
|
+
};
|
|
1559
|
+
isActive.value = true;
|
|
1560
|
+
return unwrappedPromise.value.promise;
|
|
1561
|
+
};
|
|
1562
|
+
const useKdsDynamicModal = () => {
|
|
1563
|
+
return {
|
|
1564
|
+
askConfirmation,
|
|
1565
|
+
showByTemplate,
|
|
1566
|
+
config: computed(() => activeModalConfig.value),
|
|
1567
|
+
isActive: computed(() => isActive.value),
|
|
1568
|
+
close: () => internal.close()
|
|
1569
|
+
};
|
|
1570
|
+
};
|
|
1487
1571
|
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1572
|
+
const _hoisted_1$13 = {
|
|
1573
|
+
key: 1,
|
|
1574
|
+
class: "confirmation"
|
|
1575
|
+
};
|
|
1576
|
+
const _hoisted_2$F = { class: "message" };
|
|
1577
|
+
const _hoisted_3$s = {
|
|
1578
|
+
key: 0,
|
|
1579
|
+
class: "ask-again"
|
|
1580
|
+
};
|
|
1581
|
+
const _sfc_main$1B = /* @__PURE__ */ defineComponent({
|
|
1582
|
+
__name: "KdsDynamicModalProvider",
|
|
1583
|
+
setup(__props) {
|
|
1584
|
+
const askAgain = ref(false);
|
|
1585
|
+
const { config, isActive } = useKdsDynamicModal();
|
|
1586
|
+
const reset = () => {
|
|
1587
|
+
askAgain.value = false;
|
|
1588
|
+
};
|
|
1589
|
+
const onConfirm = () => {
|
|
1590
|
+
internal.confirm(askAgain.value);
|
|
1591
|
+
reset();
|
|
1592
|
+
};
|
|
1593
|
+
const onClose = () => {
|
|
1594
|
+
internal.close();
|
|
1595
|
+
reset();
|
|
1596
|
+
};
|
|
1597
|
+
const handleConfirmButton = (button) => {
|
|
1598
|
+
if (!button.customHandler) {
|
|
1599
|
+
const handler = button.type === "cancel" ? onClose : onConfirm;
|
|
1600
|
+
handler();
|
|
1601
|
+
return;
|
|
1515
1602
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
const component = computed(() => {
|
|
1519
|
-
if (__props.disabled) {
|
|
1520
|
-
return "button";
|
|
1603
|
+
if (button.type === "cancel") {
|
|
1604
|
+
button.customHandler({ cancel: onClose });
|
|
1521
1605
|
}
|
|
1522
|
-
|
|
1606
|
+
if (button.type === "confirm") {
|
|
1607
|
+
button.customHandler({ confirm: onConfirm });
|
|
1608
|
+
}
|
|
1609
|
+
};
|
|
1610
|
+
const defaultVariant = (type) => type === "cancel" ? "transparent" : "filled";
|
|
1611
|
+
const kdsModalProps = computed(() => {
|
|
1612
|
+
if (!config.value) {
|
|
1613
|
+
return {};
|
|
1614
|
+
}
|
|
1615
|
+
const { leadingIcon, headline, height, width, variant, overflow, closedby } = config.value.value;
|
|
1616
|
+
return {
|
|
1617
|
+
leadingIcon,
|
|
1618
|
+
headline,
|
|
1619
|
+
height,
|
|
1620
|
+
width,
|
|
1621
|
+
variant,
|
|
1622
|
+
overflow,
|
|
1623
|
+
closedby,
|
|
1624
|
+
onClose,
|
|
1625
|
+
onClosed: internal.onClosed,
|
|
1626
|
+
active: isActive.value
|
|
1627
|
+
};
|
|
1523
1628
|
});
|
|
1524
|
-
const emit = __emit;
|
|
1525
1629
|
return (_ctx, _cache) => {
|
|
1526
|
-
return openBlock(), createBlock(
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1630
|
+
return openBlock(), createBlock(KdsModal, mergeProps({ class: "confirm-modal" }, kdsModalProps.value), createSlots({ _: 2 }, [
|
|
1631
|
+
unref(config)?.type === "confirm" ? {
|
|
1632
|
+
name: "body",
|
|
1633
|
+
fn: withCtx(() => [
|
|
1634
|
+
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$13, [
|
|
1635
|
+
createElementVNode("div", _hoisted_2$F, toDisplayString(unref(config).value.message), 1),
|
|
1636
|
+
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3$s, [
|
|
1637
|
+
createVNode(_sfc_main$1C, {
|
|
1638
|
+
modelValue: askAgain.value,
|
|
1639
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
1640
|
+
label: unref(config).value.doNotAskAgain.label,
|
|
1641
|
+
"sub-text": unref(config).value.doNotAskAgain.subText
|
|
1642
|
+
}, null, 8, ["modelValue", "label", "sub-text"])
|
|
1643
|
+
])) : createCommentVNode("", true)
|
|
1644
|
+
]))
|
|
1645
|
+
]),
|
|
1646
|
+
key: "0"
|
|
1647
|
+
} : void 0,
|
|
1648
|
+
unref(config)?.type === "confirm" ? {
|
|
1649
|
+
name: "footer",
|
|
1650
|
+
fn: withCtx(() => [
|
|
1651
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
|
|
1652
|
+
return openBlock(), createBlock(_sfc_main$1I, {
|
|
1653
|
+
key: index,
|
|
1654
|
+
destructive: button.destructive,
|
|
1655
|
+
autofocus: button.autofocus,
|
|
1656
|
+
label: button.label,
|
|
1657
|
+
variant: button.variant ?? defaultVariant(button.type),
|
|
1658
|
+
class: normalizeClass({ "flush-left": button.flushLeft }),
|
|
1659
|
+
"data-test-id": `${button.type}-button`,
|
|
1660
|
+
onClick: ($event) => handleConfirmButton(button)
|
|
1661
|
+
}, null, 8, ["destructive", "autofocus", "label", "variant", "class", "data-test-id", "onClick"]);
|
|
1662
|
+
}), 128))
|
|
1663
|
+
]),
|
|
1664
|
+
key: "1"
|
|
1665
|
+
} : void 0,
|
|
1666
|
+
unref(config)?.type === "dynamic" ? {
|
|
1667
|
+
name: "default",
|
|
1668
|
+
fn: withCtx((slotProps) => [
|
|
1669
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), normalizeProps(guardReactiveProps({
|
|
1670
|
+
...slotProps,
|
|
1671
|
+
context: unref(config).value.context,
|
|
1672
|
+
updateConfig: unref(internal).updateConfig
|
|
1673
|
+
})), null, 16))
|
|
1674
|
+
]),
|
|
1675
|
+
key: "2"
|
|
1676
|
+
} : void 0
|
|
1677
|
+
]), 1040);
|
|
1535
1678
|
};
|
|
1536
1679
|
}
|
|
1537
1680
|
});
|
|
1538
1681
|
|
|
1539
|
-
const
|
|
1540
|
-
'B',
|
|
1541
|
-
'kB',
|
|
1542
|
-
'MB',
|
|
1543
|
-
'GB',
|
|
1544
|
-
'TB',
|
|
1545
|
-
'PB',
|
|
1546
|
-
'EB',
|
|
1547
|
-
'ZB',
|
|
1548
|
-
'YB',
|
|
1549
|
-
];
|
|
1682
|
+
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["__scopeId", "data-v-41fc8d84"]]);
|
|
1550
1683
|
|
|
1551
|
-
const
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
'ZiB',
|
|
1560
|
-
'YiB',
|
|
1561
|
-
];
|
|
1562
|
-
|
|
1563
|
-
const BIT_UNITS = [
|
|
1564
|
-
'b',
|
|
1565
|
-
'kbit',
|
|
1566
|
-
'Mbit',
|
|
1567
|
-
'Gbit',
|
|
1568
|
-
'Tbit',
|
|
1569
|
-
'Pbit',
|
|
1570
|
-
'Ebit',
|
|
1571
|
-
'Zbit',
|
|
1572
|
-
'Ybit',
|
|
1573
|
-
];
|
|
1574
|
-
|
|
1575
|
-
const BIBIT_UNITS = [
|
|
1576
|
-
'b',
|
|
1577
|
-
'kibit',
|
|
1578
|
-
'Mibit',
|
|
1579
|
-
'Gibit',
|
|
1580
|
-
'Tibit',
|
|
1581
|
-
'Pibit',
|
|
1582
|
-
'Eibit',
|
|
1583
|
-
'Zibit',
|
|
1584
|
-
'Yibit',
|
|
1585
|
-
];
|
|
1586
|
-
|
|
1587
|
-
/*
|
|
1588
|
-
Formats the given number using `Number#toLocaleString`.
|
|
1589
|
-
- If locale is a string, the value is expected to be a locale-key (for example: `de`).
|
|
1590
|
-
- If locale is true, the system default locale is used for translation.
|
|
1591
|
-
- If no value for locale is specified, the number is returned unmodified.
|
|
1592
|
-
*/
|
|
1593
|
-
const toLocaleString = (number, locale, options) => {
|
|
1594
|
-
let result = number;
|
|
1595
|
-
if (typeof locale === 'string' || Array.isArray(locale)) {
|
|
1596
|
-
result = number.toLocaleString(locale, options);
|
|
1597
|
-
} else if (locale === true || options !== undefined) {
|
|
1598
|
-
result = number.toLocaleString(undefined, options);
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
return result;
|
|
1684
|
+
const kdsPopoverPlacement = {
|
|
1685
|
+
TOP_LEFT: "top-left",
|
|
1686
|
+
TOP_CENTER: "top-center",
|
|
1687
|
+
TOP_RIGHT: "top-right",
|
|
1688
|
+
BOTTOM_LEFT: "bottom-left",
|
|
1689
|
+
BOTTOM_CENTER: "bottom-center",
|
|
1690
|
+
BOTTOM_RIGHT: "bottom-right",
|
|
1691
|
+
CUSTOM: "custom"
|
|
1602
1692
|
};
|
|
1603
|
-
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
const string = numberOrBigInt.toString(10);
|
|
1610
|
-
|
|
1611
|
-
return string.length + Math.log10(`0.${string.slice(0, 15)}`);
|
|
1693
|
+
const kdsPopoverPlacements = Object.values(kdsPopoverPlacement);
|
|
1694
|
+
const kdsPopoverRole = {
|
|
1695
|
+
DIALOG: "dialog",
|
|
1696
|
+
MENU: "menu",
|
|
1697
|
+
LISTBOX: "listbox"
|
|
1612
1698
|
};
|
|
1613
|
-
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
return log10(numberOrBigInt) * Math.log(10);
|
|
1699
|
+
const kdsPopoverRoles = Object.values(kdsPopoverRole);
|
|
1700
|
+
const kdsPopoverType = {
|
|
1701
|
+
AUTO: "auto",
|
|
1702
|
+
MANUAL: "manual"
|
|
1620
1703
|
};
|
|
1704
|
+
const kdsPopoverTypes = Object.values(kdsPopoverType);
|
|
1621
1705
|
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
const integerPart = numberOrBigInt / BigInt(divisor);
|
|
1628
|
-
const remainder = numberOrBigInt % BigInt(divisor);
|
|
1629
|
-
return Number(integerPart) + (Number(remainder) / divisor);
|
|
1706
|
+
const _hoisted_1$12 = ["id", "popover", "role"];
|
|
1707
|
+
const _hoisted_2$E = {
|
|
1708
|
+
key: 0,
|
|
1709
|
+
class: "kds-popover-default-content"
|
|
1630
1710
|
};
|
|
1711
|
+
const _sfc_main$1A = /* @__PURE__ */ defineComponent({
|
|
1712
|
+
__name: "KdsPopover",
|
|
1713
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1714
|
+
modelValue: { type: Boolean },
|
|
1715
|
+
role: {},
|
|
1716
|
+
popoverType: { default: "auto" },
|
|
1717
|
+
fullWidth: { type: Boolean, default: false },
|
|
1718
|
+
maxInlineSize: { default: () => void 0 },
|
|
1719
|
+
content: {},
|
|
1720
|
+
placement: { default: "bottom-left" },
|
|
1721
|
+
customPlacementPosition: {}
|
|
1722
|
+
}, {
|
|
1723
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
1724
|
+
"modelModifiers": {}
|
|
1725
|
+
}),
|
|
1726
|
+
emits: ["update:modelValue"],
|
|
1727
|
+
setup(__props, { expose: __expose }) {
|
|
1728
|
+
const props = createPropsRestProxy(__props, ["placement", "popoverType", "fullWidth", "maxInlineSize"]);
|
|
1729
|
+
const open = useModel(__props, "modelValue");
|
|
1730
|
+
const popoverEl = useTemplateRef("popoverEl");
|
|
1731
|
+
const popoverId = useId();
|
|
1732
|
+
const anchorName = `--anchor-${popoverId}`;
|
|
1733
|
+
watchEffect(() => {
|
|
1734
|
+
if (open.value) {
|
|
1735
|
+
popoverEl.value?.showPopover?.();
|
|
1736
|
+
} else {
|
|
1737
|
+
popoverEl.value?.hidePopover?.();
|
|
1738
|
+
}
|
|
1739
|
+
});
|
|
1740
|
+
const anchorStyle = __props.placement === kdsPopoverPlacement.CUSTOM ? {} : { "anchor-name": anchorName };
|
|
1741
|
+
const onToggle = (event) => {
|
|
1742
|
+
open.value = event.newState === "open";
|
|
1743
|
+
};
|
|
1744
|
+
__expose({ anchorStyle, popoverId });
|
|
1745
|
+
const wrapperStyles = computed(() => {
|
|
1746
|
+
if (__props.placement === kdsPopoverPlacement.CUSTOM && props.customPlacementPosition) {
|
|
1747
|
+
return {
|
|
1748
|
+
"max-inline-size": __props.maxInlineSize,
|
|
1749
|
+
left: `${props.customPlacementPosition.x}px`,
|
|
1750
|
+
top: `${props.customPlacementPosition.y}px`
|
|
1751
|
+
};
|
|
1752
|
+
}
|
|
1753
|
+
return {
|
|
1754
|
+
"position-anchor": anchorName,
|
|
1755
|
+
"max-inline-size": __props.maxInlineSize
|
|
1756
|
+
};
|
|
1757
|
+
});
|
|
1758
|
+
return (_ctx, _cache) => {
|
|
1759
|
+
return openBlock(), createElementBlock("div", {
|
|
1760
|
+
id: unref(popoverId),
|
|
1761
|
+
ref_key: "popoverEl",
|
|
1762
|
+
ref: popoverEl,
|
|
1763
|
+
class: normalizeClass(["kds-popover", ["floating", __props.placement, { "full-width": __props.fullWidth }]]),
|
|
1764
|
+
popover: __props.popoverType,
|
|
1765
|
+
style: normalizeStyle(wrapperStyles.value),
|
|
1766
|
+
role: props.role,
|
|
1767
|
+
onToggle
|
|
1768
|
+
}, [
|
|
1769
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1770
|
+
props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$E, toDisplayString(props.content), 1)) : createCommentVNode("", true)
|
|
1771
|
+
], true)
|
|
1772
|
+
], 46, _hoisted_1$12);
|
|
1773
|
+
};
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1631
1776
|
|
|
1632
|
-
const
|
|
1633
|
-
if (fixedWidth === undefined) {
|
|
1634
|
-
return result;
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
if (typeof fixedWidth !== 'number' || !Number.isSafeInteger(fixedWidth) || fixedWidth < 0) {
|
|
1638
|
-
throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof fixedWidth}: ${fixedWidth}`);
|
|
1639
|
-
}
|
|
1777
|
+
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["__scopeId", "data-v-3d51a946"]]);
|
|
1640
1778
|
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1779
|
+
const KdsPopover$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1780
|
+
__proto__: null,
|
|
1781
|
+
default: KdsPopover
|
|
1782
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1644
1783
|
|
|
1645
|
-
|
|
1646
|
-
|
|
1784
|
+
const _hoisted_1$11 = ["data-width"];
|
|
1785
|
+
const _sfc_main$1z = /* @__PURE__ */ defineComponent({
|
|
1786
|
+
__name: "KdsSideDrawer",
|
|
1787
|
+
props: {
|
|
1788
|
+
isExpanded: { type: Boolean, default: false },
|
|
1789
|
+
width: { default: "default" }
|
|
1790
|
+
},
|
|
1791
|
+
setup(__props) {
|
|
1792
|
+
const drawerRef = useTemplateRef("drawer");
|
|
1793
|
+
onMounted(() => {
|
|
1794
|
+
watch(
|
|
1795
|
+
() => __props.isExpanded,
|
|
1796
|
+
(expanded) => {
|
|
1797
|
+
if (expanded) {
|
|
1798
|
+
drawerRef.value?.showPopover();
|
|
1799
|
+
} else {
|
|
1800
|
+
drawerRef.value?.hidePopover();
|
|
1801
|
+
}
|
|
1802
|
+
},
|
|
1803
|
+
{ immediate: true }
|
|
1804
|
+
);
|
|
1805
|
+
});
|
|
1806
|
+
return (_ctx, _cache) => {
|
|
1807
|
+
return openBlock(), createElementBlock("div", {
|
|
1808
|
+
ref: "drawer",
|
|
1809
|
+
popover: "manual",
|
|
1810
|
+
class: "kds-side-drawer",
|
|
1811
|
+
"data-width": __props.width
|
|
1812
|
+
}, [
|
|
1813
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1814
|
+
], 8, _hoisted_1$11);
|
|
1815
|
+
};
|
|
1816
|
+
}
|
|
1817
|
+
});
|
|
1647
1818
|
|
|
1648
|
-
const
|
|
1649
|
-
const {minimumFractionDigits, maximumFractionDigits} = options;
|
|
1819
|
+
const KdsSideDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["__scopeId", "data-v-2ee82be5"]]);
|
|
1650
1820
|
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1821
|
+
const kdsProgressBarSize = {
|
|
1822
|
+
MEDIUM: "medium",
|
|
1823
|
+
LARGE: "large"
|
|
1824
|
+
};
|
|
1825
|
+
const kdsProgressBarSizes = Object.values(kdsProgressBarSize);
|
|
1654
1826
|
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
};
|
|
1827
|
+
const _hoisted_1$10 = {
|
|
1828
|
+
key: 0,
|
|
1829
|
+
class: "indeterminate-bar",
|
|
1830
|
+
"aria-hidden": "true"
|
|
1660
1831
|
};
|
|
1832
|
+
const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
1833
|
+
__name: "KdsProgressBar",
|
|
1834
|
+
props: {
|
|
1835
|
+
size: { default: () => kdsProgressBarSize.MEDIUM },
|
|
1836
|
+
tooltip: { default: "" },
|
|
1837
|
+
percentage: { default: 0 },
|
|
1838
|
+
indeterminate: { type: Boolean, default: false }
|
|
1839
|
+
},
|
|
1840
|
+
setup(__props) {
|
|
1841
|
+
const progressValue = computed(() => {
|
|
1842
|
+
if (Number.isNaN(__props.percentage)) {
|
|
1843
|
+
return 0;
|
|
1844
|
+
}
|
|
1845
|
+
return Math.min(Math.max(__props.percentage, 0), 100);
|
|
1846
|
+
});
|
|
1847
|
+
const tooltip = computed(() => {
|
|
1848
|
+
const customTooltip = (__props.tooltip ?? "").trim();
|
|
1849
|
+
if (customTooltip) {
|
|
1850
|
+
return customTooltip;
|
|
1851
|
+
}
|
|
1852
|
+
return __props.indeterminate ? "Loading" : `Progress: ${progressValue.value}%`;
|
|
1853
|
+
});
|
|
1854
|
+
return (_ctx, _cache) => {
|
|
1855
|
+
return openBlock(), createElementBlock("div", {
|
|
1856
|
+
class: normalizeClass([
|
|
1857
|
+
"kds-progress-bar",
|
|
1858
|
+
{
|
|
1859
|
+
"kds-progress-bar-large": __props.size === unref(kdsProgressBarSize).LARGE,
|
|
1860
|
+
"kds-progress-bar-medium": __props.size !== unref(kdsProgressBarSize).LARGE
|
|
1861
|
+
}
|
|
1862
|
+
])
|
|
1863
|
+
}, [
|
|
1864
|
+
withDirectives(createElementVNode("progress", mergeProps({ class: "progress" }, __props.indeterminate ? {} : { value: progressValue.value, max: 100 }), null, 16), [
|
|
1865
|
+
[unref(vKdsTooltip), tooltip.value]
|
|
1866
|
+
]),
|
|
1867
|
+
__props.indeterminate ? (openBlock(), createElementBlock("span", _hoisted_1$10)) : createCommentVNode("", true)
|
|
1868
|
+
], 2);
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
});
|
|
1661
1872
|
|
|
1662
|
-
|
|
1663
|
-
if (typeof number !== 'bigint' && !Number.isFinite(number)) {
|
|
1664
|
-
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
|
|
1665
|
-
}
|
|
1873
|
+
const KdsProgressBar = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["__scopeId", "data-v-a8563140"]]);
|
|
1666
1874
|
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
const UNITS = options.bits
|
|
1676
|
-
? (options.binary ? BIBIT_UNITS : BIT_UNITS)
|
|
1677
|
-
: (options.binary ? BIBYTE_UNITS : BYTE_UNITS);
|
|
1678
|
-
|
|
1679
|
-
const separator = options.space ? (options.nonBreakingSpace ? '\u00A0' : ' ') : '';
|
|
1680
|
-
|
|
1681
|
-
// Handle signed zero case
|
|
1682
|
-
const isZero = typeof number === 'number' ? number === 0 : number === 0n;
|
|
1683
|
-
if (options.signed && isZero) {
|
|
1684
|
-
const result = ` 0${separator}${UNITS[0]}`;
|
|
1685
|
-
return applyFixedWidth(result, options.fixedWidth);
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
const isNegative = number < 0;
|
|
1689
|
-
const prefix = isNegative ? '-' : (options.signed ? '+' : '');
|
|
1690
|
-
|
|
1691
|
-
if (isNegative) {
|
|
1692
|
-
number = -number;
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
const localeOptions = buildLocaleOptions(options);
|
|
1696
|
-
let result;
|
|
1697
|
-
|
|
1698
|
-
if (number < 1) {
|
|
1699
|
-
const numberString = toLocaleString(number, options.locale, localeOptions);
|
|
1700
|
-
result = prefix + numberString + separator + UNITS[0];
|
|
1701
|
-
} else {
|
|
1702
|
-
const exponent = Math.min(Math.floor(options.binary ? log(number) / Math.log(1024) : log10(number) / 3), UNITS.length - 1);
|
|
1703
|
-
number = divide(number, (options.binary ? 1024 : 1000) ** exponent);
|
|
1704
|
-
|
|
1705
|
-
if (!localeOptions) {
|
|
1706
|
-
const minPrecision = Math.max(3, Math.floor(number).toString().length);
|
|
1707
|
-
number = number.toPrecision(minPrecision);
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
|
|
1711
|
-
const unit = UNITS[exponent];
|
|
1712
|
-
result = prefix + numberString + separator + unit;
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
return applyFixedWidth(result, options.fixedWidth);
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
const isMac = () => navigator?.userAgent?.toLowerCase()?.includes("mac");
|
|
1719
|
-
|
|
1720
|
-
const createUnwrappedPromise = () => {
|
|
1721
|
-
let resolve = () => {
|
|
1722
|
-
};
|
|
1723
|
-
let reject = () => {
|
|
1724
|
-
};
|
|
1725
|
-
const promise = new Promise((res, rej) => {
|
|
1726
|
-
resolve = res;
|
|
1727
|
-
reject = rej;
|
|
1728
|
-
});
|
|
1729
|
-
return { resolve, reject, promise };
|
|
1730
|
-
};
|
|
1731
|
-
|
|
1732
|
-
function sleep(ms) {
|
|
1733
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
const getMetaOrCtrlKey = () => {
|
|
1737
|
-
return isMac() ? "metaKey" : "ctrlKey";
|
|
1738
|
-
};
|
|
1739
|
-
|
|
1740
|
-
const kdsModalClosedBy = {
|
|
1741
|
-
ANY: "any",
|
|
1742
|
-
CLOSEREQUEST: "closerequest",
|
|
1743
|
-
NONE: "none"
|
|
1875
|
+
const kdsColorSwatchType = {
|
|
1876
|
+
LEARNER: "learner",
|
|
1877
|
+
MANIPULATOR: "manipulator",
|
|
1878
|
+
PREDICTOR: "predictor",
|
|
1879
|
+
SINK: "sink",
|
|
1880
|
+
SOURCE: "source",
|
|
1881
|
+
VISUALIZER: "visualizer",
|
|
1882
|
+
OTHER: "other"
|
|
1744
1883
|
};
|
|
1745
|
-
const
|
|
1746
|
-
const
|
|
1884
|
+
const kdsColorSwatchTypes = Object.values(kdsColorSwatchType);
|
|
1885
|
+
const kdsColorSwatchSize = {
|
|
1747
1886
|
SMALL: "small",
|
|
1748
1887
|
MEDIUM: "medium",
|
|
1749
|
-
LARGE: "large"
|
|
1750
|
-
XLARGE: "xlarge",
|
|
1751
|
-
FULL: "full"
|
|
1752
|
-
};
|
|
1753
|
-
const kdsModalWidthSizes = Object.values(kdsModalWidth);
|
|
1754
|
-
const kdsModalHeight = {
|
|
1755
|
-
AUTO: "auto",
|
|
1756
|
-
FULL: "full"
|
|
1757
|
-
};
|
|
1758
|
-
const kdsModalHeightSizes = Object.values(kdsModalHeight);
|
|
1759
|
-
const kdsModalVariant = {
|
|
1760
|
-
PADDED: "padded",
|
|
1761
|
-
PLAIN: "plain"
|
|
1888
|
+
LARGE: "large"
|
|
1762
1889
|
};
|
|
1763
|
-
const
|
|
1764
|
-
({
|
|
1765
|
-
variant: kdsModalVariant.PADDED});
|
|
1766
|
-
({
|
|
1767
|
-
height: kdsModalHeight.AUTO,
|
|
1768
|
-
width: kdsModalWidth.MEDIUM,
|
|
1769
|
-
closedby: kdsModalClosedBy.CLOSEREQUEST});
|
|
1890
|
+
const kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
|
|
1770
1891
|
|
|
1771
|
-
const _hoisted_1
|
|
1772
|
-
const
|
|
1773
|
-
const
|
|
1774
|
-
const
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
const _sfc_main$
|
|
1779
|
-
|
|
1780
|
-
__name: "KdsModalLayout",
|
|
1892
|
+
const _hoisted_1$$ = ["role", "aria-hidden", "aria-label"];
|
|
1893
|
+
const RGBA_SHORT_HEX_LENGTH = 4;
|
|
1894
|
+
const RGBA_LONG_HEX_LENGTH = 8;
|
|
1895
|
+
const ALPHA_NIBBLE_INDEX = 3;
|
|
1896
|
+
const ALPHA_BYTE_START = 6;
|
|
1897
|
+
const RGB_SHORT_HEX_LENGTH = 3;
|
|
1898
|
+
const RGB_LONG_HEX_LENGTH = 6;
|
|
1899
|
+
const _sfc_main$1x = /* @__PURE__ */ defineComponent({
|
|
1900
|
+
__name: "KdsColorSwatch",
|
|
1781
1901
|
props: {
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
overflow: { default: "auto" },
|
|
1786
|
-
onClose: { type: Function }
|
|
1902
|
+
color: {},
|
|
1903
|
+
size: { default: () => kdsColorSwatchSize.SMALL },
|
|
1904
|
+
tooltip: {}
|
|
1787
1905
|
},
|
|
1788
1906
|
setup(__props) {
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1907
|
+
const props = createPropsRestProxy(__props, ["size"]);
|
|
1908
|
+
const typeToTokenColor = {
|
|
1909
|
+
learner: "var(--kds-color-nodes-and-variables-learner)",
|
|
1910
|
+
manipulator: "var(--kds-color-nodes-and-variables-manipulator)",
|
|
1911
|
+
predictor: "var(--kds-color-nodes-and-variables-predictor)",
|
|
1912
|
+
sink: "var(--kds-color-nodes-and-variables-sink)",
|
|
1913
|
+
source: "var(--kds-color-nodes-and-variables-source)",
|
|
1914
|
+
visualizer: "var(--kds-color-nodes-and-variables-visualizer)",
|
|
1915
|
+
other: "var(--kds-color-nodes-and-variables-other)"
|
|
1916
|
+
};
|
|
1917
|
+
const isKdsColorSwatchType = (value) => Object.hasOwn(typeToTokenColor, value);
|
|
1918
|
+
const isTransparentAlphaHexColor = (value) => {
|
|
1919
|
+
const withoutHash = value.startsWith("#") ? value.slice(1) : value;
|
|
1920
|
+
if (withoutHash.length === RGBA_SHORT_HEX_LENGTH) {
|
|
1921
|
+
return withoutHash[ALPHA_NIBBLE_INDEX].toLowerCase() !== "f";
|
|
1922
|
+
}
|
|
1923
|
+
if (withoutHash.length === RGBA_LONG_HEX_LENGTH) {
|
|
1924
|
+
return withoutHash.slice(ALPHA_BYTE_START).toLowerCase() !== "ff";
|
|
1925
|
+
}
|
|
1926
|
+
return false;
|
|
1927
|
+
};
|
|
1928
|
+
const toOpaqueHexColor = (value) => {
|
|
1929
|
+
const withoutHash = value.startsWith("#") ? value.slice(1) : value;
|
|
1930
|
+
if (withoutHash.length === RGBA_SHORT_HEX_LENGTH) {
|
|
1931
|
+
return `#${withoutHash.slice(0, RGB_SHORT_HEX_LENGTH)}`;
|
|
1932
|
+
}
|
|
1933
|
+
if (withoutHash.length === RGBA_LONG_HEX_LENGTH) {
|
|
1934
|
+
return `#${withoutHash.slice(0, RGB_LONG_HEX_LENGTH)}`;
|
|
1935
|
+
}
|
|
1936
|
+
return value;
|
|
1937
|
+
};
|
|
1938
|
+
const backgroundColor = computed(() => {
|
|
1939
|
+
if (isKdsColorSwatchType(props.color)) {
|
|
1940
|
+
return typeToTokenColor[props.color];
|
|
1941
|
+
}
|
|
1942
|
+
return props.color;
|
|
1943
|
+
});
|
|
1944
|
+
const showAlphaPreview = computed(
|
|
1945
|
+
() => !isKdsColorSwatchType(props.color) && isTransparentAlphaHexColor(props.color)
|
|
1946
|
+
);
|
|
1947
|
+
const swatchStyle = computed(() => {
|
|
1948
|
+
if (!showAlphaPreview.value) {
|
|
1949
|
+
return { backgroundColor: backgroundColor.value };
|
|
1950
|
+
}
|
|
1951
|
+
const opaqueColor = toOpaqueHexColor(props.color);
|
|
1952
|
+
return {
|
|
1953
|
+
backgroundImage: `
|
|
1954
|
+
linear-gradient(to right, ${backgroundColor.value} 0 50%, ${opaqueColor} 50% 100%),
|
|
1955
|
+
repeating-conic-gradient(
|
|
1956
|
+
var(--kds-color-background-neutral-active) 0 25%,
|
|
1957
|
+
var(--kds-color-surface-default) 0 50%
|
|
1958
|
+
)
|
|
1959
|
+
`,
|
|
1960
|
+
backgroundSize: "100% 100%, var(--kds-color-swatch-checker-size) var(--kds-color-swatch-checker-size)",
|
|
1961
|
+
backgroundPosition: "0 0, 0 0"
|
|
1962
|
+
};
|
|
1963
|
+
});
|
|
1964
|
+
const accessibleTitle = computed(() => props.tooltip?.trim() ?? "");
|
|
1965
|
+
const hasTitle = computed(() => accessibleTitle.value.length > 0);
|
|
1793
1966
|
return (_ctx, _cache) => {
|
|
1794
|
-
return openBlock(), createElementBlock(
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
"leading-icon": "x-close",
|
|
1804
|
-
variant: "transparent",
|
|
1805
|
-
size: "medium",
|
|
1806
|
-
title: "Close",
|
|
1807
|
-
ariaLabel: "Close",
|
|
1808
|
-
onClick: props.onClose
|
|
1809
|
-
}, null, 8, ["onClick"])
|
|
1810
|
-
]),
|
|
1811
|
-
createElementVNode("div", {
|
|
1812
|
-
class: "modal-body",
|
|
1813
|
-
"data-variant": __props.variant
|
|
1814
|
-
}, [
|
|
1815
|
-
renderSlot(_ctx.$slots, "body", {}, void 0, true)
|
|
1816
|
-
], 8, _hoisted_3$t),
|
|
1817
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4$p, [
|
|
1818
|
-
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1819
|
-
])) : createCommentVNode("", true)
|
|
1820
|
-
], 64);
|
|
1967
|
+
return withDirectives((openBlock(), createElementBlock("span", {
|
|
1968
|
+
role: hasTitle.value ? "img" : "presentation",
|
|
1969
|
+
class: normalizeClass(["kds-color-swatch", __props.size]),
|
|
1970
|
+
style: normalizeStyle(swatchStyle.value),
|
|
1971
|
+
"aria-hidden": hasTitle.value ? void 0 : "true",
|
|
1972
|
+
"aria-label": hasTitle.value ? accessibleTitle.value : void 0
|
|
1973
|
+
}, null, 14, _hoisted_1$$)), [
|
|
1974
|
+
[unref(vKdsTooltip), hasTitle.value ? accessibleTitle.value : void 0]
|
|
1975
|
+
]);
|
|
1821
1976
|
};
|
|
1822
1977
|
}
|
|
1823
1978
|
});
|
|
1824
1979
|
|
|
1825
|
-
const
|
|
1980
|
+
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["__scopeId", "data-v-dd4ddfb5"]]);
|
|
1826
1981
|
|
|
1827
|
-
const _hoisted_1$
|
|
1828
|
-
const
|
|
1829
|
-
|
|
1982
|
+
const _hoisted_1$_ = ["aria-label"];
|
|
1983
|
+
const _hoisted_2$D = {
|
|
1984
|
+
key: 0,
|
|
1985
|
+
class: "label"
|
|
1986
|
+
};
|
|
1987
|
+
const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
1988
|
+
__name: "KdsLiveStatus",
|
|
1830
1989
|
props: {
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
height: { default: () => kdsModalHeight.AUTO },
|
|
1836
|
-
active: { type: Boolean, default: false },
|
|
1837
|
-
closedby: { default: () => kdsModalClosedBy.CLOSEREQUEST },
|
|
1838
|
-
overflow: { default: "auto" }
|
|
1990
|
+
status: { default: "red" },
|
|
1991
|
+
size: { default: "medium" },
|
|
1992
|
+
label: { default: "" },
|
|
1993
|
+
tooltip: {}
|
|
1839
1994
|
},
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
}));
|
|
1845
|
-
const emit = __emit;
|
|
1846
|
-
const dialog = useTemplateRef("dialogElement");
|
|
1847
|
-
const onClose = (event) => {
|
|
1848
|
-
emit("close", event);
|
|
1849
|
-
};
|
|
1850
|
-
watch(
|
|
1851
|
-
() => __props.active,
|
|
1852
|
-
async (isActive) => {
|
|
1853
|
-
if (isActive) {
|
|
1854
|
-
await nextTick();
|
|
1855
|
-
dialog.value?.showModal();
|
|
1856
|
-
} else {
|
|
1857
|
-
dialog.value?.close();
|
|
1858
|
-
}
|
|
1859
|
-
},
|
|
1860
|
-
{ immediate: true }
|
|
1861
|
-
);
|
|
1862
|
-
const renderDialog = ref(__props.active);
|
|
1863
|
-
const removeDialog = () => {
|
|
1864
|
-
if (!renderDialog.value) {
|
|
1865
|
-
return;
|
|
1866
|
-
}
|
|
1867
|
-
renderDialog.value = false;
|
|
1868
|
-
emit("closed");
|
|
1869
|
-
};
|
|
1870
|
-
watch(
|
|
1871
|
-
() => __props.active,
|
|
1872
|
-
async (value, lastValue) => {
|
|
1873
|
-
if (value === false && lastValue === true) {
|
|
1874
|
-
if (dialog.value) {
|
|
1875
|
-
Promise.all(
|
|
1876
|
-
dialog.value.getAnimations({ subtree: true }).map((animation) => animation.finished)
|
|
1877
|
-
).then(removeDialog).catch((error) => {
|
|
1878
|
-
if (error.name === "AbortError") {
|
|
1879
|
-
removeDialog();
|
|
1880
|
-
return;
|
|
1881
|
-
}
|
|
1882
|
-
throw error;
|
|
1883
|
-
});
|
|
1884
|
-
await sleep(350);
|
|
1885
|
-
removeDialog();
|
|
1886
|
-
} else {
|
|
1887
|
-
removeDialog();
|
|
1888
|
-
}
|
|
1889
|
-
} else {
|
|
1890
|
-
renderDialog.value = value;
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1995
|
+
setup(__props) {
|
|
1996
|
+
const props = createPropsRestProxy(__props, ["status", "size", "label"]);
|
|
1997
|
+
const accessibleTitle = computed(
|
|
1998
|
+
() => props.tooltip?.trim() || `Status is ${__props.status}`
|
|
1893
1999
|
);
|
|
1894
2000
|
return (_ctx, _cache) => {
|
|
1895
|
-
return
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
"kds-modal",
|
|
1900
|
-
`width-${__props.width}`,
|
|
1901
|
-
`height-${__props.height}`,
|
|
1902
|
-
`overflow-${__props.overflow}`
|
|
1903
|
-
]),
|
|
1904
|
-
closedby: __props.closedby,
|
|
1905
|
-
onCancel: withModifiers(onClose, ["prevent"])
|
|
2001
|
+
return withDirectives((openBlock(), createElementBlock("span", {
|
|
2002
|
+
class: normalizeClass(["kds-live-status", __props.status, `size-${__props.size}`]),
|
|
2003
|
+
role: "img",
|
|
2004
|
+
"aria-label": accessibleTitle.value
|
|
1906
2005
|
}, [
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
"leading-icon": __props.leadingIcon,
|
|
1917
|
-
variant: __props.variant,
|
|
1918
|
-
overflow: __props.overflow,
|
|
1919
|
-
onClose
|
|
1920
|
-
}, {
|
|
1921
|
-
body: withCtx(() => [
|
|
1922
|
-
renderSlot(_ctx.$slots, "body", {}, void 0, true)
|
|
1923
|
-
]),
|
|
1924
|
-
footer: withCtx(() => [
|
|
1925
|
-
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1926
|
-
]),
|
|
1927
|
-
_: 3
|
|
1928
|
-
}, 8, ["headline", "leading-icon", "variant", "overflow"])
|
|
1929
|
-
], true)
|
|
1930
|
-
], 42, _hoisted_1$11)) : createCommentVNode("", true);
|
|
2006
|
+
_cache[0] || (_cache[0] = createElementVNode("span", { class: "dot" }, null, -1)),
|
|
2007
|
+
__props.label ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$D, [
|
|
2008
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
2009
|
+
])), [
|
|
2010
|
+
[unref(vKdsTooltip), __props.label, "truncated"]
|
|
2011
|
+
]) : createCommentVNode("", true)
|
|
2012
|
+
], 10, _hoisted_1$_)), [
|
|
2013
|
+
[unref(vKdsTooltip), !__props.label ? accessibleTitle.value : void 0]
|
|
2014
|
+
]);
|
|
1931
2015
|
};
|
|
1932
2016
|
}
|
|
1933
2017
|
});
|
|
1934
2018
|
|
|
1935
|
-
const
|
|
2019
|
+
const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-a158abc8"]]);
|
|
1936
2020
|
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
2021
|
+
const kdsLiveStatusStatus = {
|
|
2022
|
+
RED: "red",
|
|
2023
|
+
ORANGE: "orange",
|
|
2024
|
+
GREEN: "green",
|
|
2025
|
+
DISABLED: "disabled"
|
|
2026
|
+
};
|
|
2027
|
+
const kdsLiveStatusStatuses = Object.values(kdsLiveStatusStatus);
|
|
2028
|
+
const kdsLiveStatusSize = {
|
|
2029
|
+
LARGE: "large",
|
|
2030
|
+
MEDIUM: "medium",
|
|
2031
|
+
SMALL: "small"
|
|
2032
|
+
};
|
|
2033
|
+
const kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
|
|
2034
|
+
|
|
2035
|
+
const kdsLoadingSpinnerVariant = {
|
|
2036
|
+
ON_PRIMARY: "onPrimary",
|
|
2037
|
+
ON_SURFACE: "onSurface"
|
|
2038
|
+
};
|
|
2039
|
+
const kdsLoadingSpinnerVariants = Object.values(
|
|
2040
|
+
kdsLoadingSpinnerVariant
|
|
2041
|
+
);
|
|
2042
|
+
|
|
2043
|
+
const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
2044
|
+
__name: "KdsMissingValueIcon",
|
|
1941
2045
|
props: {
|
|
1942
|
-
|
|
1943
|
-
subText: {},
|
|
1944
|
-
error: { type: Boolean, default: false },
|
|
1945
|
-
validating: { type: Boolean, default: false },
|
|
1946
|
-
preserveSubTextSpace: { type: Boolean, default: false }
|
|
2046
|
+
size: {}
|
|
1947
2047
|
},
|
|
1948
2048
|
setup(__props) {
|
|
1949
|
-
const props = createPropsRestProxy(__props, ["error", "validating", "preserveSubTextSpace"]);
|
|
1950
2049
|
return (_ctx, _cache) => {
|
|
1951
|
-
return
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
class:
|
|
1955
|
-
|
|
1956
|
-
error: __props.error
|
|
1957
|
-
})
|
|
1958
|
-
}, [
|
|
1959
|
-
__props.error && props.subText ? (openBlock(), createBlock(KdsIcon, {
|
|
1960
|
-
key: 0,
|
|
1961
|
-
name: "circle-error",
|
|
1962
|
-
size: "small",
|
|
1963
|
-
"aria-label": "Error"
|
|
1964
|
-
})) : __props.validating && props.subText ? (openBlock(), createBlock(KdsLoadingSpinner, {
|
|
1965
|
-
key: 1,
|
|
1966
|
-
size: "small",
|
|
1967
|
-
variant: "onSurface",
|
|
1968
|
-
"aria-hidden": "true"
|
|
1969
|
-
})) : createCommentVNode("", true),
|
|
1970
|
-
createElementVNode("span", _hoisted_2$F, toDisplayString(props.subText), 1)
|
|
1971
|
-
], 10, _hoisted_1$10)) : createCommentVNode("", true);
|
|
2050
|
+
return openBlock(), createBlock(KdsIcon, {
|
|
2051
|
+
name: "circle-question",
|
|
2052
|
+
size: __props.size,
|
|
2053
|
+
class: "kds-missing-value-icon"
|
|
2054
|
+
}, null, 8, ["size"]);
|
|
1972
2055
|
};
|
|
1973
2056
|
}
|
|
1974
2057
|
});
|
|
1975
2058
|
|
|
1976
|
-
const
|
|
2059
|
+
const KdsMissingValueIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["__scopeId", "data-v-df682150"]]);
|
|
1977
2060
|
|
|
1978
|
-
const _hoisted_1
|
|
1979
|
-
const _hoisted_2$
|
|
1980
|
-
const _hoisted_3$
|
|
2061
|
+
const _hoisted_1$Z = { class: "donut-container" };
|
|
2062
|
+
const _hoisted_2$C = ["height", "width", "viewBox"];
|
|
2063
|
+
const _hoisted_3$r = ["r", "stroke-width"];
|
|
2064
|
+
const _hoisted_4$o = ["r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "transform"];
|
|
2065
|
+
const _hoisted_5$f = ["r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "transform"];
|
|
2066
|
+
const _hoisted_6$a = {
|
|
1981
2067
|
key: 0,
|
|
1982
|
-
class: "
|
|
2068
|
+
class: "donut-text"
|
|
1983
2069
|
};
|
|
1984
|
-
const
|
|
1985
|
-
const
|
|
1986
|
-
const _hoisted_6$a = {
|
|
2070
|
+
const _hoisted_7$3 = { class: "title" };
|
|
2071
|
+
const _hoisted_8$3 = {
|
|
1987
2072
|
key: 0,
|
|
1988
|
-
class: "
|
|
2073
|
+
class: "sub-text"
|
|
1989
2074
|
};
|
|
1990
|
-
const
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
2075
|
+
const radius = 22;
|
|
2076
|
+
const innerRadius = 10;
|
|
2077
|
+
const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
2078
|
+
__name: "KdsDonutChart",
|
|
2079
|
+
props: {
|
|
2080
|
+
value: {},
|
|
2081
|
+
secondaryValue: { default: 0 },
|
|
2082
|
+
maxValue: {},
|
|
2083
|
+
acceptValuesLargerThanMax: { type: Boolean, default: false },
|
|
2084
|
+
animate: { type: Boolean, default: true },
|
|
1997
2085
|
label: {},
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
}, {
|
|
2001
|
-
"modelValue": { default: false },
|
|
2002
|
-
"modelModifiers": {}
|
|
2003
|
-
}),
|
|
2004
|
-
emits: ["update:modelValue"],
|
|
2086
|
+
subText: {}
|
|
2087
|
+
},
|
|
2005
2088
|
setup(__props) {
|
|
2006
|
-
const
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
const descriptionId = useId();
|
|
2010
|
-
const isChecked = computed(() => modelValue.value === true);
|
|
2011
|
-
const isIndeterminate = computed(() => modelValue.value === "indeterminate");
|
|
2012
|
-
const icon = computed(() => {
|
|
2013
|
-
if (isChecked.value) {
|
|
2014
|
-
return "checkmark";
|
|
2015
|
-
}
|
|
2016
|
-
if (isIndeterminate.value) {
|
|
2017
|
-
return "minus";
|
|
2018
|
-
}
|
|
2019
|
-
return null;
|
|
2020
|
-
});
|
|
2021
|
-
const ariaChecked = computed(() => {
|
|
2022
|
-
if (isIndeterminate.value) {
|
|
2023
|
-
return "mixed";
|
|
2024
|
-
}
|
|
2025
|
-
return isChecked.value;
|
|
2089
|
+
const clippedValue = computed(() => {
|
|
2090
|
+
const clipValue = Math.max(0, __props.value);
|
|
2091
|
+
return __props.acceptValuesLargerThanMax ? clipValue : Math.min(clipValue, __props.maxValue);
|
|
2026
2092
|
});
|
|
2027
|
-
const
|
|
2028
|
-
const
|
|
2029
|
-
|
|
2030
|
-
ids.push(helperId);
|
|
2031
|
-
}
|
|
2032
|
-
if (props.subText) {
|
|
2033
|
-
ids.push(descriptionId);
|
|
2034
|
-
}
|
|
2035
|
-
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
2093
|
+
const secondaryClippedValue = computed(() => {
|
|
2094
|
+
const clipValue = Math.max(0, __props.secondaryValue + clippedValue.value);
|
|
2095
|
+
return __props.acceptValuesLargerThanMax ? clipValue : Math.min(clipValue, __props.maxValue);
|
|
2036
2096
|
});
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2039
|
-
|
|
2097
|
+
const strokeWidth = computed(() => radius - innerRadius);
|
|
2098
|
+
const r = computed(() => radius - strokeWidth.value / 2);
|
|
2099
|
+
const diameter = computed(() => 2 * radius);
|
|
2100
|
+
const viewBox = computed(() => `0 0 ${diameter.value} ${diameter.value}`);
|
|
2101
|
+
const circumference = computed(() => 2 * Math.PI * r.value);
|
|
2102
|
+
const calcStrokeDashOffset = (value) => {
|
|
2103
|
+
if (__props.maxValue <= 0 || !Number.isFinite(__props.maxValue)) {
|
|
2104
|
+
return circumference.value;
|
|
2040
2105
|
}
|
|
2041
|
-
|
|
2106
|
+
const strokeDiff = Math.min(
|
|
2107
|
+
value / __props.maxValue * circumference.value,
|
|
2108
|
+
circumference.value
|
|
2109
|
+
);
|
|
2110
|
+
return Math.max(circumference.value - strokeDiff, 0);
|
|
2042
2111
|
};
|
|
2112
|
+
const strokeDashOffset = computed(
|
|
2113
|
+
() => calcStrokeDashOffset(clippedValue.value)
|
|
2114
|
+
);
|
|
2115
|
+
const secondaryStrokeDashOffset = computed(
|
|
2116
|
+
() => calcStrokeDashOffset(secondaryClippedValue.value)
|
|
2117
|
+
);
|
|
2118
|
+
const transformWedge = computed(() => `rotate(-90, ${radius}, ${radius})`);
|
|
2119
|
+
const disabled = computed(() => !Number.isFinite(__props.maxValue));
|
|
2043
2120
|
return (_ctx, _cache) => {
|
|
2044
|
-
return openBlock(), createElementBlock("div",
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
disabled: __props.disabled,
|
|
2051
|
-
error: __props.error
|
|
2052
|
-
}),
|
|
2053
|
-
disabled: __props.disabled,
|
|
2054
|
-
"aria-label": props.title,
|
|
2055
|
-
"aria-checked": ariaChecked.value,
|
|
2056
|
-
"aria-describedby": ariaDescribedBy.value,
|
|
2057
|
-
"aria-invalid": __props.error,
|
|
2058
|
-
type: "button",
|
|
2059
|
-
role: "checkbox",
|
|
2060
|
-
onClick: handleClick
|
|
2121
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Z, [
|
|
2122
|
+
(openBlock(), createElementBlock("svg", {
|
|
2123
|
+
height: diameter.value,
|
|
2124
|
+
width: diameter.value,
|
|
2125
|
+
viewBox: viewBox.value,
|
|
2126
|
+
class: "donut-chart"
|
|
2061
2127
|
}, [
|
|
2062
|
-
createElementVNode("
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
"
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2128
|
+
createElementVNode("circle", {
|
|
2129
|
+
class: "background-circle",
|
|
2130
|
+
cx: radius,
|
|
2131
|
+
cy: radius,
|
|
2132
|
+
r: r.value,
|
|
2133
|
+
"stroke-width": strokeWidth.value,
|
|
2134
|
+
fill: "transparent"
|
|
2135
|
+
}, null, 8, _hoisted_3$r),
|
|
2136
|
+
__props.secondaryValue && !disabled.value ? (openBlock(), createElementBlock("circle", {
|
|
2137
|
+
key: 0,
|
|
2138
|
+
class: normalizeClass(["value-wedge", "secondary-circle", { animate: __props.animate }]),
|
|
2139
|
+
cx: radius,
|
|
2140
|
+
cy: radius,
|
|
2141
|
+
r: r.value,
|
|
2142
|
+
"stroke-width": strokeWidth.value,
|
|
2143
|
+
"stroke-dasharray": circumference.value,
|
|
2144
|
+
"stroke-dashoffset": secondaryStrokeDashOffset.value,
|
|
2145
|
+
fill: "transparent",
|
|
2146
|
+
transform: transformWedge.value
|
|
2147
|
+
}, null, 10, _hoisted_4$o)) : createCommentVNode("", true),
|
|
2148
|
+
!disabled.value ? (openBlock(), createElementBlock("circle", {
|
|
2149
|
+
key: 1,
|
|
2150
|
+
class: normalizeClass(["value-wedge", "primary-circle", { animate: __props.animate }]),
|
|
2151
|
+
cx: radius,
|
|
2152
|
+
cy: radius,
|
|
2153
|
+
r: r.value,
|
|
2154
|
+
"stroke-width": strokeWidth.value,
|
|
2155
|
+
"stroke-dasharray": circumference.value,
|
|
2156
|
+
"stroke-dashoffset": strokeDashOffset.value,
|
|
2157
|
+
fill: "transparent",
|
|
2158
|
+
transform: transformWedge.value
|
|
2159
|
+
}, null, 10, _hoisted_5$f)) : createCommentVNode("", true)
|
|
2160
|
+
], 8, _hoisted_2$C)),
|
|
2161
|
+
__props.label ? (openBlock(), createElementBlock("div", _hoisted_6$a, [
|
|
2162
|
+
createElementVNode("div", _hoisted_7$3, toDisplayString(__props.label), 1),
|
|
2163
|
+
__props.subText ? (openBlock(), createElementBlock("div", _hoisted_8$3, toDisplayString(__props.subText), 1)) : createCommentVNode("", true)
|
|
2088
2164
|
])) : createCommentVNode("", true)
|
|
2089
2165
|
]);
|
|
2090
2166
|
};
|
|
2091
2167
|
}
|
|
2092
2168
|
});
|
|
2093
2169
|
|
|
2094
|
-
const
|
|
2170
|
+
const KdsDonutChart = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["__scopeId", "data-v-3cea3ddf"]]);
|
|
2095
2171
|
|
|
2096
|
-
const _sfc_main$
|
|
2097
|
-
__name: "KdsCheckbox",
|
|
2098
|
-
props: /* @__PURE__ */ mergeModels({
|
|
2099
|
-
disabled: { type: Boolean, default: false },
|
|
2100
|
-
error: { type: Boolean, default: false },
|
|
2101
|
-
subText: {},
|
|
2102
|
-
preserveSubTextSpace: { type: Boolean, default: false },
|
|
2103
|
-
label: {},
|
|
2104
|
-
title: {},
|
|
2105
|
-
modelValue: {}
|
|
2106
|
-
}, {
|
|
2107
|
-
"modelValue": { default: false },
|
|
2108
|
-
"modelModifiers": {}
|
|
2109
|
-
}),
|
|
2110
|
-
emits: ["update:modelValue"],
|
|
2111
|
-
setup(__props) {
|
|
2112
|
-
const props = createPropsRestProxy(__props, ["disabled", "error", "preserveSubTextSpace"]);
|
|
2113
|
-
const modelValue = useModel(__props, "modelValue");
|
|
2114
|
-
return (_ctx, _cache) => {
|
|
2115
|
-
return openBlock(), createBlock(BaseCheckbox, mergeProps(props, {
|
|
2116
|
-
modelValue: modelValue.value,
|
|
2117
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
2118
|
-
disabled: __props.disabled,
|
|
2119
|
-
error: __props.error,
|
|
2120
|
-
"preserve-sub-text-space": __props.preserveSubTextSpace
|
|
2121
|
-
}), null, 16, ["modelValue", "disabled", "error", "preserve-sub-text-space"]);
|
|
2122
|
-
};
|
|
2123
|
-
}
|
|
2124
|
-
});
|
|
2172
|
+
const _sfc_main$1t = { };
|
|
2125
2173
|
|
|
2126
|
-
const
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
const
|
|
2135
|
-
|
|
2136
|
-
const unwrappedPromise = ref(createUnwrappedPromise());
|
|
2137
|
-
const resetInternalState = () => {
|
|
2138
|
-
isActive.value = false;
|
|
2139
|
-
unwrappedPromise.value = createUnwrappedPromise();
|
|
2140
|
-
};
|
|
2141
|
-
const onClosed = () => {
|
|
2142
|
-
activeModalConfig.value = null;
|
|
2143
|
-
};
|
|
2144
|
-
const confirm = (doNotAskAgain = false) => {
|
|
2145
|
-
unwrappedPromise.value.resolve({
|
|
2146
|
-
confirmed: true,
|
|
2147
|
-
doNotAskAgain
|
|
2148
|
-
});
|
|
2149
|
-
resetInternalState();
|
|
2150
|
-
};
|
|
2151
|
-
const close = () => {
|
|
2152
|
-
const isConfirm = activeModalConfig.value?.type === "confirm";
|
|
2153
|
-
unwrappedPromise.value.resolve(isConfirm ? { confirmed: false } : void 0);
|
|
2154
|
-
resetInternalState();
|
|
2155
|
-
};
|
|
2156
|
-
const isTemplateBasedConfirm = (config) => {
|
|
2157
|
-
return "component" in config;
|
|
2174
|
+
const _hoisted_1$Y = { class: "kds-divider" };
|
|
2175
|
+
|
|
2176
|
+
function _sfc_render$1(_ctx, _cache) {
|
|
2177
|
+
return (openBlock(), createElementBlock("hr", _hoisted_1$Y))
|
|
2178
|
+
}
|
|
2179
|
+
const KdsDivider = /*#__PURE__*/_export_sfc(_sfc_main$1t, [['render',_sfc_render$1],['__scopeId',"data-v-4d059bd3"]]);
|
|
2180
|
+
|
|
2181
|
+
const getAppInstance = () => {
|
|
2182
|
+
const currentInstance = getCurrentInstance();
|
|
2183
|
+
return currentInstance?.appContext.app;
|
|
2158
2184
|
};
|
|
2159
|
-
const
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2185
|
+
const resolveNuxtLinkComponent = () => {
|
|
2186
|
+
const app = getAppInstance();
|
|
2187
|
+
const nuxtLinkComponent = app?.component("NuxtLink");
|
|
2188
|
+
if (nuxtLinkComponent) {
|
|
2189
|
+
return nuxtLinkComponent;
|
|
2163
2190
|
}
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
activeModalConfig.value = {
|
|
2178
|
-
type: "confirm",
|
|
2179
|
-
value: {
|
|
2180
|
-
buttons: [defaultCancelButton, defaultConfirmButton],
|
|
2181
|
-
...config
|
|
2191
|
+
const routerLinkComponent = app?.component("RouterLink");
|
|
2192
|
+
if (routerLinkComponent) {
|
|
2193
|
+
return routerLinkComponent;
|
|
2194
|
+
}
|
|
2195
|
+
const fallbackComponent = defineComponent({
|
|
2196
|
+
props: {
|
|
2197
|
+
to: {
|
|
2198
|
+
type: String,
|
|
2199
|
+
default: ""
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
render() {
|
|
2203
|
+
return h$1("a", { href: this.to }, [useSlots().default?.()]);
|
|
2182
2204
|
}
|
|
2183
|
-
};
|
|
2184
|
-
|
|
2185
|
-
return unwrappedPromise.value.promise;
|
|
2186
|
-
}
|
|
2187
|
-
const showByTemplate = (config) => {
|
|
2188
|
-
activeModalConfig.value = {
|
|
2189
|
-
type: "dynamic",
|
|
2190
|
-
value: config
|
|
2191
|
-
};
|
|
2192
|
-
isActive.value = true;
|
|
2193
|
-
return unwrappedPromise.value.promise;
|
|
2194
|
-
};
|
|
2195
|
-
const useKdsDynamicModal = () => {
|
|
2196
|
-
return {
|
|
2197
|
-
askConfirmation,
|
|
2198
|
-
showByTemplate,
|
|
2199
|
-
config: computed(() => activeModalConfig.value),
|
|
2200
|
-
isActive: computed(() => isActive.value),
|
|
2201
|
-
close: () => internal.close()
|
|
2202
|
-
};
|
|
2205
|
+
});
|
|
2206
|
+
return fallbackComponent;
|
|
2203
2207
|
};
|
|
2204
2208
|
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
const _hoisted_2$D = { class: "message" };
|
|
2210
|
-
const _hoisted_3$r = {
|
|
2211
|
-
key: 0,
|
|
2212
|
-
class: "ask-again"
|
|
2213
|
-
};
|
|
2214
|
-
const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
2215
|
-
__name: "KdsDynamicModalProvider",
|
|
2216
|
-
setup(__props) {
|
|
2217
|
-
const askAgain = ref(false);
|
|
2218
|
-
const { config, isActive } = useKdsDynamicModal();
|
|
2219
|
-
const reset = () => {
|
|
2220
|
-
askAgain.value = false;
|
|
2221
|
-
};
|
|
2222
|
-
const onConfirm = () => {
|
|
2223
|
-
internal.confirm(askAgain.value);
|
|
2224
|
-
reset();
|
|
2225
|
-
};
|
|
2226
|
-
const onClose = () => {
|
|
2227
|
-
internal.close();
|
|
2228
|
-
reset();
|
|
2229
|
-
};
|
|
2230
|
-
const handleConfirmButton = (button) => {
|
|
2231
|
-
if (!button.customHandler) {
|
|
2232
|
-
const handler = button.type === "cancel" ? onClose : onConfirm;
|
|
2233
|
-
handler();
|
|
2234
|
-
return;
|
|
2235
|
-
}
|
|
2236
|
-
if (button.type === "cancel") {
|
|
2237
|
-
button.customHandler({ cancel: onClose });
|
|
2238
|
-
}
|
|
2239
|
-
if (button.type === "confirm") {
|
|
2240
|
-
button.customHandler({ confirm: onConfirm });
|
|
2241
|
-
}
|
|
2242
|
-
};
|
|
2243
|
-
const defaultVariant = (type) => type === "cancel" ? "transparent" : "filled";
|
|
2244
|
-
const kdsModalProps = computed(() => {
|
|
2245
|
-
if (!config.value) {
|
|
2246
|
-
return {};
|
|
2247
|
-
}
|
|
2248
|
-
const { leadingIcon, headline, height, width, variant, overflow, closedby } = config.value.value;
|
|
2249
|
-
return {
|
|
2250
|
-
leadingIcon,
|
|
2251
|
-
headline,
|
|
2252
|
-
height,
|
|
2253
|
-
width,
|
|
2254
|
-
variant,
|
|
2255
|
-
overflow,
|
|
2256
|
-
closedby,
|
|
2257
|
-
onClose,
|
|
2258
|
-
onClosed: internal.onClosed,
|
|
2259
|
-
active: isActive.value
|
|
2260
|
-
};
|
|
2261
|
-
});
|
|
2262
|
-
return (_ctx, _cache) => {
|
|
2263
|
-
return openBlock(), createBlock(KdsModal, mergeProps({ class: "confirm-modal" }, kdsModalProps.value), createSlots({ _: 2 }, [
|
|
2264
|
-
unref(config)?.type === "confirm" ? {
|
|
2265
|
-
name: "body",
|
|
2266
|
-
fn: withCtx(() => [
|
|
2267
|
-
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$_, [
|
|
2268
|
-
createElementVNode("div", _hoisted_2$D, toDisplayString(unref(config).value.message), 1),
|
|
2269
|
-
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3$r, [
|
|
2270
|
-
createVNode(_sfc_main$1v, {
|
|
2271
|
-
modelValue: askAgain.value,
|
|
2272
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
2273
|
-
label: unref(config).value.doNotAskAgain.label,
|
|
2274
|
-
"sub-text": unref(config).value.doNotAskAgain.subText
|
|
2275
|
-
}, null, 8, ["modelValue", "label", "sub-text"])
|
|
2276
|
-
])) : createCommentVNode("", true)
|
|
2277
|
-
]))
|
|
2278
|
-
]),
|
|
2279
|
-
key: "0"
|
|
2280
|
-
} : void 0,
|
|
2281
|
-
unref(config)?.type === "confirm" ? {
|
|
2282
|
-
name: "footer",
|
|
2283
|
-
fn: withCtx(() => [
|
|
2284
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
|
|
2285
|
-
return openBlock(), createBlock(_sfc_main$1B, {
|
|
2286
|
-
key: index,
|
|
2287
|
-
destructive: button.destructive,
|
|
2288
|
-
autofocus: button.autofocus,
|
|
2289
|
-
label: button.label,
|
|
2290
|
-
variant: button.variant ?? defaultVariant(button.type),
|
|
2291
|
-
class: normalizeClass({ "flush-left": button.flushLeft }),
|
|
2292
|
-
"data-test-id": `${button.type}-button`,
|
|
2293
|
-
onClick: ($event) => handleConfirmButton(button)
|
|
2294
|
-
}, null, 8, ["destructive", "autofocus", "label", "variant", "class", "data-test-id", "onClick"]);
|
|
2295
|
-
}), 128))
|
|
2296
|
-
]),
|
|
2297
|
-
key: "1"
|
|
2298
|
-
} : void 0,
|
|
2299
|
-
unref(config)?.type === "dynamic" ? {
|
|
2300
|
-
name: "default",
|
|
2301
|
-
fn: withCtx((slotProps) => [
|
|
2302
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), normalizeProps(guardReactiveProps({
|
|
2303
|
-
...slotProps,
|
|
2304
|
-
context: unref(config).value.context,
|
|
2305
|
-
updateConfig: unref(internal).updateConfig
|
|
2306
|
-
})), null, 16))
|
|
2307
|
-
]),
|
|
2308
|
-
key: "2"
|
|
2309
|
-
} : void 0
|
|
2310
|
-
]), 1040);
|
|
2311
|
-
};
|
|
2209
|
+
function isExternalUrl(url) {
|
|
2210
|
+
const normalized = url.trim();
|
|
2211
|
+
if (!normalized) {
|
|
2212
|
+
return false;
|
|
2312
2213
|
}
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
TOP_LEFT: "top-left",
|
|
2319
|
-
TOP_CENTER: "top-center",
|
|
2320
|
-
TOP_RIGHT: "top-right",
|
|
2321
|
-
BOTTOM_LEFT: "bottom-left",
|
|
2322
|
-
BOTTOM_CENTER: "bottom-center",
|
|
2323
|
-
BOTTOM_RIGHT: "bottom-right",
|
|
2324
|
-
CUSTOM: "custom"
|
|
2325
|
-
};
|
|
2326
|
-
const kdsPopoverPlacements = Object.values(kdsPopoverPlacement);
|
|
2327
|
-
const kdsPopoverRole = {
|
|
2328
|
-
DIALOG: "dialog",
|
|
2329
|
-
MENU: "menu",
|
|
2330
|
-
LISTBOX: "listbox"
|
|
2331
|
-
};
|
|
2332
|
-
const kdsPopoverRoles = Object.values(kdsPopoverRole);
|
|
2333
|
-
const kdsPopoverType = {
|
|
2334
|
-
AUTO: "auto",
|
|
2335
|
-
MANUAL: "manual"
|
|
2336
|
-
};
|
|
2337
|
-
const kdsPopoverTypes = Object.values(kdsPopoverType);
|
|
2214
|
+
if (normalized.startsWith("#") || normalized.startsWith("/") && !normalized.startsWith("//") || normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("?")) {
|
|
2215
|
+
return false;
|
|
2216
|
+
}
|
|
2217
|
+
return true;
|
|
2218
|
+
}
|
|
2338
2219
|
|
|
2339
|
-
const
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
})
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
const open = useModel(__props, "modelValue");
|
|
2363
|
-
const popoverEl = useTemplateRef("popoverEl");
|
|
2364
|
-
const popoverId = useId();
|
|
2365
|
-
const anchorName = `--anchor-${popoverId}`;
|
|
2366
|
-
watchEffect(() => {
|
|
2367
|
-
if (open.value) {
|
|
2368
|
-
popoverEl.value?.showPopover?.();
|
|
2369
|
-
} else {
|
|
2370
|
-
popoverEl.value?.hidePopover?.();
|
|
2371
|
-
}
|
|
2372
|
-
});
|
|
2373
|
-
const anchorStyle = __props.placement === kdsPopoverPlacement.CUSTOM ? {} : { "anchor-name": anchorName };
|
|
2374
|
-
const onToggle = (event) => {
|
|
2375
|
-
open.value = event.newState === "open";
|
|
2376
|
-
};
|
|
2377
|
-
__expose({ anchorStyle, popoverId });
|
|
2378
|
-
const wrapperStyles = computed(() => {
|
|
2379
|
-
if (__props.placement === kdsPopoverPlacement.CUSTOM && props.customPlacementPosition) {
|
|
2220
|
+
const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
2221
|
+
__name: "KdsLinkButton",
|
|
2222
|
+
props: {
|
|
2223
|
+
dataTestId: {},
|
|
2224
|
+
size: {},
|
|
2225
|
+
disabled: { type: Boolean, default: false },
|
|
2226
|
+
tooltip: {},
|
|
2227
|
+
variant: { default: "filled" },
|
|
2228
|
+
label: {},
|
|
2229
|
+
leadingIcon: {},
|
|
2230
|
+
trailingIcon: {},
|
|
2231
|
+
ariaLabel: {},
|
|
2232
|
+
destructive: { type: Boolean },
|
|
2233
|
+
to: {},
|
|
2234
|
+
download: { type: Boolean, default: () => void 0 },
|
|
2235
|
+
target: { default: null },
|
|
2236
|
+
rel: { default: null }
|
|
2237
|
+
},
|
|
2238
|
+
emits: ["click"],
|
|
2239
|
+
setup(__props, { emit: __emit }) {
|
|
2240
|
+
const rawProps = createPropsRestProxy(__props, ["variant", "disabled", "download", "rel", "target"]);
|
|
2241
|
+
const props = computed(() => {
|
|
2242
|
+
if (isExternalUrl(rawProps.to)) {
|
|
2380
2243
|
return {
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
top: `${props.customPlacementPosition.y}px`
|
|
2244
|
+
...rawProps,
|
|
2245
|
+
trailingIcon: "external-link"
|
|
2384
2246
|
};
|
|
2385
2247
|
}
|
|
2386
|
-
return
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2248
|
+
return rawProps;
|
|
2249
|
+
});
|
|
2250
|
+
const component = computed(() => {
|
|
2251
|
+
if (__props.disabled) {
|
|
2252
|
+
return "button";
|
|
2253
|
+
}
|
|
2254
|
+
return resolveNuxtLinkComponent();
|
|
2390
2255
|
});
|
|
2256
|
+
const emit = __emit;
|
|
2391
2257
|
return (_ctx, _cache) => {
|
|
2392
|
-
return openBlock(),
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
}, [
|
|
2402
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2403
|
-
props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$C, toDisplayString(props.content), 1)) : createCommentVNode("", true)
|
|
2404
|
-
], true)
|
|
2405
|
-
], 46, _hoisted_1$Z);
|
|
2258
|
+
return openBlock(), createBlock(BaseButton, mergeProps(props.value, {
|
|
2259
|
+
variant: __props.variant,
|
|
2260
|
+
disabled: __props.disabled,
|
|
2261
|
+
download: __props.download,
|
|
2262
|
+
rel: __props.rel,
|
|
2263
|
+
target: __props.target,
|
|
2264
|
+
component: component.value,
|
|
2265
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event))
|
|
2266
|
+
}), null, 16, ["variant", "disabled", "download", "rel", "target", "component"]);
|
|
2406
2267
|
};
|
|
2407
2268
|
}
|
|
2408
2269
|
});
|
|
2409
2270
|
|
|
2410
|
-
const
|
|
2271
|
+
const BYTE_UNITS = [
|
|
2272
|
+
'B',
|
|
2273
|
+
'kB',
|
|
2274
|
+
'MB',
|
|
2275
|
+
'GB',
|
|
2276
|
+
'TB',
|
|
2277
|
+
'PB',
|
|
2278
|
+
'EB',
|
|
2279
|
+
'ZB',
|
|
2280
|
+
'YB',
|
|
2281
|
+
];
|
|
2411
2282
|
|
|
2412
|
-
const
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2283
|
+
const BIBYTE_UNITS = [
|
|
2284
|
+
'B',
|
|
2285
|
+
'KiB',
|
|
2286
|
+
'MiB',
|
|
2287
|
+
'GiB',
|
|
2288
|
+
'TiB',
|
|
2289
|
+
'PiB',
|
|
2290
|
+
'EiB',
|
|
2291
|
+
'ZiB',
|
|
2292
|
+
'YiB',
|
|
2293
|
+
];
|
|
2416
2294
|
|
|
2417
|
-
const
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2295
|
+
const BIT_UNITS = [
|
|
2296
|
+
'b',
|
|
2297
|
+
'kbit',
|
|
2298
|
+
'Mbit',
|
|
2299
|
+
'Gbit',
|
|
2300
|
+
'Tbit',
|
|
2301
|
+
'Pbit',
|
|
2302
|
+
'Ebit',
|
|
2303
|
+
'Zbit',
|
|
2304
|
+
'Ybit',
|
|
2305
|
+
];
|
|
2306
|
+
|
|
2307
|
+
const BIBIT_UNITS = [
|
|
2308
|
+
'b',
|
|
2309
|
+
'kibit',
|
|
2310
|
+
'Mibit',
|
|
2311
|
+
'Gibit',
|
|
2312
|
+
'Tibit',
|
|
2313
|
+
'Pibit',
|
|
2314
|
+
'Eibit',
|
|
2315
|
+
'Zibit',
|
|
2316
|
+
'Yibit',
|
|
2317
|
+
];
|
|
2318
|
+
|
|
2319
|
+
/*
|
|
2320
|
+
Formats the given number using `Number#toLocaleString`.
|
|
2321
|
+
- If locale is a string, the value is expected to be a locale-key (for example: `de`).
|
|
2322
|
+
- If locale is true, the system default locale is used for translation.
|
|
2323
|
+
- If no value for locale is specified, the number is returned unmodified.
|
|
2324
|
+
*/
|
|
2325
|
+
const toLocaleString = (number, locale, options) => {
|
|
2326
|
+
let result = number;
|
|
2327
|
+
if (typeof locale === 'string' || Array.isArray(locale)) {
|
|
2328
|
+
result = number.toLocaleString(locale, options);
|
|
2329
|
+
} else if (locale === true || options !== undefined) {
|
|
2330
|
+
result = number.toLocaleString(undefined, options);
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
return result;
|
|
2334
|
+
};
|
|
2335
|
+
|
|
2336
|
+
const log10 = numberOrBigInt => {
|
|
2337
|
+
if (typeof numberOrBigInt === 'number') {
|
|
2338
|
+
return Math.log10(numberOrBigInt);
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
const string = numberOrBigInt.toString(10);
|
|
2342
|
+
|
|
2343
|
+
return string.length + Math.log10(`0.${string.slice(0, 15)}`);
|
|
2344
|
+
};
|
|
2345
|
+
|
|
2346
|
+
const log = numberOrBigInt => {
|
|
2347
|
+
if (typeof numberOrBigInt === 'number') {
|
|
2348
|
+
return Math.log(numberOrBigInt);
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
return log10(numberOrBigInt) * Math.log(10);
|
|
2352
|
+
};
|
|
2353
|
+
|
|
2354
|
+
const divide = (numberOrBigInt, divisor) => {
|
|
2355
|
+
if (typeof numberOrBigInt === 'number') {
|
|
2356
|
+
return numberOrBigInt / divisor;
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
const integerPart = numberOrBigInt / BigInt(divisor);
|
|
2360
|
+
const remainder = numberOrBigInt % BigInt(divisor);
|
|
2361
|
+
return Number(integerPart) + (Number(remainder) / divisor);
|
|
2362
|
+
};
|
|
2363
|
+
|
|
2364
|
+
const applyFixedWidth = (result, fixedWidth) => {
|
|
2365
|
+
if (fixedWidth === undefined) {
|
|
2366
|
+
return result;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
if (typeof fixedWidth !== 'number' || !Number.isSafeInteger(fixedWidth) || fixedWidth < 0) {
|
|
2370
|
+
throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof fixedWidth}: ${fixedWidth}`);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
if (fixedWidth === 0) {
|
|
2374
|
+
return result;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
return result.length < fixedWidth ? result.padStart(fixedWidth, ' ') : result;
|
|
2378
|
+
};
|
|
2379
|
+
|
|
2380
|
+
const buildLocaleOptions = options => {
|
|
2381
|
+
const {minimumFractionDigits, maximumFractionDigits} = options;
|
|
2382
|
+
|
|
2383
|
+
if (minimumFractionDigits === undefined && maximumFractionDigits === undefined) {
|
|
2384
|
+
return undefined;
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
return {
|
|
2388
|
+
...(minimumFractionDigits !== undefined && {minimumFractionDigits}),
|
|
2389
|
+
...(maximumFractionDigits !== undefined && {maximumFractionDigits}),
|
|
2390
|
+
roundingMode: 'trunc',
|
|
2391
|
+
};
|
|
2392
|
+
};
|
|
2393
|
+
|
|
2394
|
+
function prettyBytes(number, options) {
|
|
2395
|
+
if (typeof number !== 'bigint' && !Number.isFinite(number)) {
|
|
2396
|
+
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
options = {
|
|
2400
|
+
bits: false,
|
|
2401
|
+
binary: false,
|
|
2402
|
+
space: true,
|
|
2403
|
+
nonBreakingSpace: false,
|
|
2404
|
+
...options,
|
|
2405
|
+
};
|
|
2406
|
+
|
|
2407
|
+
const UNITS = options.bits
|
|
2408
|
+
? (options.binary ? BIBIT_UNITS : BIT_UNITS)
|
|
2409
|
+
: (options.binary ? BIBYTE_UNITS : BYTE_UNITS);
|
|
2410
|
+
|
|
2411
|
+
const separator = options.space ? (options.nonBreakingSpace ? '\u00A0' : ' ') : '';
|
|
2412
|
+
|
|
2413
|
+
// Handle signed zero case
|
|
2414
|
+
const isZero = typeof number === 'number' ? number === 0 : number === 0n;
|
|
2415
|
+
if (options.signed && isZero) {
|
|
2416
|
+
const result = ` 0${separator}${UNITS[0]}`;
|
|
2417
|
+
return applyFixedWidth(result, options.fixedWidth);
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
const isNegative = number < 0;
|
|
2421
|
+
const prefix = isNegative ? '-' : (options.signed ? '+' : '');
|
|
2422
|
+
|
|
2423
|
+
if (isNegative) {
|
|
2424
|
+
number = -number;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
const localeOptions = buildLocaleOptions(options);
|
|
2428
|
+
let result;
|
|
2429
|
+
|
|
2430
|
+
if (number < 1) {
|
|
2431
|
+
const numberString = toLocaleString(number, options.locale, localeOptions);
|
|
2432
|
+
result = prefix + numberString + separator + UNITS[0];
|
|
2433
|
+
} else {
|
|
2434
|
+
const exponent = Math.min(Math.floor(options.binary ? log(number) / Math.log(1024) : log10(number) / 3), UNITS.length - 1);
|
|
2435
|
+
number = divide(number, (options.binary ? 1024 : 1000) ** exponent);
|
|
2451
2436
|
|
|
2452
|
-
|
|
2437
|
+
if (!localeOptions) {
|
|
2438
|
+
const minPrecision = Math.max(3, Math.floor(number).toString().length);
|
|
2439
|
+
number = number.toPrecision(minPrecision);
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
|
|
2443
|
+
const unit = UNITS[exponent];
|
|
2444
|
+
result = prefix + numberString + separator + unit;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
return applyFixedWidth(result, options.fixedWidth);
|
|
2448
|
+
}
|
|
2453
2449
|
|
|
2454
2450
|
const _hoisted_1$X = { class: "label" };
|
|
2455
2451
|
const _hoisted_2$B = {
|
|
@@ -2576,7 +2572,7 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
|
2576
2572
|
dataTestId: {},
|
|
2577
2573
|
size: {},
|
|
2578
2574
|
disabled: { type: Boolean },
|
|
2579
|
-
|
|
2575
|
+
tooltip: {},
|
|
2580
2576
|
variant: { default: "outlined" },
|
|
2581
2577
|
label: {},
|
|
2582
2578
|
leadingIcon: {},
|
|
@@ -2616,7 +2612,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
2616
2612
|
dataTestId: {},
|
|
2617
2613
|
size: { default: "medium" },
|
|
2618
2614
|
disabled: { type: Boolean, default: false },
|
|
2619
|
-
|
|
2615
|
+
tooltip: {},
|
|
2620
2616
|
variant: { default: "filled" },
|
|
2621
2617
|
state: {},
|
|
2622
2618
|
label: {},
|
|
@@ -2652,8 +2648,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
2652
2648
|
size: __props.size,
|
|
2653
2649
|
disabled: __props.disabled,
|
|
2654
2650
|
success: state.value === "success",
|
|
2655
|
-
error: state.value === "error"
|
|
2656
|
-
title: props.ariaLabel
|
|
2651
|
+
error: state.value === "error"
|
|
2657
2652
|
}));
|
|
2658
2653
|
return (_ctx, _cache) => {
|
|
2659
2654
|
return openBlock(), createBlock(BaseButton, mergeProps(baseButtonProps.value, {
|
|
@@ -2691,7 +2686,7 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
2691
2686
|
}
|
|
2692
2687
|
});
|
|
2693
2688
|
|
|
2694
|
-
const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["__scopeId", "data-v-
|
|
2689
|
+
const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["__scopeId", "data-v-a639a0ef"]]);
|
|
2695
2690
|
|
|
2696
2691
|
const kdsProgressButtonState = {
|
|
2697
2692
|
DEFAULT: "default",
|
|
@@ -2939,16 +2934,16 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
|
2939
2934
|
return (_ctx, _cache) => {
|
|
2940
2935
|
return props.accessory.type === "avatar" ? (openBlock(), createBlock(KdsAvatar, {
|
|
2941
2936
|
key: 0,
|
|
2942
|
-
|
|
2937
|
+
tooltip: props.accessory.tooltip,
|
|
2943
2938
|
src: props.accessory.src,
|
|
2944
2939
|
initials: props.accessory.initials,
|
|
2945
2940
|
size: props.size
|
|
2946
|
-
}, null, 8, ["
|
|
2941
|
+
}, null, 8, ["tooltip", "src", "initials", "size"])) : props.accessory.type === "colorSwatch" ? (openBlock(), createBlock(KdsColorSwatch, {
|
|
2947
2942
|
key: 1,
|
|
2948
2943
|
color: props.accessory.color,
|
|
2949
|
-
|
|
2944
|
+
tooltip: props.accessory.tooltip,
|
|
2950
2945
|
size: props.size
|
|
2951
|
-
}, null, 8, ["color", "
|
|
2946
|
+
}, null, 8, ["color", "tooltip", "size"])) : props.accessory.type === "icon" ? (openBlock(), createBlock(KdsIcon, {
|
|
2952
2947
|
key: 2,
|
|
2953
2948
|
name: props.accessory.name,
|
|
2954
2949
|
size: props.size,
|
|
@@ -2961,9 +2956,9 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
|
2961
2956
|
}, null, 8, ["icon-name", "size", "disabled"])) : props.accessory.type === "liveStatus" ? (openBlock(), createBlock(unref(KdsLiveStatus), {
|
|
2962
2957
|
key: 4,
|
|
2963
2958
|
status: props.accessory.status,
|
|
2964
|
-
|
|
2959
|
+
tooltip: props.accessory.tooltip,
|
|
2965
2960
|
size: props.size
|
|
2966
|
-
}, null, 8, ["status", "
|
|
2961
|
+
}, null, 8, ["status", "tooltip", "size"])) : createCommentVNode("", true);
|
|
2967
2962
|
};
|
|
2968
2963
|
}
|
|
2969
2964
|
});
|
|
@@ -3556,7 +3551,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
3556
3551
|
dataTestId: {},
|
|
3557
3552
|
size: {},
|
|
3558
3553
|
disabled: { type: Boolean },
|
|
3559
|
-
|
|
3554
|
+
tooltip: {},
|
|
3560
3555
|
variant: { default: "outlined" },
|
|
3561
3556
|
label: {},
|
|
3562
3557
|
leadingIcon: {},
|
|
@@ -3650,7 +3645,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
3650
3645
|
dataTestId: {},
|
|
3651
3646
|
size: { default: "medium" },
|
|
3652
3647
|
disabled: { type: Boolean },
|
|
3653
|
-
|
|
3648
|
+
tooltip: {},
|
|
3654
3649
|
variant: { default: "filled" },
|
|
3655
3650
|
label: {},
|
|
3656
3651
|
leadingIcon: {},
|
|
@@ -3754,8 +3749,8 @@ const kdsActionButtonType = {
|
|
|
3754
3749
|
const kdsActionButtonTypes = Object.values(kdsActionButtonType);
|
|
3755
3750
|
|
|
3756
3751
|
const typeToComponent = {
|
|
3757
|
-
KdsButton: _sfc_main$
|
|
3758
|
-
KdsLinkButton: _sfc_main$
|
|
3752
|
+
KdsButton: _sfc_main$1I,
|
|
3753
|
+
KdsLinkButton: _sfc_main$1s,
|
|
3759
3754
|
KdsSplitButton,
|
|
3760
3755
|
KdsMenuButton: _sfc_main$1j,
|
|
3761
3756
|
KdsProgressButton,
|
|
@@ -3769,7 +3764,7 @@ const iconOnlyBindings = (entry, leadingIcon, ariaLabel) => {
|
|
|
3769
3764
|
label: _label,
|
|
3770
3765
|
trailingIcon: _trailingIcon,
|
|
3771
3766
|
ariaLabel: _ariaLabel,
|
|
3772
|
-
|
|
3767
|
+
tooltip,
|
|
3773
3768
|
leadingIcon: _leadingIcon,
|
|
3774
3769
|
...rest
|
|
3775
3770
|
} = entry.meta;
|
|
@@ -3777,7 +3772,7 @@ const iconOnlyBindings = (entry, leadingIcon, ariaLabel) => {
|
|
|
3777
3772
|
...rest,
|
|
3778
3773
|
leadingIcon,
|
|
3779
3774
|
ariaLabel,
|
|
3780
|
-
|
|
3775
|
+
tooltip: tooltip ?? ariaLabel
|
|
3781
3776
|
};
|
|
3782
3777
|
};
|
|
3783
3778
|
const hasLeadingIcon = (entry) => "leadingIcon" in entry.meta && Boolean(entry.meta.leadingIcon);
|
|
@@ -4107,13 +4102,13 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
4107
4102
|
() => props.button && "to" in props.button && props.button.to !== void 0
|
|
4108
4103
|
);
|
|
4109
4104
|
const buttonComponent = computed(
|
|
4110
|
-
() => isLinkButton.value ? _sfc_main$
|
|
4105
|
+
() => isLinkButton.value ? _sfc_main$1s : _sfc_main$1I
|
|
4111
4106
|
);
|
|
4112
4107
|
const isSecondaryLinkButton = computed(
|
|
4113
4108
|
() => props.secondaryButton && "to" in props.secondaryButton && props.secondaryButton.to !== void 0
|
|
4114
4109
|
);
|
|
4115
4110
|
const secondaryButtonComponent = computed(
|
|
4116
|
-
() => isSecondaryLinkButton.value ? _sfc_main$
|
|
4111
|
+
() => isSecondaryLinkButton.value ? _sfc_main$1s : _sfc_main$1I
|
|
4117
4112
|
);
|
|
4118
4113
|
return (_ctx, _cache) => {
|
|
4119
4114
|
return openBlock(), createElementBlock("div", {
|
|
@@ -5499,14 +5494,14 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
5499
5494
|
}),
|
|
5500
5495
|
"aria-disabled": __props.disabled || void 0
|
|
5501
5496
|
}, toDisplayString(props.unit), 11, _hoisted_4$l)) : createCommentVNode("", true),
|
|
5502
|
-
__props.clearable && hasValue.value && !__props.disabled ? (openBlock(), createBlock(_sfc_main$
|
|
5497
|
+
__props.clearable && hasValue.value && !__props.disabled ? (openBlock(), createBlock(_sfc_main$1I, {
|
|
5503
5498
|
key: 3,
|
|
5504
5499
|
class: "clear-button",
|
|
5505
5500
|
size: "xsmall",
|
|
5506
5501
|
variant: "transparent",
|
|
5507
5502
|
"leading-icon": "x-close",
|
|
5508
5503
|
ariaLabel: "Clear",
|
|
5509
|
-
|
|
5504
|
+
tooltip: "Clear",
|
|
5510
5505
|
onClick: withModifiers(clearAndFocusInput, ["stop"])
|
|
5511
5506
|
})) : createCommentVNode("", true),
|
|
5512
5507
|
_ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_5$d, [
|
|
@@ -5522,7 +5517,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
5522
5517
|
}
|
|
5523
5518
|
});
|
|
5524
5519
|
|
|
5525
|
-
const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-
|
|
5520
|
+
const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-829e352d"]]);
|
|
5526
5521
|
|
|
5527
5522
|
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
5528
5523
|
__name: "KdsTextInput",
|
|
@@ -13422,7 +13417,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
13422
13417
|
createElementVNode("div", _hoisted_3$l, [
|
|
13423
13418
|
createElementVNode("span", _hoisted_4$j, toDisplayString(props.headline), 1)
|
|
13424
13419
|
]),
|
|
13425
|
-
__props.trailingButton ? (openBlock(), createBlock(_sfc_main$
|
|
13420
|
+
__props.trailingButton ? (openBlock(), createBlock(_sfc_main$1I, normalizeProps(mergeProps({ key: 2 }, trailingButtonProps.value)), null, 16)) : createCommentVNode("", true)
|
|
13426
13421
|
]),
|
|
13427
13422
|
withDirectives(createElementVNode("div", {
|
|
13428
13423
|
id: bodyId,
|
|
@@ -13460,7 +13455,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
13460
13455
|
[vShow, expanded.value]
|
|
13461
13456
|
]),
|
|
13462
13457
|
createElementVNode("footer", _hoisted_6$6, [
|
|
13463
|
-
createVNode(_sfc_main$
|
|
13458
|
+
createVNode(_sfc_main$1I, {
|
|
13464
13459
|
class: "kds-preview-list-toggle",
|
|
13465
13460
|
label: expanded.value ? "Hide all" : "Show all",
|
|
13466
13461
|
"trailing-icon": expanded.value ? "chevron-up" : "chevron-down",
|
|
@@ -14019,7 +14014,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
14019
14014
|
text: {},
|
|
14020
14015
|
leadingIcon: {},
|
|
14021
14016
|
trailingIcon: {},
|
|
14022
|
-
|
|
14017
|
+
tooltip: {}
|
|
14023
14018
|
},
|
|
14024
14019
|
setup(__props) {
|
|
14025
14020
|
const props = createPropsRestProxy(__props, ["disabled", "size", "variant", "tabIndex"]);
|
|
@@ -14027,7 +14022,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
14027
14022
|
return withDirectives((openBlock(), createElementBlock("button", {
|
|
14028
14023
|
role: "radio",
|
|
14029
14024
|
"aria-checked": props.selected,
|
|
14030
|
-
"aria-label": props.text ? void 0 : props.
|
|
14025
|
+
"aria-label": props.text ? void 0 : props.tooltip,
|
|
14031
14026
|
class: normalizeClass({
|
|
14032
14027
|
option: true,
|
|
14033
14028
|
selected: props.selected,
|
|
@@ -14054,13 +14049,13 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
14054
14049
|
size: __props.size
|
|
14055
14050
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true)
|
|
14056
14051
|
], 10, _hoisted_1$G)), [
|
|
14057
|
-
[unref(vKdsTooltip), props.
|
|
14052
|
+
[unref(vKdsTooltip), props.tooltip || void 0]
|
|
14058
14053
|
]);
|
|
14059
14054
|
};
|
|
14060
14055
|
}
|
|
14061
14056
|
});
|
|
14062
14057
|
|
|
14063
|
-
const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-
|
|
14058
|
+
const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-4ef3315b"]]);
|
|
14064
14059
|
|
|
14065
14060
|
const useValueSwitchIconHiding = ({
|
|
14066
14061
|
width,
|
|
@@ -14579,7 +14574,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
14579
14574
|
onBlur: handleBlur
|
|
14580
14575
|
}), {
|
|
14581
14576
|
trailing: withCtx(() => [
|
|
14582
|
-
createVNode(_sfc_main$
|
|
14577
|
+
createVNode(_sfc_main$1I, {
|
|
14583
14578
|
size: "xsmall",
|
|
14584
14579
|
variant: "outlined",
|
|
14585
14580
|
"leading-icon": "minus",
|
|
@@ -14591,7 +14586,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
14591
14586
|
onPointerleave: stopRepeating,
|
|
14592
14587
|
onPointercancel: stopRepeating
|
|
14593
14588
|
}, null, 8, ["ariaLabel", "disabled"]),
|
|
14594
|
-
createVNode(_sfc_main$
|
|
14589
|
+
createVNode(_sfc_main$1I, {
|
|
14595
14590
|
size: "xsmall",
|
|
14596
14591
|
variant: "outlined",
|
|
14597
14592
|
"leading-icon": "plus",
|
|
@@ -15250,8 +15245,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
15250
15245
|
"aria-controls": popoverEl.value?.popoverId,
|
|
15251
15246
|
"aria-haspopup": "dialog",
|
|
15252
15247
|
disabled: __props.disabled,
|
|
15253
|
-
|
|
15254
|
-
}, null, 8, ["modelValue", "aria-controls", "disabled", "
|
|
15248
|
+
tooltip: open.value ? "Close color picker" : "Open color picker"
|
|
15249
|
+
}, null, 8, ["modelValue", "aria-controls", "disabled", "tooltip"])
|
|
15255
15250
|
]),
|
|
15256
15251
|
_: 1
|
|
15257
15252
|
}, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"]),
|
|
@@ -15351,13 +15346,13 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
15351
15346
|
size: "xsmall",
|
|
15352
15347
|
"leading-icon": "eye",
|
|
15353
15348
|
ariaLabel: showValue.value ? `Hide ${effectiveToggleLabel.value}` : `Show ${effectiveToggleLabel.value}`,
|
|
15354
|
-
|
|
15349
|
+
tooltip: showValue.value ? `Hide ${effectiveToggleLabel.value}` : `Show ${effectiveToggleLabel.value}`,
|
|
15355
15350
|
disabled: __props.disabled,
|
|
15356
15351
|
onPointerdown: _cache[1] || (_cache[1] = ($event) => preventBlurFromToggle.value = true),
|
|
15357
15352
|
onPointerup: _cache[2] || (_cache[2] = ($event) => preventBlurFromToggle.value = false),
|
|
15358
15353
|
onPointercancel: _cache[3] || (_cache[3] = ($event) => preventBlurFromToggle.value = false),
|
|
15359
15354
|
onClick: _cache[4] || (_cache[4] = ($event) => preventBlurFromToggle.value = false)
|
|
15360
|
-
}, null, 8, ["modelValue", "ariaLabel", "
|
|
15355
|
+
}, null, 8, ["modelValue", "ariaLabel", "tooltip", "disabled"])) : createCommentVNode("", true)
|
|
15361
15356
|
]),
|
|
15362
15357
|
_: 1
|
|
15363
15358
|
}, 16, ["modelValue", "type", "leading-icon", "placeholder", "disabled", "error", "autocomplete"])
|
|
@@ -20341,7 +20336,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
20341
20336
|
return openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
20342
20337
|
createElementVNode("div", _hoisted_2$k, [
|
|
20343
20338
|
createElementVNode("div", _hoisted_3$f, [
|
|
20344
|
-
view.value === "day" ? (openBlock(), createBlock(_sfc_main$
|
|
20339
|
+
view.value === "day" ? (openBlock(), createBlock(_sfc_main$1I, {
|
|
20345
20340
|
key: 0,
|
|
20346
20341
|
variant: "transparent",
|
|
20347
20342
|
size: "small",
|
|
@@ -20350,7 +20345,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
20350
20345
|
disabled: prevYearDisabled.value,
|
|
20351
20346
|
onClick: onPrevYear
|
|
20352
20347
|
}, null, 8, ["disabled"])) : createCommentVNode("", true),
|
|
20353
|
-
createVNode(_sfc_main$
|
|
20348
|
+
createVNode(_sfc_main$1I, {
|
|
20354
20349
|
variant: "transparent",
|
|
20355
20350
|
size: "small",
|
|
20356
20351
|
"leading-icon": "chevron-left",
|
|
@@ -20359,7 +20354,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
20359
20354
|
onClick: onPrev
|
|
20360
20355
|
}, null, 8, ["ariaLabel", "disabled"])
|
|
20361
20356
|
]),
|
|
20362
|
-
view.value !== "year" ? (openBlock(), createBlock(_sfc_main$
|
|
20357
|
+
view.value !== "year" ? (openBlock(), createBlock(_sfc_main$1I, {
|
|
20363
20358
|
key: 0,
|
|
20364
20359
|
class: "kds-date-picker-header-label",
|
|
20365
20360
|
variant: "transparent",
|
|
@@ -20368,7 +20363,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
20368
20363
|
onClick: onHeaderLabelClick
|
|
20369
20364
|
}, null, 8, ["label"])) : (openBlock(), createElementBlock("div", _hoisted_4$e, toDisplayString(headerLabel.value), 1)),
|
|
20370
20365
|
createElementVNode("div", _hoisted_5$8, [
|
|
20371
|
-
createVNode(_sfc_main$
|
|
20366
|
+
createVNode(_sfc_main$1I, {
|
|
20372
20367
|
variant: "transparent",
|
|
20373
20368
|
size: "small",
|
|
20374
20369
|
"leading-icon": "chevron-right",
|
|
@@ -20376,7 +20371,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
20376
20371
|
disabled: nextDisabled.value,
|
|
20377
20372
|
onClick: onNext
|
|
20378
20373
|
}, null, 8, ["ariaLabel", "disabled"]),
|
|
20379
|
-
view.value === "day" ? (openBlock(), createBlock(_sfc_main$
|
|
20374
|
+
view.value === "day" ? (openBlock(), createBlock(_sfc_main$1I, {
|
|
20380
20375
|
key: 0,
|
|
20381
20376
|
variant: "transparent",
|
|
20382
20377
|
size: "small",
|
|
@@ -20672,12 +20667,12 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
20672
20667
|
"aria-controls": popoverRef.value?.popoverId,
|
|
20673
20668
|
"aria-haspopup": "dialog",
|
|
20674
20669
|
"aria-expanded": popoverIsVisible.value,
|
|
20675
|
-
|
|
20670
|
+
tooltip: popoverIsVisible.value ? "Close date picker" : "Open date picker",
|
|
20676
20671
|
onPointerdown: _cache[1] || (_cache[1] = ($event) => isToggling.value = true),
|
|
20677
20672
|
onPointerup: _cache[2] || (_cache[2] = ($event) => isToggling.value = false),
|
|
20678
20673
|
onPointerleave: _cache[3] || (_cache[3] = ($event) => isToggling.value = false),
|
|
20679
20674
|
onPointercancel: _cache[4] || (_cache[4] = ($event) => isToggling.value = false)
|
|
20680
|
-
}, null, 8, ["modelValue", "disabled", "aria-controls", "aria-expanded", "
|
|
20675
|
+
}, null, 8, ["modelValue", "disabled", "aria-controls", "aria-expanded", "tooltip"])
|
|
20681
20676
|
]),
|
|
20682
20677
|
_: 1
|
|
20683
20678
|
}, 16, ["modelValue", "segments", "disabled", "error", "autocomplete", "style", "aria-controls"]),
|
|
@@ -20943,8 +20938,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
20943
20938
|
"aria-expanded": open.value,
|
|
20944
20939
|
"aria-haspopup": "dialog",
|
|
20945
20940
|
disabled: __props.disabled,
|
|
20946
|
-
|
|
20947
|
-
}, null, 8, ["modelValue", "aria-controls", "aria-expanded", "disabled", "
|
|
20941
|
+
tooltip: open.value ? "Close date/time format picker" : "Open date/time format picker"
|
|
20942
|
+
}, null, 8, ["modelValue", "aria-controls", "aria-expanded", "disabled", "tooltip"])
|
|
20948
20943
|
]),
|
|
20949
20944
|
_: 1
|
|
20950
20945
|
}, 16, ["modelValue", "placeholder", "disabled", "error", "validating", "autocomplete"]),
|
|
@@ -21112,30 +21107,30 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
21112
21107
|
size: "xsmall",
|
|
21113
21108
|
variant: "outlined",
|
|
21114
21109
|
"leading-icon": "case-sensitive",
|
|
21115
|
-
|
|
21110
|
+
tooltip: caseSensitiveTitle.value,
|
|
21116
21111
|
ariaLabel: "Case sensitivity",
|
|
21117
21112
|
disabled: __props.disabled
|
|
21118
|
-
}, null, 8, ["modelValue", "
|
|
21113
|
+
}, null, 8, ["modelValue", "tooltip", "disabled"]),
|
|
21119
21114
|
createVNode(_sfc_main$1q, {
|
|
21120
21115
|
modelValue: excludeMatches.value,
|
|
21121
21116
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
|
|
21122
21117
|
size: "xsmall",
|
|
21123
21118
|
variant: "outlined",
|
|
21124
21119
|
"leading-icon": "arrows-order",
|
|
21125
|
-
|
|
21120
|
+
tooltip: excludeMatchesTitle.value,
|
|
21126
21121
|
ariaLabel: "Exclude matches",
|
|
21127
21122
|
disabled: __props.disabled
|
|
21128
|
-
}, null, 8, ["modelValue", "
|
|
21123
|
+
}, null, 8, ["modelValue", "tooltip", "disabled"]),
|
|
21129
21124
|
createVNode(_sfc_main$1q, {
|
|
21130
21125
|
modelValue: useRegex.value,
|
|
21131
21126
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
|
|
21132
21127
|
size: "xsmall",
|
|
21133
21128
|
variant: "outlined",
|
|
21134
21129
|
"leading-icon": "regex",
|
|
21135
|
-
|
|
21130
|
+
tooltip: patternModeTitle.value,
|
|
21136
21131
|
ariaLabel: "Regex mode",
|
|
21137
21132
|
disabled: __props.disabled
|
|
21138
|
-
}, null, 8, ["modelValue", "
|
|
21133
|
+
}, null, 8, ["modelValue", "tooltip", "disabled"])
|
|
21139
21134
|
]),
|
|
21140
21135
|
_: 1
|
|
21141
21136
|
}, 16, ["modelValue", "placeholder", "disabled", "error", "autocomplete"])
|
|
@@ -21528,12 +21523,12 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
21528
21523
|
max: MAX_SECOND,
|
|
21529
21524
|
step: 1
|
|
21530
21525
|
}, null, 8, ["modelValue"]),
|
|
21531
|
-
createVNode(_sfc_main$
|
|
21526
|
+
createVNode(_sfc_main$1I, {
|
|
21532
21527
|
class: "kds-time-picker-field-trash",
|
|
21533
21528
|
variant: "transparent",
|
|
21534
21529
|
"leading-icon": "trash",
|
|
21535
21530
|
ariaLabel: "Remove seconds",
|
|
21536
|
-
|
|
21531
|
+
tooltip: "Remove seconds",
|
|
21537
21532
|
onClick: removeSeconds
|
|
21538
21533
|
})
|
|
21539
21534
|
]),
|
|
@@ -21551,16 +21546,16 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
21551
21546
|
max: MAX_MILLISECOND,
|
|
21552
21547
|
step: 1
|
|
21553
21548
|
}, null, 8, ["modelValue"]),
|
|
21554
|
-
createVNode(_sfc_main$
|
|
21549
|
+
createVNode(_sfc_main$1I, {
|
|
21555
21550
|
class: "kds-time-picker-field-trash",
|
|
21556
21551
|
variant: "transparent",
|
|
21557
21552
|
"leading-icon": "trash",
|
|
21558
21553
|
ariaLabel: "Remove milliseconds",
|
|
21559
|
-
|
|
21554
|
+
tooltip: "Remove milliseconds",
|
|
21560
21555
|
onClick: removeMilliseconds
|
|
21561
21556
|
})
|
|
21562
21557
|
])) : __props.maxGranularity === "millisecond" ? (openBlock(), createElementBlock("div", _hoisted_5$7, [
|
|
21563
|
-
createVNode(_sfc_main$
|
|
21558
|
+
createVNode(_sfc_main$1I, {
|
|
21564
21559
|
variant: "outlined",
|
|
21565
21560
|
size: "small",
|
|
21566
21561
|
"leading-icon": "plus",
|
|
@@ -21569,7 +21564,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
21569
21564
|
})
|
|
21570
21565
|
])) : createCommentVNode("", true)
|
|
21571
21566
|
], 64)) : __props.maxGranularity !== "minute" ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
|
|
21572
|
-
createVNode(_sfc_main$
|
|
21567
|
+
createVNode(_sfc_main$1I, {
|
|
21573
21568
|
variant: "outlined",
|
|
21574
21569
|
size: "small",
|
|
21575
21570
|
"leading-icon": "plus",
|
|
@@ -21582,7 +21577,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
21582
21577
|
}
|
|
21583
21578
|
});
|
|
21584
21579
|
|
|
21585
|
-
const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-
|
|
21580
|
+
const TimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-2033a969"]]);
|
|
21586
21581
|
|
|
21587
21582
|
const HOURS_END_INDEX = 2;
|
|
21588
21583
|
const MINUTES_START_INDEX = 2;
|
|
@@ -21920,12 +21915,12 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
21920
21915
|
"aria-controls": popoverRef.value?.popoverId,
|
|
21921
21916
|
"aria-haspopup": "dialog",
|
|
21922
21917
|
"aria-expanded": popoverIsVisible.value,
|
|
21923
|
-
|
|
21918
|
+
tooltip: popoverIsVisible.value ? "Close time picker" : "Open time picker",
|
|
21924
21919
|
onPointerdown: _cache[1] || (_cache[1] = ($event) => isToggling.value = true),
|
|
21925
21920
|
onPointerup: _cache[2] || (_cache[2] = ($event) => isToggling.value = false),
|
|
21926
21921
|
onPointerleave: _cache[3] || (_cache[3] = ($event) => isToggling.value = false),
|
|
21927
21922
|
onPointercancel: _cache[4] || (_cache[4] = ($event) => isToggling.value = false)
|
|
21928
|
-
}, null, 8, ["modelValue", "disabled", "aria-controls", "aria-expanded", "
|
|
21923
|
+
}, null, 8, ["modelValue", "disabled", "aria-controls", "aria-expanded", "tooltip"])
|
|
21929
21924
|
]),
|
|
21930
21925
|
_: 1
|
|
21931
21926
|
}, 16, ["modelValue", "segments", "disabled", "error", "autocomplete", "style", "aria-controls"]),
|
|
@@ -22246,8 +22241,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
22246
22241
|
);
|
|
22247
22242
|
};
|
|
22248
22243
|
const modeOptions = [
|
|
22249
|
-
{ id: kdsIntervalInputFormat.DATE, leadingIcon: "calendar",
|
|
22250
|
-
{ id: kdsIntervalInputFormat.TIME, leadingIcon: "time",
|
|
22244
|
+
{ id: kdsIntervalInputFormat.DATE, leadingIcon: "calendar", tooltip: "Date" },
|
|
22245
|
+
{ id: kdsIntervalInputFormat.TIME, leadingIcon: "time", tooltip: "Time" }
|
|
22251
22246
|
];
|
|
22252
22247
|
const directionOptions = [
|
|
22253
22248
|
{ id: kdsIntervalDirectionality.ASCENDING, text: "Forward" },
|
|
@@ -22323,7 +22318,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
22323
22318
|
}
|
|
22324
22319
|
});
|
|
22325
22320
|
|
|
22326
|
-
const IntervalInputPopover = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-
|
|
22321
|
+
const IntervalInputPopover = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-3d64537f"]]);
|
|
22327
22322
|
|
|
22328
22323
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
22329
22324
|
__name: "KdsIntervalInput",
|
|
@@ -22498,13 +22493,13 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
22498
22493
|
"aria-expanded": isPopoverOpen.value,
|
|
22499
22494
|
"aria-haspopup": "dialog",
|
|
22500
22495
|
disabled: __props.disabled,
|
|
22501
|
-
|
|
22496
|
+
tooltip: isPopoverOpen.value ? "Close interval picker" : "Open interval picker",
|
|
22502
22497
|
ariaLabel: isPopoverOpen.value ? "Close interval picker" : "Open interval picker",
|
|
22503
22498
|
onPointerdown: _cache[1] || (_cache[1] = ($event) => isToggling.value = true),
|
|
22504
22499
|
onPointerup: _cache[2] || (_cache[2] = ($event) => isToggling.value = false),
|
|
22505
22500
|
onPointerleave: _cache[3] || (_cache[3] = ($event) => isToggling.value = false),
|
|
22506
22501
|
onPointercancel: _cache[4] || (_cache[4] = ($event) => isToggling.value = false)
|
|
22507
|
-
}, null, 8, ["modelValue", "aria-controls", "aria-expanded", "disabled", "
|
|
22502
|
+
}, null, 8, ["modelValue", "aria-controls", "aria-expanded", "disabled", "tooltip", "ariaLabel"])
|
|
22508
22503
|
]),
|
|
22509
22504
|
_: 1
|
|
22510
22505
|
}, 16, ["modelValue", "placeholder", "disabled", "error", "validating", "autocomplete", "onKeydown"]),
|
|
@@ -24485,19 +24480,19 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
24485
24480
|
}, null, 8, ["modelValue", "possible-values", "ariaLabel", "disabled", "error", "loading", "empty-state-label", "bottom-value"])
|
|
24486
24481
|
]),
|
|
24487
24482
|
createElementVNode("div", _hoisted_5$6, [
|
|
24488
|
-
createVNode(unref(_sfc_main$
|
|
24483
|
+
createVNode(unref(_sfc_main$1I), {
|
|
24489
24484
|
"leading-icon": "chevron-right",
|
|
24490
24485
|
ariaLabel: "Move selected values right",
|
|
24491
|
-
|
|
24486
|
+
tooltip: "Move selected values right",
|
|
24492
24487
|
variant: "transparent",
|
|
24493
24488
|
size: "small",
|
|
24494
24489
|
disabled: effectiveDisabled.value || leftSelected.value.length === 0,
|
|
24495
24490
|
onClick: _cache[2] || (_cache[2] = ($event) => moveRight(leftSelected.value))
|
|
24496
24491
|
}, null, 8, ["disabled"]),
|
|
24497
|
-
createVNode(unref(_sfc_main$
|
|
24492
|
+
createVNode(unref(_sfc_main$1I), {
|
|
24498
24493
|
"leading-icon": "chevron-right-double",
|
|
24499
24494
|
ariaLabel: "Move all values right",
|
|
24500
|
-
|
|
24495
|
+
tooltip: "Move all values right",
|
|
24501
24496
|
variant: "transparent",
|
|
24502
24497
|
size: "small",
|
|
24503
24498
|
disabled: effectiveDisabled.value || excludedItems.value.length === 0 && (!showUnknownValues.value || modelValue.value.includeUnknownValues === true),
|
|
@@ -24506,19 +24501,19 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
24506
24501
|
...showUnknownValues.value && !modelValue.value.includeUnknownValues ? [UNKNOWN_VALUE_ID] : []
|
|
24507
24502
|
]))
|
|
24508
24503
|
}, null, 8, ["disabled"]),
|
|
24509
|
-
createVNode(unref(_sfc_main$
|
|
24504
|
+
createVNode(unref(_sfc_main$1I), {
|
|
24510
24505
|
"leading-icon": "chevron-left",
|
|
24511
24506
|
ariaLabel: "Move selected values left",
|
|
24512
|
-
|
|
24507
|
+
tooltip: "Move selected values left",
|
|
24513
24508
|
variant: "transparent",
|
|
24514
24509
|
size: "small",
|
|
24515
24510
|
disabled: effectiveDisabled.value || rightSelected.value.length === 0,
|
|
24516
24511
|
onClick: _cache[4] || (_cache[4] = ($event) => moveLeft(rightSelected.value))
|
|
24517
24512
|
}, null, 8, ["disabled"]),
|
|
24518
|
-
createVNode(unref(_sfc_main$
|
|
24513
|
+
createVNode(unref(_sfc_main$1I), {
|
|
24519
24514
|
"leading-icon": "chevron-left-double",
|
|
24520
24515
|
ariaLabel: "Move all values left",
|
|
24521
|
-
|
|
24516
|
+
tooltip: "Move all values left",
|
|
24522
24517
|
variant: "transparent",
|
|
24523
24518
|
size: "small",
|
|
24524
24519
|
disabled: effectiveDisabled.value || includedItems.value.length === 0 && (!showUnknownValues.value || modelValue.value.includeUnknownValues === false),
|
|
@@ -24558,7 +24553,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
24558
24553
|
}
|
|
24559
24554
|
});
|
|
24560
24555
|
|
|
24561
|
-
const TwinListBody = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-
|
|
24556
|
+
const TwinListBody = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-f3ed8f85"]]);
|
|
24562
24557
|
|
|
24563
24558
|
const kdsTwinListSearchMode = {
|
|
24564
24559
|
MANUAL: "manual",
|
|
@@ -24978,7 +24973,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
24978
24973
|
createElementVNode("div", _hoisted_1$k, [
|
|
24979
24974
|
createElementVNode("div", _hoisted_2$9, [
|
|
24980
24975
|
createElementVNode("div", _hoisted_3$8, [
|
|
24981
|
-
createVNode(_sfc_main$
|
|
24976
|
+
createVNode(_sfc_main$1I, {
|
|
24982
24977
|
size: "small",
|
|
24983
24978
|
variant: "transparent",
|
|
24984
24979
|
"leading-icon": "sort-descending",
|
|
@@ -24986,7 +24981,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
24986
24981
|
disabled: __props.disabled,
|
|
24987
24982
|
onClick: _cache[0] || (_cache[0] = ($event) => applyReorder(unref(sortByText)(true, optionLookup.value)))
|
|
24988
24983
|
}, null, 8, ["disabled"]),
|
|
24989
|
-
createVNode(_sfc_main$
|
|
24984
|
+
createVNode(_sfc_main$1I, {
|
|
24990
24985
|
size: "small",
|
|
24991
24986
|
variant: "transparent",
|
|
24992
24987
|
"leading-icon": "sort-ascending",
|
|
@@ -24995,7 +24990,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
24995
24990
|
onClick: _cache[1] || (_cache[1] = ($event) => applyReorder(unref(sortByText)(false, optionLookup.value)))
|
|
24996
24991
|
}, null, 8, ["disabled"])
|
|
24997
24992
|
]),
|
|
24998
|
-
createVNode(_sfc_main$
|
|
24993
|
+
createVNode(_sfc_main$1I, {
|
|
24999
24994
|
size: "small",
|
|
25000
24995
|
variant: "transparent",
|
|
25001
24996
|
destructive: "",
|
|
@@ -25017,39 +25012,39 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
25017
25012
|
/* fallback only for TS */
|
|
25018
25013
|
}, null, 8, ["modelValue", "possible-values", "disabled", "error", "ariaLabel"]),
|
|
25019
25014
|
createElementVNode("div", _hoisted_4$8, [
|
|
25020
|
-
createVNode(_sfc_main$
|
|
25015
|
+
createVNode(_sfc_main$1I, {
|
|
25021
25016
|
size: "small",
|
|
25022
25017
|
variant: "transparent",
|
|
25023
25018
|
"leading-icon": "to-top",
|
|
25024
25019
|
label: "Top",
|
|
25025
|
-
|
|
25020
|
+
tooltip: "Move to top",
|
|
25026
25021
|
disabled: __props.disabled || !unref(canMoveUp),
|
|
25027
25022
|
onClick: moveToTop
|
|
25028
25023
|
}, null, 8, ["disabled"]),
|
|
25029
|
-
createVNode(_sfc_main$
|
|
25024
|
+
createVNode(_sfc_main$1I, {
|
|
25030
25025
|
size: "small",
|
|
25031
25026
|
variant: "transparent",
|
|
25032
25027
|
"leading-icon": "to-bottom",
|
|
25033
25028
|
label: "Bottom",
|
|
25034
|
-
|
|
25029
|
+
tooltip: "Move to bottom",
|
|
25035
25030
|
disabled: __props.disabled || !unref(canMoveDown),
|
|
25036
25031
|
onClick: moveToBottom
|
|
25037
25032
|
}, null, 8, ["disabled"]),
|
|
25038
|
-
createVNode(_sfc_main$
|
|
25033
|
+
createVNode(_sfc_main$1I, {
|
|
25039
25034
|
size: "small",
|
|
25040
25035
|
variant: "transparent",
|
|
25041
25036
|
"leading-icon": "arrow-up",
|
|
25042
25037
|
label: "Up",
|
|
25043
|
-
|
|
25038
|
+
tooltip: "Move up",
|
|
25044
25039
|
disabled: __props.disabled || !unref(canMoveUp),
|
|
25045
25040
|
onClick: moveUp
|
|
25046
25041
|
}, null, 8, ["disabled"]),
|
|
25047
|
-
createVNode(_sfc_main$
|
|
25042
|
+
createVNode(_sfc_main$1I, {
|
|
25048
25043
|
size: "small",
|
|
25049
25044
|
variant: "transparent",
|
|
25050
25045
|
"leading-icon": "arrow-down",
|
|
25051
25046
|
label: "Down",
|
|
25052
|
-
|
|
25047
|
+
tooltip: "Move down",
|
|
25053
25048
|
disabled: __props.disabled || !unref(canMoveDown),
|
|
25054
25049
|
onClick: moveDown
|
|
25055
25050
|
}, null, 8, ["disabled"])
|
|
@@ -25062,7 +25057,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
25062
25057
|
}
|
|
25063
25058
|
});
|
|
25064
25059
|
|
|
25065
|
-
const KdsSortableListBox = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-
|
|
25060
|
+
const KdsSortableListBox = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-586d5e52"]]);
|
|
25066
25061
|
|
|
25067
25062
|
const _hoisted_1$j = { class: "kds-info-popover-content" };
|
|
25068
25063
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
@@ -25873,7 +25868,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
25873
25868
|
id: unref(headlineId),
|
|
25874
25869
|
class: "kds-panel-headline"
|
|
25875
25870
|
}, [
|
|
25876
|
-
typeof __props.headline === "string" ? (openBlock(), createElementBlock("h6", _hoisted_4$5, toDisplayString(__props.headline), 1)) : __props.headline.type === "button" ? (openBlock(), createBlock(_sfc_main$
|
|
25871
|
+
typeof __props.headline === "string" ? (openBlock(), createElementBlock("h6", _hoisted_4$5, toDisplayString(__props.headline), 1)) : __props.headline.type === "button" ? (openBlock(), createBlock(_sfc_main$1I, mergeProps({ key: 1 }, __props.headline.props, {
|
|
25877
25872
|
size: "small",
|
|
25878
25873
|
onClick: __props.headline.onClick
|
|
25879
25874
|
}), null, 16, ["onClick"])) : __props.headline.type === "menuButton" ? (openBlock(), createBlock(_sfc_main$1j, mergeProps({ key: 2 }, __props.headline.props, {
|
|
@@ -25884,7 +25879,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
25884
25879
|
__props.headlineTrailingActions?.length ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
|
|
25885
25880
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.headlineTrailingActions, (action, index) => {
|
|
25886
25881
|
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
25887
|
-
action.type === "button" ? (openBlock(), createBlock(_sfc_main$
|
|
25882
|
+
action.type === "button" ? (openBlock(), createBlock(_sfc_main$1I, mergeProps({
|
|
25888
25883
|
key: 0,
|
|
25889
25884
|
ref_for: true
|
|
25890
25885
|
}, action.props, {
|
|
@@ -25925,7 +25920,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
25925
25920
|
__props.footerLeadingActions?.length || __props.footerTrailingActions?.length ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
25926
25921
|
createElementVNode("div", _hoisted_8, [
|
|
25927
25922
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.footerLeadingActions, (action, index) => {
|
|
25928
|
-
return openBlock(), createBlock(_sfc_main$
|
|
25923
|
+
return openBlock(), createBlock(_sfc_main$1I, mergeProps({
|
|
25929
25924
|
key: `leading-${index}`
|
|
25930
25925
|
}, { ref_for: true }, action.props, {
|
|
25931
25926
|
onClick: action.onClick
|
|
@@ -25934,7 +25929,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
25934
25929
|
]),
|
|
25935
25930
|
createElementVNode("div", _hoisted_9, [
|
|
25936
25931
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.footerTrailingActions, (action, index) => {
|
|
25937
|
-
return openBlock(), createBlock(_sfc_main$
|
|
25932
|
+
return openBlock(), createBlock(_sfc_main$1I, mergeProps({
|
|
25938
25933
|
key: `trailing-${index}`
|
|
25939
25934
|
}, { ref_for: true }, action.props, {
|
|
25940
25935
|
onClick: action.onClick
|
|
@@ -26486,7 +26481,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
26486
26481
|
disabled: __props.disabled
|
|
26487
26482
|
}, null, 8, ["name", "disabled"])) : createCommentVNode("", true),
|
|
26488
26483
|
__props.badge ? (openBlock(), createBlock(unref(KdsBadge), mergeProps({ key: 1 }, __props.badge, { size: "xxsmall" }), null, 16)) : createCommentVNode("", true),
|
|
26489
|
-
__props.trailingButton ? (openBlock(), createBlock(unref(_sfc_main$
|
|
26484
|
+
__props.trailingButton ? (openBlock(), createBlock(unref(_sfc_main$1I), mergeProps({ key: 2 }, __props.trailingButton, {
|
|
26490
26485
|
size: "xsmall",
|
|
26491
26486
|
onClick: onButtonClick
|
|
26492
26487
|
}), null, 16)) : createCommentVNode("", true)
|
|
@@ -26808,10 +26803,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
26808
26803
|
setup(__props) {
|
|
26809
26804
|
const props = createPropsRestProxy(__props, ["size"]);
|
|
26810
26805
|
return (_ctx, _cache) => {
|
|
26811
|
-
return props.type === unref(kdsActionButtonType).BUTTON ? (openBlock(), createBlock(_sfc_main$
|
|
26806
|
+
return props.type === unref(kdsActionButtonType).BUTTON ? (openBlock(), createBlock(_sfc_main$1I, mergeProps({ key: 0 }, props.props, {
|
|
26812
26807
|
size: __props.size,
|
|
26813
26808
|
onClick: _cache[0] || (_cache[0] = (e) => props.onClick?.(e))
|
|
26814
|
-
}), null, 16, ["size"])) : props.type === unref(kdsActionButtonType).LINK_BUTTON ? (openBlock(), createBlock(_sfc_main$
|
|
26809
|
+
}), null, 16, ["size"])) : props.type === unref(kdsActionButtonType).LINK_BUTTON ? (openBlock(), createBlock(_sfc_main$1s, mergeProps({ key: 1 }, props.props, { size: __props.size }), null, 16, ["size"])) : createCommentVNode("", true);
|
|
26815
26810
|
};
|
|
26816
26811
|
}
|
|
26817
26812
|
});
|
|
@@ -27644,5 +27639,5 @@ const useKdsLegacyMode = (initialValue = false) => {
|
|
|
27644
27639
|
};
|
|
27645
27640
|
};
|
|
27646
27641
|
|
|
27647
|
-
export { KdsAccordion, KdsAvatar, KdsAvatarCounter, KdsBadge, KdsBreadcrumb, _sfc_main$
|
|
27642
|
+
export { KdsAccordion, KdsAvatar, KdsAvatarCounter, KdsBadge, KdsBreadcrumb, _sfc_main$1I as KdsButton, _sfc_main$i as KdsCard, _sfc_main$1C as KdsCheckbox, KdsCheckboxGroup, KdsClickableCard, _sfc_main$V as KdsColorInput, KdsColorSwatch, _sfc_main$1d as KdsContextMenu, KdsDataType, _sfc_main$O as KdsDateInput, _sfc_main$M as KdsDateTimeFormatInput, KdsDateTimeInput, KdsDescription, KdsDivider, KdsDonutChart, _sfc_main$B as KdsDropdown, KdsDynamicModalProvider, KdsEmptyState, KdsFileExplorer, KdsIcon, KdsInfoToggleButton, KdsInlineMessage, _sfc_main$F as KdsIntervalInput, KdsLabel, KdsLink, _sfc_main$1s as KdsLinkButton, KdsLinkCard, KdsListContainer, KdsLiveStatus, KdsLoadingSkeleton, KdsLoadingSpinner, _sfc_main$1e as KdsMenu, _sfc_main$1j as KdsMenuButton, KdsMissingValueIcon, KdsModal, KdsModalLayout, _sfc_main$x as KdsMultiSelectDropdown, KdsNavItem, KdsNavigation, _sfc_main$Y as KdsNumberInput, KdsPanel, _sfc_main$U as KdsPasswordInput, _sfc_main$L as KdsPatternInput, KdsPopover, KdsPreviewList, KdsProgressBar, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, KdsResponsiveButtonGroup, KdsSearchInput, KdsSelectableCard, KdsSideDrawer, KdsSortableListBox, KdsSplitButton, KdsSubText, KdsTabBar, KdsTextInput, KdsTextarea, _sfc_main$H as KdsTimeInput, _sfc_main$1q as KdsToggleButton, KdsToggleSwitch, KdsTree, KdsTwinList, _sfc_main$T as KdsUsernameInput, KdsValueSwitch, KdsVariableToggleButton, KdsZonedDateTimeInput, kdsActionButtonType, kdsActionButtonTypes, 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, kdsFileExplorerDraggingAnimationMode, kdsFileExplorerDraggingAnimationModes, kdsFileExplorerSize, kdsFileExplorerSizes, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsInlineMessageVariant, kdsInlineMessageVariants, kdsIntervalDirectionalities, kdsIntervalDirectionality, kdsIntervalInputFormat, kdsIntervalInputFormats, kdsLinkSize, kdsLinkSizes, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSkeletonVariant, kdsLoadingSkeletonVariants, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsPanelBodyOverflow, kdsPanelBodyOverflows, kdsPanelBodyVariant, kdsPanelBodyVariants, kdsPasswordInputAutocomplete, kdsPasswordInputAutocompletes, kdsPasswordInputVariant, kdsPasswordInputVariants, kdsPopoverPlacement, kdsPopoverPlacements, kdsPopoverRole, kdsPopoverRoles, kdsPopoverType, kdsPopoverTypes, kdsProgressBarSize, kdsProgressBarSizes, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsResponsiveButtonGroupAlignment, kdsResponsiveButtonGroupAlignments, kdsTabBarSize, kdsTabBarSizes, kdsTemporalType, kdsTemporalTypes, kdsTimeInputGranularities, kdsTimeInputGranularity, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsToggleSwitchLabelPosition, kdsToggleSwitchLabelPositions, kdsToggleSwitchSize, kdsToggleSwitchSizes, kdsTwinListSearchMode, kdsTwinListSearchModes, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsUsernameInputAutocomplete, kdsUsernameInputAutocompletes, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode, vKdsTooltip };
|
|
27648
27643
|
//# sourceMappingURL=index.js.map
|