@knime/kds-components 0.10.0 → 0.11.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/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/index.css +192 -156
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +173 -198
- 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/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, onBeforeUnmount, 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
|
}
|
|
@@ -3165,6 +3197,99 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3165
3197
|
|
|
3166
3198
|
const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-ece95962"]]);
|
|
3167
3199
|
|
|
3200
|
+
const _hoisted_1$4 = { class: "kds-empty-state" };
|
|
3201
|
+
const _hoisted_2$2 = { class: "kds-empty-state-headline" };
|
|
3202
|
+
const _hoisted_3$2 = {
|
|
3203
|
+
key: 0,
|
|
3204
|
+
class: "kds-empty-state-description"
|
|
3205
|
+
};
|
|
3206
|
+
const _hoisted_4$1 = {
|
|
3207
|
+
key: 1,
|
|
3208
|
+
class: "kds-empty-state-action"
|
|
3209
|
+
};
|
|
3210
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3211
|
+
__name: "KdsEmptyState",
|
|
3212
|
+
props: {
|
|
3213
|
+
headline: {},
|
|
3214
|
+
description: {},
|
|
3215
|
+
button: {}
|
|
3216
|
+
},
|
|
3217
|
+
emits: ["buttonClick"],
|
|
3218
|
+
setup(__props, { emit: __emit }) {
|
|
3219
|
+
const props = __props;
|
|
3220
|
+
const emit = __emit;
|
|
3221
|
+
const isLinkButton = computed(
|
|
3222
|
+
() => props.button && "to" in props.button && props.button.to !== void 0
|
|
3223
|
+
);
|
|
3224
|
+
const buttonComponent = computed(
|
|
3225
|
+
() => isLinkButton.value ? _sfc_main$s : _sfc_main$t
|
|
3226
|
+
);
|
|
3227
|
+
return (_ctx, _cache) => {
|
|
3228
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
3229
|
+
createElementVNode("p", _hoisted_2$2, toDisplayString(props.headline), 1),
|
|
3230
|
+
props.description ? (openBlock(), createElementBlock("p", _hoisted_3$2, toDisplayString(props.description), 1)) : createCommentVNode("", true),
|
|
3231
|
+
props.button ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
3232
|
+
(openBlock(), createBlock(resolveDynamicComponent(buttonComponent.value), mergeProps(props.button, {
|
|
3233
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick", $event))
|
|
3234
|
+
}), null, 16))
|
|
3235
|
+
])) : createCommentVNode("", true)
|
|
3236
|
+
]);
|
|
3237
|
+
};
|
|
3238
|
+
}
|
|
3239
|
+
});
|
|
3240
|
+
|
|
3241
|
+
const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b4af30cf"]]);
|
|
3242
|
+
|
|
3243
|
+
const _hoisted_1$3 = ["aria-label", "aria-labelledby", "aria-pressed", "disabled"];
|
|
3244
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3245
|
+
__name: "KdsCardClickable",
|
|
3246
|
+
props: /* @__PURE__ */ mergeModels({
|
|
3247
|
+
variant: { default: "filled" },
|
|
3248
|
+
selectable: { type: Boolean, default: false },
|
|
3249
|
+
disabled: { type: Boolean, default: false },
|
|
3250
|
+
ariaLabel: {},
|
|
3251
|
+
ariaLabelledby: {}
|
|
3252
|
+
}, {
|
|
3253
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
3254
|
+
"modelModifiers": {}
|
|
3255
|
+
}),
|
|
3256
|
+
emits: /* @__PURE__ */ mergeModels(["click"], ["update:modelValue"]),
|
|
3257
|
+
setup(__props, { emit: __emit }) {
|
|
3258
|
+
const modelValue = useModel(__props, "modelValue");
|
|
3259
|
+
const emit = __emit;
|
|
3260
|
+
const selected = computed(() => modelValue.value && __props.selectable);
|
|
3261
|
+
const handleClick = (event) => {
|
|
3262
|
+
if (__props.selectable) {
|
|
3263
|
+
modelValue.value = !modelValue.value;
|
|
3264
|
+
} else {
|
|
3265
|
+
emit("click", event);
|
|
3266
|
+
}
|
|
3267
|
+
};
|
|
3268
|
+
return (_ctx, _cache) => {
|
|
3269
|
+
return openBlock(), createElementBlock("button", {
|
|
3270
|
+
type: "button",
|
|
3271
|
+
class: normalizeClass(["kds-card", [`variant-${__props.variant}`, { selected: selected.value }]]),
|
|
3272
|
+
"aria-label": __props.ariaLabel,
|
|
3273
|
+
"aria-labelledby": __props.ariaLabelledby,
|
|
3274
|
+
"aria-pressed": __props.selectable ? modelValue.value : void 0,
|
|
3275
|
+
disabled: __props.disabled,
|
|
3276
|
+
onClick: handleClick
|
|
3277
|
+
}, [
|
|
3278
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3279
|
+
], 10, _hoisted_1$3);
|
|
3280
|
+
};
|
|
3281
|
+
}
|
|
3282
|
+
});
|
|
3283
|
+
|
|
3284
|
+
const KdsCardClickable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4607badd"]]);
|
|
3285
|
+
|
|
3286
|
+
const kdsCardVariant = {
|
|
3287
|
+
FILLED: "filled",
|
|
3288
|
+
OUTLINED: "outlined",
|
|
3289
|
+
TRANSPARENT: "transparent"
|
|
3290
|
+
};
|
|
3291
|
+
const kdsCardVariants = Object.values(kdsCardVariant);
|
|
3292
|
+
|
|
3168
3293
|
const createUnwrappedPromise = () => {
|
|
3169
3294
|
let resolve = () => {
|
|
3170
3295
|
};
|
|
@@ -3219,14 +3344,14 @@ const kdsModalPropsDefault = {
|
|
|
3219
3344
|
...kdsModalLayoutPropsDefault
|
|
3220
3345
|
};
|
|
3221
3346
|
|
|
3222
|
-
const _hoisted_1$
|
|
3223
|
-
const _hoisted_2$
|
|
3224
|
-
const _hoisted_3$
|
|
3225
|
-
const _hoisted_4
|
|
3347
|
+
const _hoisted_1$2 = { class: "modal-header" };
|
|
3348
|
+
const _hoisted_2$1 = { class: "modal-header-title" };
|
|
3349
|
+
const _hoisted_3$1 = ["data-variant"];
|
|
3350
|
+
const _hoisted_4 = {
|
|
3226
3351
|
key: 0,
|
|
3227
3352
|
class: "modal-footer"
|
|
3228
3353
|
};
|
|
3229
|
-
const _sfc_main$
|
|
3354
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3230
3355
|
...{ inheritAttrs: false },
|
|
3231
3356
|
__name: "KdsModalLayout",
|
|
3232
3357
|
props: /* @__PURE__ */ mergeDefaults({
|
|
@@ -3238,18 +3363,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3238
3363
|
}, kdsModalLayoutPropsDefault),
|
|
3239
3364
|
setup(__props) {
|
|
3240
3365
|
useCssVars((_ctx) => ({
|
|
3241
|
-
"
|
|
3366
|
+
"v670bbff1": _ctx.overflow
|
|
3242
3367
|
}));
|
|
3243
3368
|
const props = __props;
|
|
3244
3369
|
return (_ctx, _cache) => {
|
|
3245
3370
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3246
|
-
createElementVNode("header", _hoisted_1$
|
|
3371
|
+
createElementVNode("header", _hoisted_1$2, [
|
|
3247
3372
|
props.icon ? (openBlock(), createBlock(KdsIcon, {
|
|
3248
3373
|
key: 0,
|
|
3249
3374
|
name: props.icon,
|
|
3250
3375
|
size: "medium"
|
|
3251
3376
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
3252
|
-
createElementVNode("div", _hoisted_2$
|
|
3377
|
+
createElementVNode("div", _hoisted_2$1, toDisplayString(props.title), 1),
|
|
3253
3378
|
createVNode(_sfc_main$t, {
|
|
3254
3379
|
"leading-icon": "x-close",
|
|
3255
3380
|
variant: "transparent",
|
|
@@ -3263,8 +3388,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3263
3388
|
"data-variant": __props.variant
|
|
3264
3389
|
}, [
|
|
3265
3390
|
renderSlot(_ctx.$slots, "body", {}, void 0, true)
|
|
3266
|
-
], 8, _hoisted_3$
|
|
3267
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4
|
|
3391
|
+
], 8, _hoisted_3$1),
|
|
3392
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4, [
|
|
3268
3393
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
3269
3394
|
])) : createCommentVNode("", true)
|
|
3270
3395
|
], 64);
|
|
@@ -3272,10 +3397,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3272
3397
|
}
|
|
3273
3398
|
});
|
|
3274
3399
|
|
|
3275
|
-
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3400
|
+
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ff11e839"]]);
|
|
3276
3401
|
|
|
3277
|
-
const _hoisted_1$
|
|
3278
|
-
const _sfc_main$
|
|
3402
|
+
const _hoisted_1$1 = ["closedby"];
|
|
3403
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3279
3404
|
__name: "KdsModal",
|
|
3280
3405
|
props: /* @__PURE__ */ mergeDefaults({
|
|
3281
3406
|
icon: {},
|
|
@@ -3372,12 +3497,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3372
3497
|
_: 3
|
|
3373
3498
|
}, 8, ["title", "icon", "variant", "overflow"])
|
|
3374
3499
|
], true)
|
|
3375
|
-
], 42, _hoisted_1$
|
|
3500
|
+
], 42, _hoisted_1$1)) : createCommentVNode("", true);
|
|
3376
3501
|
};
|
|
3377
3502
|
}
|
|
3378
3503
|
});
|
|
3379
3504
|
|
|
3380
|
-
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3505
|
+
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f7b58ae1"]]);
|
|
3381
3506
|
|
|
3382
3507
|
const defaultCancelButton = {
|
|
3383
3508
|
type: "cancel",
|
|
@@ -3458,16 +3583,16 @@ const useKdsDynamicModal = () => {
|
|
|
3458
3583
|
};
|
|
3459
3584
|
};
|
|
3460
3585
|
|
|
3461
|
-
const _hoisted_1
|
|
3586
|
+
const _hoisted_1 = {
|
|
3462
3587
|
key: 1,
|
|
3463
3588
|
class: "confirmation"
|
|
3464
3589
|
};
|
|
3465
|
-
const _hoisted_2
|
|
3466
|
-
const _hoisted_3
|
|
3590
|
+
const _hoisted_2 = { class: "message" };
|
|
3591
|
+
const _hoisted_3 = {
|
|
3467
3592
|
key: 0,
|
|
3468
3593
|
class: "ask-again"
|
|
3469
3594
|
};
|
|
3470
|
-
const _sfc_main
|
|
3595
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3471
3596
|
__name: "KdsDynamicModalProvider",
|
|
3472
3597
|
setup(__props) {
|
|
3473
3598
|
const askAgain = ref(false);
|
|
@@ -3520,9 +3645,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3520
3645
|
unref(config)?.type === "confirm" ? {
|
|
3521
3646
|
name: "body",
|
|
3522
3647
|
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
|
|
3648
|
+
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
3649
|
+
createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
|
|
3650
|
+
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
3526
3651
|
createVNode(_sfc_main$m, {
|
|
3527
3652
|
modelValue: askAgain.value,
|
|
3528
3653
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
@@ -3568,7 +3693,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3568
3693
|
}
|
|
3569
3694
|
});
|
|
3570
3695
|
|
|
3571
|
-
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main
|
|
3696
|
+
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67e036b5"]]);
|
|
3572
3697
|
|
|
3573
3698
|
const kdsPopoverPlacement = {
|
|
3574
3699
|
TOP_LEFT: "top-left",
|
|
@@ -3584,155 +3709,5 @@ const kdsPopoverRole = {
|
|
|
3584
3709
|
};
|
|
3585
3710
|
const kdsPopoverRoles = Object.values(kdsPopoverRole);
|
|
3586
3711
|
|
|
3587
|
-
|
|
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"]]);
|
|
3736
|
-
|
|
3737
|
-
export { KdsAvatar, _sfc_main$t as KdsButton, KdsCard, _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, KdsPopover, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, _sfc_main$c as KdsSearchInput, KdsSubText, _sfc_main$b as KdsTextInput, KdsTextarea, _sfc_main$r as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, 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, kdsPopoverPlacement, kdsPopoverPlacements, kdsPopoverRole, kdsPopoverRoles, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
|
|
3712
|
+
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, KdsPopover, 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, kdsPopoverPlacement, kdsPopoverPlacements, kdsPopoverRole, kdsPopoverRoles, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
|
|
3738
3713
|
//# sourceMappingURL=index.js.map
|