@knime/kds-components 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accessories/Avatar/KdsAvatar.vue.d.ts +1 -0
- package/dist/accessories/Avatar/KdsAvatar.vue.d.ts.map +1 -1
- package/dist/accessories/Avatar/enums.d.ts +8 -0
- package/dist/accessories/Avatar/enums.d.ts.map +1 -0
- package/dist/accessories/Avatar/index.d.ts +1 -0
- package/dist/accessories/Avatar/index.d.ts.map +1 -1
- package/dist/accessories/Avatar/types.d.ts +11 -1
- package/dist/accessories/Avatar/types.d.ts.map +1 -1
- package/dist/accessories/ColorSwatch/KdsColorSwatch.vue.d.ts +1 -0
- package/dist/accessories/ColorSwatch/KdsColorSwatch.vue.d.ts.map +1 -1
- package/dist/accessories/ColorSwatch/enums.d.ts +6 -0
- package/dist/accessories/ColorSwatch/enums.d.ts.map +1 -1
- package/dist/accessories/ColorSwatch/index.d.ts +1 -1
- package/dist/accessories/ColorSwatch/index.d.ts.map +1 -1
- package/dist/accessories/ColorSwatch/types.d.ts +4 -1
- package/dist/accessories/ColorSwatch/types.d.ts.map +1 -1
- package/dist/accessories/Icon/enums.d.ts +3 -2
- package/dist/accessories/Icon/enums.d.ts.map +1 -1
- package/dist/accessories/LiveStatus/KdsLiveStatus.vue.d.ts +1 -1
- package/dist/buttons/KdsButton/types.d.ts +1 -38
- package/dist/buttons/KdsButton/types.d.ts.map +1 -1
- package/dist/buttons/KdsLinkButton/types.d.ts +0 -18
- package/dist/buttons/KdsLinkButton/types.d.ts.map +1 -1
- package/dist/buttons/enums.d.ts +1 -1
- package/dist/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts +154 -2
- package/dist/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts.map +1 -1
- package/dist/forms/_helper/List/KdsListItem/KdsListItem.vue.d.ts +19 -0
- package/dist/forms/_helper/List/KdsListItem/KdsListItem.vue.d.ts.map +1 -0
- package/dist/forms/_helper/List/KdsListItem/demo-accessories.d.ts +8 -0
- package/dist/forms/_helper/List/KdsListItem/demo-accessories.d.ts.map +1 -0
- package/dist/forms/_helper/List/KdsListItem/index.d.ts +3 -0
- package/dist/forms/_helper/List/KdsListItem/index.d.ts.map +1 -0
- package/dist/forms/_helper/List/KdsListItem/types.d.ts +22 -0
- package/dist/forms/_helper/List/KdsListItem/types.d.ts.map +1 -0
- package/dist/forms/_helper/List/ListItemAccessory/ListItemAccessory.vue.d.ts +8 -0
- package/dist/forms/_helper/List/ListItemAccessory/ListItemAccessory.vue.d.ts.map +1 -0
- package/dist/forms/_helper/List/ListItemAccessory/types.d.ts +27 -0
- package/dist/forms/_helper/List/ListItemAccessory/types.d.ts.map +1 -0
- package/dist/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts +154 -2
- package/dist/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts.map +1 -1
- package/dist/index.css +212 -176
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +203 -283
- package/dist/index.js.map +1 -1
- package/dist/layouts/EmptyState/KdsEmptyState.vue.d.ts +8 -0
- package/dist/layouts/EmptyState/KdsEmptyState.vue.d.ts.map +1 -0
- package/dist/layouts/EmptyState/index.d.ts +3 -0
- package/dist/layouts/EmptyState/index.d.ts.map +1 -0
- package/dist/layouts/EmptyState/types.d.ts +7 -0
- package/dist/layouts/EmptyState/types.d.ts.map +1 -0
- package/dist/{structures/Card/KdsCard.vue.d.ts → layouts/KdsCardClickable/KdsCardClickable.vue.d.ts} +5 -5
- package/dist/layouts/KdsCardClickable/KdsCardClickable.vue.d.ts.map +1 -0
- package/dist/layouts/KdsCardClickable/enums.d.ts.map +1 -0
- package/dist/layouts/KdsCardClickable/index.d.ts +4 -0
- package/dist/layouts/KdsCardClickable/index.d.ts.map +1 -0
- package/dist/{structures/Card → layouts/KdsCardClickable}/types.d.ts +7 -7
- package/dist/layouts/KdsCardClickable/types.d.ts.map +1 -0
- package/dist/layouts/index.d.ts +5 -0
- package/dist/layouts/index.d.ts.map +1 -0
- package/dist/overlays/Modal/KdsModalLayout.vue.d.ts.map +1 -1
- package/dist/overlays/Modal/enums.d.ts +1 -1
- package/dist/overlays/Popover/KdsPopover.vue.d.ts +4 -1
- package/dist/overlays/Popover/KdsPopover.vue.d.ts.map +1 -1
- package/dist/overlays/Popover/types.d.ts +11 -13
- package/dist/overlays/Popover/types.d.ts.map +1 -1
- package/dist/overlays/index.d.ts +0 -2
- package/dist/overlays/index.d.ts.map +1 -1
- package/dist/util/useKdsIsTruncated.d.ts +6 -5
- package/dist/util/useKdsIsTruncated.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/structures/Card/KdsCard.vue.d.ts.map +0 -1
- package/dist/structures/Card/enums.d.ts.map +0 -1
- package/dist/structures/Card/index.d.ts +0 -4
- package/dist/structures/Card/index.d.ts.map +0 -1
- package/dist/structures/Card/types.d.ts.map +0 -1
- package/dist/structures/EmptyState/KdsEmptyState.vue.d.ts +0 -145
- package/dist/structures/EmptyState/KdsEmptyState.vue.d.ts.map +0 -1
- package/dist/structures/EmptyState/types.d.ts +0 -11
- package/dist/structures/EmptyState/types.d.ts.map +0 -1
- package/dist/structures/index.d.ts +0 -5
- package/dist/structures/index.d.ts.map +0 -1
- /package/dist/{structures/Card → layouts/KdsCardClickable}/enums.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, normalizeStyle, shallowRef, toRef, unref, createBlock, resolveDynamicComponent,
|
|
2
|
-
import { useLocalStorage, useDark, usePreferredDark, useResizeObserver,
|
|
1
|
+
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, normalizeStyle, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, useTemplateRef, createCommentVNode, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels, createVNode, defineAsyncComponent, useId, Fragment, renderList, onBeforeUpdate, nextTick, withModifiers, normalizeProps, guardReactiveProps, withDirectives, vModelText, watchEffect, createTextVNode, useCssVars, mergeDefaults, createSlots } from 'vue';
|
|
2
|
+
import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useMutationObserver, useElementSize } from '@vueuse/core';
|
|
3
3
|
|
|
4
|
-
import './index.css';const
|
|
4
|
+
import './index.css';const kdsAvatarSize = {
|
|
5
|
+
SMALL: "small",
|
|
6
|
+
MEDIUM: "medium",
|
|
7
|
+
LARGE: "large",
|
|
8
|
+
XLARGE: "xlarge"
|
|
9
|
+
};
|
|
10
|
+
const kdsAvatarSizes = Object.values(kdsAvatarSize);
|
|
11
|
+
|
|
12
|
+
const _hoisted_1$q = ["role", "title", "aria-hidden", "aria-label"];
|
|
5
13
|
const _hoisted_2$b = ["src"];
|
|
6
14
|
const _hoisted_3$6 = {
|
|
7
15
|
key: 1,
|
|
@@ -13,6 +21,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
13
21
|
props: {
|
|
14
22
|
initials: {},
|
|
15
23
|
src: { default: void 0 },
|
|
24
|
+
size: { default: kdsAvatarSize.XLARGE },
|
|
16
25
|
title: { default: void 0 }
|
|
17
26
|
},
|
|
18
27
|
setup(__props) {
|
|
@@ -37,7 +46,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
37
46
|
);
|
|
38
47
|
return (_ctx, _cache) => {
|
|
39
48
|
return openBlock(), createElementBlock("div", {
|
|
40
|
-
class: "kds-avatar",
|
|
49
|
+
class: normalizeClass(["kds-avatar", props.size]),
|
|
41
50
|
role: hasTitle.value ? "img" : "presentation",
|
|
42
51
|
title: hasTitle.value ? accessibleTitle.value : void 0,
|
|
43
52
|
"aria-hidden": !hasTitle.value ? "true" : void 0,
|
|
@@ -53,7 +62,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
53
62
|
}, null, 40, _hoisted_2$b)) : (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
54
63
|
createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)
|
|
55
64
|
]))
|
|
56
|
-
],
|
|
65
|
+
], 10, _hoisted_1$q);
|
|
57
66
|
};
|
|
58
67
|
}
|
|
59
68
|
});
|
|
@@ -66,13 +75,31 @@ const _export_sfc = (sfc, props) => {
|
|
|
66
75
|
return target;
|
|
67
76
|
};
|
|
68
77
|
|
|
69
|
-
const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-
|
|
78
|
+
const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-d6a313f1"]]);
|
|
79
|
+
|
|
80
|
+
const kdsColorSwatchType = {
|
|
81
|
+
LEARNER: "learner",
|
|
82
|
+
MANIPULATOR: "manipulator",
|
|
83
|
+
PREDICTOR: "predictor",
|
|
84
|
+
SINK: "sink",
|
|
85
|
+
SOURCE: "source",
|
|
86
|
+
VISUALIZER: "visualizer",
|
|
87
|
+
OTHER: "other"
|
|
88
|
+
};
|
|
89
|
+
const kdsColorSwatchTypes = Object.values(kdsColorSwatchType);
|
|
90
|
+
const kdsColorSwatchSize = {
|
|
91
|
+
SMALL: "small",
|
|
92
|
+
MEDIUM: "medium",
|
|
93
|
+
LARGE: "large"
|
|
94
|
+
};
|
|
95
|
+
const kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
|
|
70
96
|
|
|
71
97
|
const _hoisted_1$p = ["role", "title", "aria-hidden", "aria-label"];
|
|
72
98
|
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
73
99
|
__name: "KdsColorSwatch",
|
|
74
100
|
props: {
|
|
75
101
|
color: {},
|
|
102
|
+
size: { default: kdsColorSwatchSize.SMALL },
|
|
76
103
|
title: { default: void 0 }
|
|
77
104
|
},
|
|
78
105
|
setup(__props) {
|
|
@@ -86,7 +113,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
86
113
|
visualizer: "var(--kds-color-nodes-and-variables-visualizer)",
|
|
87
114
|
other: "var(--kds-color-nodes-and-variables-other)"
|
|
88
115
|
};
|
|
89
|
-
const isKdsColorSwatchType = (value) => Object.
|
|
116
|
+
const isKdsColorSwatchType = (value) => Object.hasOwn(typeToTokenColor, value);
|
|
90
117
|
const backgroundColor = computed(() => {
|
|
91
118
|
if (isKdsColorSwatchType(props.color)) {
|
|
92
119
|
return typeToTokenColor[props.color];
|
|
@@ -98,28 +125,17 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
98
125
|
return (_ctx, _cache) => {
|
|
99
126
|
return openBlock(), createElementBlock("span", {
|
|
100
127
|
role: hasTitle.value ? "img" : "presentation",
|
|
101
|
-
class: "kds-color-swatch",
|
|
128
|
+
class: normalizeClass(["kds-color-swatch", props.size]),
|
|
102
129
|
title: hasTitle.value ? accessibleTitle.value : void 0,
|
|
103
130
|
style: normalizeStyle({ backgroundColor: backgroundColor.value }),
|
|
104
131
|
"aria-hidden": hasTitle.value ? void 0 : "true",
|
|
105
132
|
"aria-label": hasTitle.value ? accessibleTitle.value : void 0
|
|
106
|
-
}, null,
|
|
133
|
+
}, null, 14, _hoisted_1$p);
|
|
107
134
|
};
|
|
108
135
|
}
|
|
109
136
|
});
|
|
110
137
|
|
|
111
|
-
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-
|
|
112
|
-
|
|
113
|
-
const kdsColorSwatchType = {
|
|
114
|
-
LEARNER: "learner",
|
|
115
|
-
MANIPULATOR: "manipulator",
|
|
116
|
-
PREDICTOR: "predictor",
|
|
117
|
-
SINK: "sink",
|
|
118
|
-
SOURCE: "source",
|
|
119
|
-
VISUALIZER: "visualizer",
|
|
120
|
-
OTHER: "other"
|
|
121
|
-
};
|
|
122
|
-
const kdsColorSwatchTypes = Object.values(kdsColorSwatchType);
|
|
138
|
+
const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-bdb3dd24"]]);
|
|
123
139
|
|
|
124
140
|
const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
125
141
|
const v = glob$1[path$13];
|
|
@@ -484,7 +500,7 @@ const typeIconNames = [
|
|
|
484
500
|
"xml-datatype"
|
|
485
501
|
];
|
|
486
502
|
|
|
487
|
-
const toEnumKey = (name) => name.toUpperCase().
|
|
503
|
+
const toEnumKey = (name) => name.toUpperCase().replaceAll("-", "_");
|
|
488
504
|
const kdsIconName = Object.fromEntries(
|
|
489
505
|
iconNames.map((name) => [toEnumKey(name), name])
|
|
490
506
|
);
|
|
@@ -647,10 +663,26 @@ function elementOverflowsHorizontally(element) {
|
|
|
647
663
|
}
|
|
648
664
|
return element.scrollWidth > element.clientWidth;
|
|
649
665
|
}
|
|
666
|
+
function elementOverflowsVertically(element) {
|
|
667
|
+
if (!element) {
|
|
668
|
+
return false;
|
|
669
|
+
}
|
|
670
|
+
return element.scrollHeight > element.clientHeight;
|
|
671
|
+
}
|
|
650
672
|
function useKdsIsTruncated(elementRef) {
|
|
651
673
|
const isTruncated = ref(false);
|
|
652
|
-
|
|
653
|
-
isTruncated.value = elementOverflowsHorizontally(elementRef.value);
|
|
674
|
+
const checkTruncation = () => {
|
|
675
|
+
isTruncated.value = elementOverflowsHorizontally(elementRef.value) || elementOverflowsVertically(elementRef.value);
|
|
676
|
+
};
|
|
677
|
+
useResizeObserver(elementRef, checkTruncation);
|
|
678
|
+
useMutationObserver(elementRef, checkTruncation, {
|
|
679
|
+
childList: true,
|
|
680
|
+
characterData: true,
|
|
681
|
+
subtree: true,
|
|
682
|
+
// Also observe attribute changes (especially class/style) that can affect
|
|
683
|
+
// truncation without necessarily triggering a resize event.
|
|
684
|
+
attributes: true,
|
|
685
|
+
attributeFilter: ["class", "style"]
|
|
654
686
|
});
|
|
655
687
|
return { isTruncated };
|
|
656
688
|
}
|
|
@@ -2834,7 +2866,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2834
2866
|
|
|
2835
2867
|
const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-2e4d2d42"]]);
|
|
2836
2868
|
|
|
2837
|
-
const _hoisted_1$9 = ["id", "
|
|
2869
|
+
const _hoisted_1$9 = ["id", "role", "aria-label"];
|
|
2838
2870
|
const _hoisted_2$3 = {
|
|
2839
2871
|
key: 0,
|
|
2840
2872
|
class: "kds-popover-default-content"
|
|
@@ -2842,8 +2874,6 @@ const _hoisted_2$3 = {
|
|
|
2842
2874
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
2843
2875
|
__name: "KdsPopover",
|
|
2844
2876
|
props: /* @__PURE__ */ mergeModels({
|
|
2845
|
-
activatorEl: {},
|
|
2846
|
-
anchorEl: {},
|
|
2847
2877
|
placement: { default: "bottom-left" },
|
|
2848
2878
|
role: { default: "dialog" },
|
|
2849
2879
|
fullWidth: { type: Boolean, default: false },
|
|
@@ -2854,71 +2884,28 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2854
2884
|
"modelModifiers": {}
|
|
2855
2885
|
}),
|
|
2856
2886
|
emits: ["update:modelValue"],
|
|
2857
|
-
setup(__props) {
|
|
2887
|
+
setup(__props, { expose: __expose }) {
|
|
2858
2888
|
const props = __props;
|
|
2859
2889
|
const open = useModel(__props, "modelValue");
|
|
2860
2890
|
const popoverEl = useTemplateRef("popoverEl");
|
|
2861
2891
|
const popoverId = useId();
|
|
2862
2892
|
const anchorName = `--anchor-${popoverId}`;
|
|
2863
|
-
|
|
2864
|
-
if (
|
|
2865
|
-
return null;
|
|
2866
|
-
}
|
|
2867
|
-
const maybeInstance = el;
|
|
2868
|
-
const candidate = maybeInstance.$el ?? el;
|
|
2869
|
-
return candidate instanceof HTMLElement ? candidate : null;
|
|
2870
|
-
};
|
|
2871
|
-
const setA11yAttributes = (el, options) => {
|
|
2872
|
-
if (!el) {
|
|
2873
|
-
return;
|
|
2874
|
-
}
|
|
2875
|
-
if (options === null) {
|
|
2876
|
-
el.removeAttribute("aria-expanded");
|
|
2877
|
-
el.removeAttribute("aria-controls");
|
|
2878
|
-
el.removeAttribute("aria-haspopup");
|
|
2879
|
-
return;
|
|
2880
|
-
}
|
|
2881
|
-
el.setAttribute("aria-expanded", String(options.expanded));
|
|
2882
|
-
el.setAttribute("aria-controls", options.popoverId);
|
|
2883
|
-
el.setAttribute("aria-haspopup", props.role);
|
|
2884
|
-
};
|
|
2885
|
-
watch(open, (isOpen) => {
|
|
2886
|
-
if (isOpen) {
|
|
2893
|
+
watchEffect(() => {
|
|
2894
|
+
if (open.value) {
|
|
2887
2895
|
popoverEl.value?.showPopover?.();
|
|
2888
2896
|
} else {
|
|
2889
2897
|
popoverEl.value?.hidePopover?.();
|
|
2890
2898
|
}
|
|
2891
|
-
const activatorElement = resolveElement(unref(props.activatorEl));
|
|
2892
|
-
activatorElement?.setAttribute("aria-expanded", String(isOpen));
|
|
2893
|
-
});
|
|
2894
|
-
watch(
|
|
2895
|
-
() => [unref(props.anchorEl), unref(props.activatorEl)],
|
|
2896
|
-
([nextAnchorEl, nextActivatorEl], prev) => {
|
|
2897
|
-
const [prevAnchorEl, prevActivatorEl] = prev ?? [null, null];
|
|
2898
|
-
const prevAnchor = resolveElement(prevAnchorEl ?? null) ?? resolveElement(prevActivatorEl);
|
|
2899
|
-
prevAnchor?.style.removeProperty("anchor-name");
|
|
2900
|
-
const prevActivator = resolveElement(prevActivatorEl);
|
|
2901
|
-
setA11yAttributes(prevActivator, null);
|
|
2902
|
-
const nextAnchor = resolveElement(nextAnchorEl ?? null) ?? resolveElement(nextActivatorEl);
|
|
2903
|
-
nextAnchor?.style.setProperty("anchor-name", anchorName);
|
|
2904
|
-
const nextActivator = resolveElement(nextActivatorEl);
|
|
2905
|
-
setA11yAttributes(nextActivator, { expanded: open.value, popoverId });
|
|
2906
|
-
},
|
|
2907
|
-
{ immediate: true }
|
|
2908
|
-
);
|
|
2909
|
-
onBeforeUnmount(() => {
|
|
2910
|
-
const anchor = resolveElement(unref(props.anchorEl) ?? null) ?? resolveElement(unref(props.activatorEl));
|
|
2911
|
-
anchor?.style.removeProperty("anchor-name");
|
|
2912
|
-
const activator = resolveElement(unref(props.activatorEl));
|
|
2913
|
-
setA11yAttributes(activator, null);
|
|
2914
2899
|
});
|
|
2900
|
+
const anchorStyle = { "anchor-name": anchorName };
|
|
2901
|
+
__expose({ anchorStyle, popoverId });
|
|
2915
2902
|
return (_ctx, _cache) => {
|
|
2916
2903
|
return openBlock(), createElementBlock("div", {
|
|
2917
2904
|
id: unref(popoverId),
|
|
2918
2905
|
ref_key: "popoverEl",
|
|
2919
2906
|
ref: popoverEl,
|
|
2920
2907
|
class: normalizeClass(["kds-popover", ["floating", props.placement, { "full-width": props.fullWidth }]]),
|
|
2921
|
-
popover:
|
|
2908
|
+
popover: "auto",
|
|
2922
2909
|
style: normalizeStyle({ "position-anchor": anchorName }),
|
|
2923
2910
|
role: props.role,
|
|
2924
2911
|
"aria-label": props.popoverAriaLabel,
|
|
@@ -2932,7 +2919,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2932
2919
|
}
|
|
2933
2920
|
});
|
|
2934
2921
|
|
|
2935
|
-
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
2922
|
+
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-9125d023"]]);
|
|
2936
2923
|
|
|
2937
2924
|
const _hoisted_1$8 = { class: "kds-info-popover-content" };
|
|
2938
2925
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
@@ -2954,7 +2941,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2954
2941
|
|
|
2955
2942
|
const InfoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-951f2a2b"]]);
|
|
2956
2943
|
|
|
2957
|
-
const _hoisted_1$7 = ["aria-pressed"];
|
|
2944
|
+
const _hoisted_1$7 = ["aria-pressed", "aria-expanded", "aria-controls"];
|
|
2958
2945
|
const TITLE = "Click for more information";
|
|
2959
2946
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
2960
2947
|
__name: "KdsInfoToggleButton",
|
|
@@ -2969,15 +2956,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2969
2956
|
setup(__props) {
|
|
2970
2957
|
const props = __props;
|
|
2971
2958
|
const modelValue = useModel(__props, "modelValue");
|
|
2972
|
-
const
|
|
2959
|
+
const popoverEl = useTemplateRef("popoverEl");
|
|
2973
2960
|
const isHovered = ref(false);
|
|
2974
2961
|
const isFocused = ref(false);
|
|
2975
2962
|
return (_ctx, _cache) => {
|
|
2976
2963
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2977
|
-
createElementVNode("button", mergeProps({
|
|
2978
|
-
ref_key: "buttonEl",
|
|
2979
|
-
ref: buttonEl
|
|
2980
|
-
}, _ctx.$attrs, {
|
|
2964
|
+
createElementVNode("button", mergeProps(_ctx.$attrs, {
|
|
2981
2965
|
class: {
|
|
2982
2966
|
"info-toggle-button": true,
|
|
2983
2967
|
selected: modelValue.value,
|
|
@@ -2986,6 +2970,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2986
2970
|
title: TITLE,
|
|
2987
2971
|
"aria-label": TITLE,
|
|
2988
2972
|
"aria-pressed": modelValue.value,
|
|
2973
|
+
"aria-expanded": modelValue.value,
|
|
2974
|
+
"aria-controls": popoverEl.value?.popoverId,
|
|
2975
|
+
"aria-haspopup": "dialog",
|
|
2976
|
+
style: popoverEl.value?.anchorStyle,
|
|
2989
2977
|
type: "button",
|
|
2990
2978
|
onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value),
|
|
2991
2979
|
onMouseenter: _cache[1] || (_cache[1] = ($event) => isHovered.value = true),
|
|
@@ -2999,9 +2987,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2999
2987
|
})
|
|
3000
2988
|
], 16, _hoisted_1$7),
|
|
3001
2989
|
createVNode(KdsPopover, {
|
|
2990
|
+
ref_key: "popoverEl",
|
|
2991
|
+
ref: popoverEl,
|
|
3002
2992
|
modelValue: modelValue.value,
|
|
3003
2993
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
|
|
3004
|
-
"activator-el": buttonEl.value,
|
|
3005
2994
|
placement: "top-right",
|
|
3006
2995
|
"popover-aria-label": "Description"
|
|
3007
2996
|
}, {
|
|
@@ -3016,13 +3005,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3016
3005
|
}, 8, ["content"])
|
|
3017
3006
|
]),
|
|
3018
3007
|
_: 3
|
|
3019
|
-
}, 8, ["modelValue"
|
|
3008
|
+
}, 8, ["modelValue"])
|
|
3020
3009
|
], 64);
|
|
3021
3010
|
};
|
|
3022
3011
|
}
|
|
3023
3012
|
});
|
|
3024
3013
|
|
|
3025
|
-
const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
3014
|
+
const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-f98c9924"]]);
|
|
3026
3015
|
|
|
3027
3016
|
const KdsInfoToggleButton$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
3028
3017
|
__proto__: null,
|
|
@@ -3049,7 +3038,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3049
3038
|
|
|
3050
3039
|
const VariablePopover = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-54c206b9"]]);
|
|
3051
3040
|
|
|
3052
|
-
const _hoisted_1$5 = ["title", "aria-label", "aria-pressed"];
|
|
3041
|
+
const _hoisted_1$5 = ["title", "aria-label", "aria-pressed", "aria-expanded", "aria-controls"];
|
|
3053
3042
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3054
3043
|
__name: "KdsVariableToggleButton",
|
|
3055
3044
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -3066,7 +3055,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3066
3055
|
setup(__props) {
|
|
3067
3056
|
const props = __props;
|
|
3068
3057
|
const modelValue = useModel(__props, "modelValue");
|
|
3069
|
-
const
|
|
3058
|
+
const popoverEl = useTemplateRef("popoverEl");
|
|
3070
3059
|
const isHovered = ref(false);
|
|
3071
3060
|
const isFocused = ref(false);
|
|
3072
3061
|
const iconState = computed(() => {
|
|
@@ -3114,10 +3103,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3114
3103
|
});
|
|
3115
3104
|
return (_ctx, _cache) => {
|
|
3116
3105
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3117
|
-
createElementVNode("button", mergeProps({
|
|
3118
|
-
ref_key: "buttonEl",
|
|
3119
|
-
ref: buttonEl
|
|
3120
|
-
}, _ctx.$attrs, {
|
|
3106
|
+
createElementVNode("button", mergeProps(_ctx.$attrs, {
|
|
3121
3107
|
class: {
|
|
3122
3108
|
"variable-toggle-button": true,
|
|
3123
3109
|
error: props.error,
|
|
@@ -3127,6 +3113,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3127
3113
|
title: title.value,
|
|
3128
3114
|
"aria-label": title.value,
|
|
3129
3115
|
"aria-pressed": modelValue.value,
|
|
3116
|
+
"aria-expanded": modelValue.value,
|
|
3117
|
+
"aria-controls": popoverEl.value?.popoverId,
|
|
3118
|
+
"aria-haspopup": "dialog",
|
|
3119
|
+
style: popoverEl.value?.anchorStyle,
|
|
3130
3120
|
type: "button",
|
|
3131
3121
|
onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value),
|
|
3132
3122
|
onMouseenter: _cache[1] || (_cache[1] = ($event) => isHovered.value = true),
|
|
@@ -3140,9 +3130,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3140
3130
|
}, null, 8, ["name"])
|
|
3141
3131
|
], 16, _hoisted_1$5),
|
|
3142
3132
|
createVNode(KdsPopover, {
|
|
3133
|
+
ref_key: "popoverEl",
|
|
3134
|
+
ref: popoverEl,
|
|
3143
3135
|
modelValue: modelValue.value,
|
|
3144
3136
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
|
|
3145
|
-
"activator-el": buttonEl.value,
|
|
3146
3137
|
placement: "bottom-right",
|
|
3147
3138
|
"popover-aria-label": "Flow Variable settings"
|
|
3148
3139
|
}, {
|
|
@@ -3157,13 +3148,106 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3157
3148
|
}, 8, ["content"])
|
|
3158
3149
|
]),
|
|
3159
3150
|
_: 3
|
|
3160
|
-
}, 8, ["modelValue"
|
|
3151
|
+
}, 8, ["modelValue"])
|
|
3161
3152
|
], 64);
|
|
3162
3153
|
};
|
|
3163
3154
|
}
|
|
3164
3155
|
});
|
|
3165
3156
|
|
|
3166
|
-
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
3157
|
+
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-1541cbb3"]]);
|
|
3158
|
+
|
|
3159
|
+
const _hoisted_1$4 = { class: "kds-empty-state" };
|
|
3160
|
+
const _hoisted_2$2 = { class: "kds-empty-state-headline" };
|
|
3161
|
+
const _hoisted_3$2 = {
|
|
3162
|
+
key: 0,
|
|
3163
|
+
class: "kds-empty-state-description"
|
|
3164
|
+
};
|
|
3165
|
+
const _hoisted_4$1 = {
|
|
3166
|
+
key: 1,
|
|
3167
|
+
class: "kds-empty-state-action"
|
|
3168
|
+
};
|
|
3169
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3170
|
+
__name: "KdsEmptyState",
|
|
3171
|
+
props: {
|
|
3172
|
+
headline: {},
|
|
3173
|
+
description: {},
|
|
3174
|
+
button: {}
|
|
3175
|
+
},
|
|
3176
|
+
emits: ["buttonClick"],
|
|
3177
|
+
setup(__props, { emit: __emit }) {
|
|
3178
|
+
const props = __props;
|
|
3179
|
+
const emit = __emit;
|
|
3180
|
+
const isLinkButton = computed(
|
|
3181
|
+
() => props.button && "to" in props.button && props.button.to !== void 0
|
|
3182
|
+
);
|
|
3183
|
+
const buttonComponent = computed(
|
|
3184
|
+
() => isLinkButton.value ? _sfc_main$s : _sfc_main$t
|
|
3185
|
+
);
|
|
3186
|
+
return (_ctx, _cache) => {
|
|
3187
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
3188
|
+
createElementVNode("p", _hoisted_2$2, toDisplayString(props.headline), 1),
|
|
3189
|
+
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$2, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
3190
|
+
props.button ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
3191
|
+
(openBlock(), createBlock(resolveDynamicComponent(buttonComponent.value), mergeProps(props.button, {
|
|
3192
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick", $event))
|
|
3193
|
+
}), null, 16))
|
|
3194
|
+
])) : createCommentVNode("", true)
|
|
3195
|
+
]);
|
|
3196
|
+
};
|
|
3197
|
+
}
|
|
3198
|
+
});
|
|
3199
|
+
|
|
3200
|
+
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b4af30cf"]]);
|
|
3201
|
+
|
|
3202
|
+
const _hoisted_1$3 = ["aria-label", "aria-labelledby", "aria-pressed", "disabled"];
|
|
3203
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3204
|
+
__name: "KdsCardClickable",
|
|
3205
|
+
props: /* @__PURE__ */ mergeModels({
|
|
3206
|
+
variant: { default: "filled" },
|
|
3207
|
+
selectable: { type: Boolean, default: false },
|
|
3208
|
+
disabled: { type: Boolean, default: false },
|
|
3209
|
+
ariaLabel: {},
|
|
3210
|
+
ariaLabelledby: {}
|
|
3211
|
+
}, {
|
|
3212
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
3213
|
+
"modelModifiers": {}
|
|
3214
|
+
}),
|
|
3215
|
+
emits: /* @__PURE__ */ mergeModels(["click"], ["update:modelValue"]),
|
|
3216
|
+
setup(__props, { emit: __emit }) {
|
|
3217
|
+
const modelValue = useModel(__props, "modelValue");
|
|
3218
|
+
const emit = __emit;
|
|
3219
|
+
const selected = computed(() => modelValue.value && __props.selectable);
|
|
3220
|
+
const handleClick = (event) => {
|
|
3221
|
+
if (__props.selectable) {
|
|
3222
|
+
modelValue.value = !modelValue.value;
|
|
3223
|
+
} else {
|
|
3224
|
+
emit("click", event);
|
|
3225
|
+
}
|
|
3226
|
+
};
|
|
3227
|
+
return (_ctx, _cache) => {
|
|
3228
|
+
return openBlock(), createElementBlock("button", {
|
|
3229
|
+
type: "button",
|
|
3230
|
+
class: normalizeClass(["kds-card", [`variant-${__props.variant}`, { selected: selected.value }]]),
|
|
3231
|
+
"aria-label": __props.ariaLabel,
|
|
3232
|
+
"aria-labelledby": __props.ariaLabelledby,
|
|
3233
|
+
"aria-pressed": __props.selectable ? modelValue.value : void 0,
|
|
3234
|
+
disabled: __props.disabled,
|
|
3235
|
+
onClick: handleClick
|
|
3236
|
+
}, [
|
|
3237
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3238
|
+
], 10, _hoisted_1$3);
|
|
3239
|
+
};
|
|
3240
|
+
}
|
|
3241
|
+
});
|
|
3242
|
+
|
|
3243
|
+
const KdsCardClickable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4607badd"]]);
|
|
3244
|
+
|
|
3245
|
+
const kdsCardVariant = {
|
|
3246
|
+
FILLED: "filled",
|
|
3247
|
+
OUTLINED: "outlined",
|
|
3248
|
+
TRANSPARENT: "transparent"
|
|
3249
|
+
};
|
|
3250
|
+
const kdsCardVariants = Object.values(kdsCardVariant);
|
|
3167
3251
|
|
|
3168
3252
|
const createUnwrappedPromise = () => {
|
|
3169
3253
|
let resolve = () => {
|
|
@@ -3219,14 +3303,14 @@ const kdsModalPropsDefault = {
|
|
|
3219
3303
|
...kdsModalLayoutPropsDefault
|
|
3220
3304
|
};
|
|
3221
3305
|
|
|
3222
|
-
const _hoisted_1$
|
|
3223
|
-
const _hoisted_2$
|
|
3224
|
-
const _hoisted_3$
|
|
3225
|
-
const _hoisted_4
|
|
3306
|
+
const _hoisted_1$2 = { class: "modal-header" };
|
|
3307
|
+
const _hoisted_2$1 = { class: "modal-header-title" };
|
|
3308
|
+
const _hoisted_3$1 = ["data-variant"];
|
|
3309
|
+
const _hoisted_4 = {
|
|
3226
3310
|
key: 0,
|
|
3227
3311
|
class: "modal-footer"
|
|
3228
3312
|
};
|
|
3229
|
-
const _sfc_main$
|
|
3313
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3230
3314
|
...{ inheritAttrs: false },
|
|
3231
3315
|
__name: "KdsModalLayout",
|
|
3232
3316
|
props: /* @__PURE__ */ mergeDefaults({
|
|
@@ -3238,18 +3322,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3238
3322
|
}, kdsModalLayoutPropsDefault),
|
|
3239
3323
|
setup(__props) {
|
|
3240
3324
|
useCssVars((_ctx) => ({
|
|
3241
|
-
"
|
|
3325
|
+
"v670bbff1": _ctx.overflow
|
|
3242
3326
|
}));
|
|
3243
3327
|
const props = __props;
|
|
3244
3328
|
return (_ctx, _cache) => {
|
|
3245
3329
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3246
|
-
createElementVNode("header", _hoisted_1$
|
|
3330
|
+
createElementVNode("header", _hoisted_1$2, [
|
|
3247
3331
|
props.icon ? (openBlock(), createBlock(KdsIcon, {
|
|
3248
3332
|
key: 0,
|
|
3249
3333
|
name: props.icon,
|
|
3250
3334
|
size: "medium"
|
|
3251
3335
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
3252
|
-
createElementVNode("div", _hoisted_2$
|
|
3336
|
+
createElementVNode("div", _hoisted_2$1, toDisplayString(props.title), 1),
|
|
3253
3337
|
createVNode(_sfc_main$t, {
|
|
3254
3338
|
"leading-icon": "x-close",
|
|
3255
3339
|
variant: "transparent",
|
|
@@ -3263,8 +3347,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3263
3347
|
"data-variant": __props.variant
|
|
3264
3348
|
}, [
|
|
3265
3349
|
renderSlot(_ctx.$slots, "body", {}, void 0, true)
|
|
3266
|
-
], 8, _hoisted_3$
|
|
3267
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4
|
|
3350
|
+
], 8, _hoisted_3$1),
|
|
3351
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4, [
|
|
3268
3352
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
3269
3353
|
])) : createCommentVNode("", true)
|
|
3270
3354
|
], 64);
|
|
@@ -3272,10 +3356,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3272
3356
|
}
|
|
3273
3357
|
});
|
|
3274
3358
|
|
|
3275
|
-
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3359
|
+
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ff11e839"]]);
|
|
3276
3360
|
|
|
3277
|
-
const _hoisted_1$
|
|
3278
|
-
const _sfc_main$
|
|
3361
|
+
const _hoisted_1$1 = ["closedby"];
|
|
3362
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3279
3363
|
__name: "KdsModal",
|
|
3280
3364
|
props: /* @__PURE__ */ mergeDefaults({
|
|
3281
3365
|
icon: {},
|
|
@@ -3372,12 +3456,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3372
3456
|
_: 3
|
|
3373
3457
|
}, 8, ["title", "icon", "variant", "overflow"])
|
|
3374
3458
|
], true)
|
|
3375
|
-
], 42, _hoisted_1$
|
|
3459
|
+
], 42, _hoisted_1$1)) : createCommentVNode("", true);
|
|
3376
3460
|
};
|
|
3377
3461
|
}
|
|
3378
3462
|
});
|
|
3379
3463
|
|
|
3380
|
-
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3464
|
+
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f7b58ae1"]]);
|
|
3381
3465
|
|
|
3382
3466
|
const defaultCancelButton = {
|
|
3383
3467
|
type: "cancel",
|
|
@@ -3458,16 +3542,16 @@ const useKdsDynamicModal = () => {
|
|
|
3458
3542
|
};
|
|
3459
3543
|
};
|
|
3460
3544
|
|
|
3461
|
-
const _hoisted_1
|
|
3545
|
+
const _hoisted_1 = {
|
|
3462
3546
|
key: 1,
|
|
3463
3547
|
class: "confirmation"
|
|
3464
3548
|
};
|
|
3465
|
-
const _hoisted_2
|
|
3466
|
-
const _hoisted_3
|
|
3549
|
+
const _hoisted_2 = { class: "message" };
|
|
3550
|
+
const _hoisted_3 = {
|
|
3467
3551
|
key: 0,
|
|
3468
3552
|
class: "ask-again"
|
|
3469
3553
|
};
|
|
3470
|
-
const _sfc_main
|
|
3554
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3471
3555
|
__name: "KdsDynamicModalProvider",
|
|
3472
3556
|
setup(__props) {
|
|
3473
3557
|
const askAgain = ref(false);
|
|
@@ -3520,9 +3604,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3520
3604
|
unref(config)?.type === "confirm" ? {
|
|
3521
3605
|
name: "body",
|
|
3522
3606
|
fn: withCtx(() => [
|
|
3523
|
-
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1
|
|
3524
|
-
createElementVNode("div", _hoisted_2
|
|
3525
|
-
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3
|
|
3607
|
+
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
3608
|
+
createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
|
|
3609
|
+
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
3526
3610
|
createVNode(_sfc_main$m, {
|
|
3527
3611
|
modelValue: askAgain.value,
|
|
3528
3612
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
@@ -3568,171 +3652,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3568
3652
|
}
|
|
3569
3653
|
});
|
|
3570
3654
|
|
|
3571
|
-
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
3572
|
-
|
|
3573
|
-
const kdsPopoverPlacement = {
|
|
3574
|
-
TOP_LEFT: "top-left",
|
|
3575
|
-
TOP_RIGHT: "top-right",
|
|
3576
|
-
BOTTOM_LEFT: "bottom-left",
|
|
3577
|
-
BOTTOM_RIGHT: "bottom-right"
|
|
3578
|
-
};
|
|
3579
|
-
const kdsPopoverPlacements = Object.values(kdsPopoverPlacement);
|
|
3580
|
-
const kdsPopoverRole = {
|
|
3581
|
-
DIALOG: "dialog",
|
|
3582
|
-
MENU: "menu",
|
|
3583
|
-
LISTBOX: "listbox"
|
|
3584
|
-
};
|
|
3585
|
-
const kdsPopoverRoles = Object.values(kdsPopoverRole);
|
|
3586
|
-
|
|
3587
|
-
const _hoisted_1$1 = ["aria-label", "aria-labelledby", "aria-disabled", "aria-pressed", "tabindex", "onKeydown"];
|
|
3588
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3589
|
-
__name: "KdsCard",
|
|
3590
|
-
props: /* @__PURE__ */ mergeModels({
|
|
3591
|
-
variant: { default: "filled" },
|
|
3592
|
-
selectable: { type: Boolean, default: false },
|
|
3593
|
-
disabled: { type: Boolean, default: false },
|
|
3594
|
-
ariaLabel: {},
|
|
3595
|
-
ariaLabelledby: {}
|
|
3596
|
-
}, {
|
|
3597
|
-
"modelValue": { type: Boolean, ...{ default: false } },
|
|
3598
|
-
"modelModifiers": {}
|
|
3599
|
-
}),
|
|
3600
|
-
emits: /* @__PURE__ */ mergeModels(["click"], ["update:modelValue"]),
|
|
3601
|
-
setup(__props, { emit: __emit }) {
|
|
3602
|
-
const modelValue = useModel(__props, "modelValue");
|
|
3603
|
-
const emit = __emit;
|
|
3604
|
-
const selected = computed(() => modelValue.value && __props.selectable);
|
|
3605
|
-
const handleClick = (event) => {
|
|
3606
|
-
if (__props.disabled) {
|
|
3607
|
-
return;
|
|
3608
|
-
}
|
|
3609
|
-
if (__props.selectable) {
|
|
3610
|
-
modelValue.value = !modelValue.value;
|
|
3611
|
-
} else {
|
|
3612
|
-
emit("click", event);
|
|
3613
|
-
}
|
|
3614
|
-
};
|
|
3615
|
-
return (_ctx, _cache) => {
|
|
3616
|
-
return openBlock(), createElementBlock("div", {
|
|
3617
|
-
class: normalizeClass(["kds-card", [
|
|
3618
|
-
`variant-${__props.variant}`,
|
|
3619
|
-
{ selected: selected.value },
|
|
3620
|
-
{ disabled: __props.disabled }
|
|
3621
|
-
]]),
|
|
3622
|
-
role: "button",
|
|
3623
|
-
"aria-label": __props.ariaLabel,
|
|
3624
|
-
"aria-labelledby": __props.ariaLabelledby,
|
|
3625
|
-
"aria-disabled": __props.disabled,
|
|
3626
|
-
"aria-pressed": __props.selectable ? modelValue.value : void 0,
|
|
3627
|
-
tabindex: __props.disabled ? -1 : 0,
|
|
3628
|
-
onClick: handleClick,
|
|
3629
|
-
onKeydown: [
|
|
3630
|
-
withKeys(withModifiers(handleClick, ["prevent"]), ["enter"]),
|
|
3631
|
-
withKeys(withModifiers(handleClick, ["prevent"]), ["space"])
|
|
3632
|
-
]
|
|
3633
|
-
}, [
|
|
3634
|
-
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3635
|
-
], 42, _hoisted_1$1);
|
|
3636
|
-
};
|
|
3637
|
-
}
|
|
3638
|
-
});
|
|
3639
|
-
|
|
3640
|
-
const KdsCard = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c64f0e2e"]]);
|
|
3641
|
-
|
|
3642
|
-
function isDefinedAndNotEmpty(obj, field) {
|
|
3643
|
-
return isDefined(obj[field]) && obj[field] !== "";
|
|
3644
|
-
}
|
|
3645
|
-
|
|
3646
|
-
const _hoisted_1 = { class: "kds-empty-state" };
|
|
3647
|
-
const _hoisted_2 = { class: "kds-empty-state-headline" };
|
|
3648
|
-
const _hoisted_3 = {
|
|
3649
|
-
key: 0,
|
|
3650
|
-
class: "kds-empty-state-description"
|
|
3651
|
-
};
|
|
3652
|
-
const _hoisted_4 = {
|
|
3653
|
-
key: 1,
|
|
3654
|
-
class: "kds-empty-state-action"
|
|
3655
|
-
};
|
|
3656
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3657
|
-
__name: "KdsEmptyState",
|
|
3658
|
-
props: {
|
|
3659
|
-
headline: {},
|
|
3660
|
-
description: {},
|
|
3661
|
-
buttonSize: {},
|
|
3662
|
-
buttonDisabled: { type: Boolean },
|
|
3663
|
-
buttonTitle: {},
|
|
3664
|
-
buttonVariant: {},
|
|
3665
|
-
buttonDestructive: { type: Boolean },
|
|
3666
|
-
buttonLabel: {},
|
|
3667
|
-
buttonLeadingIcon: {},
|
|
3668
|
-
buttonTrailingIcon: {},
|
|
3669
|
-
buttonAriaLabel: {},
|
|
3670
|
-
buttonTo: {},
|
|
3671
|
-
buttonDownload: { type: Boolean },
|
|
3672
|
-
buttonTarget: {},
|
|
3673
|
-
buttonRel: {}
|
|
3674
|
-
},
|
|
3675
|
-
emits: ["buttonClick"],
|
|
3676
|
-
setup(__props, { emit: __emit }) {
|
|
3677
|
-
const props = __props;
|
|
3678
|
-
const emit = __emit;
|
|
3679
|
-
const hasButton = computed(() => {
|
|
3680
|
-
return isDefinedAndNotEmpty(props, "buttonLabel") || isDefinedAndNotEmpty(props, "buttonLeadingIcon");
|
|
3681
|
-
});
|
|
3682
|
-
const buttonType = computed(() => {
|
|
3683
|
-
if (isDefinedAndNotEmpty(props, "buttonTo")) {
|
|
3684
|
-
return _sfc_main$s;
|
|
3685
|
-
}
|
|
3686
|
-
return _sfc_main$t;
|
|
3687
|
-
});
|
|
3688
|
-
const mapProps = (mappings) => {
|
|
3689
|
-
return Object.fromEntries(
|
|
3690
|
-
mappings.map(([targetKey, sourceKey]) => [targetKey, props[sourceKey]]).filter(([, value]) => value !== void 0)
|
|
3691
|
-
);
|
|
3692
|
-
};
|
|
3693
|
-
const buttonProps = computed(() => {
|
|
3694
|
-
if (!hasButton.value) {
|
|
3695
|
-
return {};
|
|
3696
|
-
}
|
|
3697
|
-
const baseProps = mapProps([
|
|
3698
|
-
["label", "buttonLabel"],
|
|
3699
|
-
["leadingIcon", "buttonLeadingIcon"],
|
|
3700
|
-
["trailingIcon", "buttonTrailingIcon"],
|
|
3701
|
-
["ariaLabel", "buttonAriaLabel"],
|
|
3702
|
-
["disabled", "buttonDisabled"],
|
|
3703
|
-
["variant", "buttonVariant"],
|
|
3704
|
-
["size", "buttonSize"],
|
|
3705
|
-
["destructive", "buttonDestructive"],
|
|
3706
|
-
["title", "buttonTitle"]
|
|
3707
|
-
]);
|
|
3708
|
-
if (buttonType.value !== _sfc_main$s) {
|
|
3709
|
-
return baseProps;
|
|
3710
|
-
}
|
|
3711
|
-
return {
|
|
3712
|
-
...baseProps,
|
|
3713
|
-
...mapProps([
|
|
3714
|
-
["to", "buttonTo"],
|
|
3715
|
-
["target", "buttonTarget"],
|
|
3716
|
-
["rel", "buttonRel"],
|
|
3717
|
-
["download", "buttonDownload"]
|
|
3718
|
-
])
|
|
3719
|
-
};
|
|
3720
|
-
});
|
|
3721
|
-
return (_ctx, _cache) => {
|
|
3722
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
3723
|
-
createElementVNode("p", _hoisted_2, toDisplayString(props.headline), 1),
|
|
3724
|
-
props.description ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
3725
|
-
hasButton.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
3726
|
-
(openBlock(), createBlock(resolveDynamicComponent(buttonType.value), mergeProps(buttonProps.value, {
|
|
3727
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick", $event))
|
|
3728
|
-
}), null, 16))
|
|
3729
|
-
])) : createCommentVNode("", true)
|
|
3730
|
-
]);
|
|
3731
|
-
};
|
|
3732
|
-
}
|
|
3733
|
-
});
|
|
3734
|
-
|
|
3735
|
-
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-059bb01e"]]);
|
|
3655
|
+
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67e036b5"]]);
|
|
3736
3656
|
|
|
3737
|
-
export { KdsAvatar, _sfc_main$t as KdsButton,
|
|
3657
|
+
export { KdsAvatar, _sfc_main$t as KdsButton, KdsCardClickable, _sfc_main$m as KdsCheckbox, KdsCheckboxGroup, KdsColorSwatch, KdsDataType, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLabel, _sfc_main$s as KdsLinkButton, KdsLiveStatus, KdsLoadingSpinner, KdsModal, KdsModalLayout, _sfc_main$e as KdsNumberInput, _sfc_main$d as KdsPatternInput, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, _sfc_main$c as KdsSearchInput, KdsSubText, _sfc_main$b as KdsTextInput, KdsTextarea, _sfc_main$r as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, kdsAvatarSize, kdsAvatarSizes, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCardVariant, kdsCardVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchSize, kdsColorSwatchSizes, kdsColorSwatchType, kdsColorSwatchTypes, kdsDarkModeType, kdsDarkModeTypes, kdsDataTypeSize, kdsDataTypeSizes, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
|
|
3738
3658
|
//# sourceMappingURL=index.js.map
|