@knime/kds-components 11.3.0 → 11.5.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 +24 -0
- package/dist/{KdsIcon-XR1PupNA.js → KdsIcon-CJrxt0gq.js} +39 -18
- package/dist/KdsIcon-CJrxt0gq.js.map +1 -0
- package/dist/{KdsPopover-DBU9xVEK.js → KdsPopover-Bqel9iqk.js} +6 -8
- package/dist/KdsPopover-Bqel9iqk.js.map +1 -0
- package/dist/KdsPopover.css +69 -73
- package/dist/index.css +27 -18
- package/dist/index.js +124 -44
- package/dist/index.js.map +1 -1
- package/dist/src/components/forms/selects/MultiSelectListBox/useMultiSelectListBoxSelection.d.ts.map +1 -1
- package/dist/src/components/lists/ContextMenu/KdsContextMenu.vue.d.ts.map +1 -1
- package/dist/src/components/lists/MenuContainer/KdsMenuContainer.vue.d.ts +3 -3
- package/dist/src/components/lists/MenuContainer/KdsMenuContainer.vue.d.ts.map +1 -1
- package/dist/src/components/lists/MenuContainer/types.d.ts +9 -0
- package/dist/src/components/lists/MenuContainer/types.d.ts.map +1 -1
- package/dist/src/layouts/overlays/Popover/KdsPopover.vue.d.ts.map +1 -1
- package/dist/src/layouts/overlays/Popover/types.d.ts +5 -3
- package/dist/src/layouts/overlays/Popover/types.d.ts.map +1 -1
- package/dist/src/layouts/overlays/Tooltip/vKdsTooltip.d.ts +2 -0
- package/dist/src/layouts/overlays/Tooltip/vKdsTooltip.d.ts.map +1 -1
- package/dist/src/layouts/panels/SplitPanel/KdsSplitPanel.vue.d.ts.map +1 -1
- package/dist/src/layouts/panels/SplitPanel/types.d.ts +6 -0
- package/dist/src/layouts/panels/SplitPanel/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/KdsIcon-XR1PupNA.js.map +0 -1
- package/dist/KdsPopover-DBU9xVEK.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as kdsPopoverRole, c as kdsPopoverTypes, i as kdsPopoverPlacements, l as _plugin_vue_export_helper_default, o as kdsPopoverRoles, r as kdsPopoverPlacement, s as kdsPopoverType, t as KdsPopover_default, u as __exportAll$1 } from "./KdsPopover-
|
|
2
|
-
import { a as useKdsIsTruncated, i as elementOverflowsHorizontally, n as useIcon, r as vKdsTooltip, t as KdsIcon_default } from "./KdsIcon-
|
|
1
|
+
import { a as kdsPopoverRole, c as kdsPopoverTypes, i as kdsPopoverPlacements, l as _plugin_vue_export_helper_default, o as kdsPopoverRoles, r as kdsPopoverPlacement, s as kdsPopoverType, t as KdsPopover_default, u as __exportAll$1 } from "./KdsPopover-Bqel9iqk.js";
|
|
2
|
+
import { a as useKdsIsTruncated, i as elementOverflowsHorizontally, n as useIcon, r as vKdsTooltip, t as KdsIcon_default } from "./KdsIcon-CJrxt0gq.js";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createPropsRestProxy, createSlots, createTextVNode, createVNode, defineAsyncComponent, defineComponent, effectScope, getCurrentInstance, guardReactiveProps, h, inject, isRef, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onBeforeUpdate, onMounted, onScopeDispose, onUnmounted, openBlock, provide, readonly, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toRef, toRefs, unref, useAttrs, useCssVars, useId, useModel, useSlots, useTemplateRef, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
4
4
|
import { onClickOutside, useElementSize, useEventListener, useLocalStorage, useMousePressed, useMutationObserver, usePreferredDark, useRafFn, useResizeObserver, useTemplateRefsList, useVirtualList } from "@vueuse/core";
|
|
5
5
|
import './index.css';//#region src/components/accessories/Avatar/enums.ts
|
|
@@ -2463,6 +2463,62 @@ var color$1 = {
|
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
2465
|
},
|
|
2466
|
+
ai: { gradient: {
|
|
2467
|
+
start: {
|
|
2468
|
+
light: {
|
|
2469
|
+
h: 185.8,
|
|
2470
|
+
s: 49.2,
|
|
2471
|
+
l: 87.6,
|
|
2472
|
+
a: 1
|
|
2473
|
+
},
|
|
2474
|
+
dark: {
|
|
2475
|
+
h: 185.8,
|
|
2476
|
+
s: 49.2,
|
|
2477
|
+
l: 87.6,
|
|
2478
|
+
a: 1
|
|
2479
|
+
},
|
|
2480
|
+
css: {
|
|
2481
|
+
value: "hsl(185.8, 49.2%, 87.6%)",
|
|
2482
|
+
variable: "var(--kds-color-ai-gradient-start)"
|
|
2483
|
+
}
|
|
2484
|
+
},
|
|
2485
|
+
middle: {
|
|
2486
|
+
light: {
|
|
2487
|
+
h: 50.8,
|
|
2488
|
+
s: 100,
|
|
2489
|
+
l: 50,
|
|
2490
|
+
a: 1
|
|
2491
|
+
},
|
|
2492
|
+
dark: {
|
|
2493
|
+
h: 50.8,
|
|
2494
|
+
s: 100,
|
|
2495
|
+
l: 50,
|
|
2496
|
+
a: 1
|
|
2497
|
+
},
|
|
2498
|
+
css: {
|
|
2499
|
+
value: "hsl(50.8, 100%, 50%)",
|
|
2500
|
+
variable: "var(--kds-color-ai-gradient-middle)"
|
|
2501
|
+
}
|
|
2502
|
+
},
|
|
2503
|
+
end: {
|
|
2504
|
+
light: {
|
|
2505
|
+
h: 193.1,
|
|
2506
|
+
s: 60.2,
|
|
2507
|
+
l: 43.3,
|
|
2508
|
+
a: 1
|
|
2509
|
+
},
|
|
2510
|
+
dark: {
|
|
2511
|
+
h: 193.1,
|
|
2512
|
+
s: 60.2,
|
|
2513
|
+
l: 43.3,
|
|
2514
|
+
a: 1
|
|
2515
|
+
},
|
|
2516
|
+
css: {
|
|
2517
|
+
value: "hsl(193.1, 60.2%, 43.3%)",
|
|
2518
|
+
variable: "var(--kds-color-ai-gradient-end)"
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
} },
|
|
2466
2522
|
blanket: { default: {
|
|
2467
2523
|
light: {
|
|
2468
2524
|
h: 0,
|
|
@@ -11753,14 +11809,19 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
11753
11809
|
ariaLabel: { default: "Menu" },
|
|
11754
11810
|
items: {},
|
|
11755
11811
|
menuMaxHeight: {},
|
|
11756
|
-
variant: { default: () => kdsListItemVariant.SMALL }
|
|
11812
|
+
variant: { default: () => kdsListItemVariant.SMALL },
|
|
11813
|
+
hideFocusRingUntilKeydown: {
|
|
11814
|
+
type: Boolean,
|
|
11815
|
+
default: false
|
|
11816
|
+
}
|
|
11757
11817
|
},
|
|
11758
11818
|
emits: ["itemClick"],
|
|
11759
11819
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
11760
11820
|
const props = createPropsRestProxy(__props, [
|
|
11761
11821
|
"ariaLabel",
|
|
11762
11822
|
"menuMaxHeight",
|
|
11763
|
-
"variant"
|
|
11823
|
+
"variant",
|
|
11824
|
+
"hideFocusRingUntilKeydown"
|
|
11764
11825
|
]);
|
|
11765
11826
|
const emit = __emit;
|
|
11766
11827
|
const { itemsWithPrefix, toUnprefixedId } = useStableItemIds({ items: computed(() => props.items) });
|
|
@@ -11858,7 +11919,9 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
11858
11919
|
const activeElement = getActiveElement();
|
|
11859
11920
|
return activeElement === event.target && activeElement === containerEl.value;
|
|
11860
11921
|
};
|
|
11922
|
+
const hasKeydown = ref(false);
|
|
11861
11923
|
const handleKeydown = (event) => {
|
|
11924
|
+
hasKeydown.value = true;
|
|
11862
11925
|
if (!shouldNavigate(event)) return;
|
|
11863
11926
|
if (enabledItems.value.length === 0) return;
|
|
11864
11927
|
const currentIndex = findEnabledIndex(activeId.value);
|
|
@@ -11968,7 +12031,7 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
11968
12031
|
ref_key: "containerEl",
|
|
11969
12032
|
ref: containerEl,
|
|
11970
12033
|
role: "menu",
|
|
11971
|
-
class: "kds-menu-container",
|
|
12034
|
+
class: normalizeClass(["kds-menu-container", { "hide-focus-ring": __props.hideFocusRingUntilKeydown && !hasKeydown.value }]),
|
|
11972
12035
|
"aria-label": __props.ariaLabel,
|
|
11973
12036
|
tabindex: 0,
|
|
11974
12037
|
style: normalizeStyle({ maxHeight: __props.menuMaxHeight }),
|
|
@@ -12031,10 +12094,10 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
12031
12094
|
"onClick",
|
|
12032
12095
|
"onMouseenter"
|
|
12033
12096
|
]);
|
|
12034
|
-
}), 128))],
|
|
12097
|
+
}), 128))], 46, _hoisted_1$67);
|
|
12035
12098
|
};
|
|
12036
12099
|
}
|
|
12037
|
-
}), [["__scopeId", "data-v-
|
|
12100
|
+
}), [["__scopeId", "data-v-e83a636c"]]);
|
|
12038
12101
|
//#endregion
|
|
12039
12102
|
//#region src/components/buttons/KdsMenuButton/KdsMenuButton.vue
|
|
12040
12103
|
var KdsMenuButton_default = /* @__PURE__ */ defineComponent({
|
|
@@ -22616,7 +22679,7 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
22616
22679
|
"resultClick"
|
|
22617
22680
|
], ["update:modelValue"]),
|
|
22618
22681
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
22619
|
-
const KdsPopover = defineAsyncComponent(() => import("./KdsPopover-
|
|
22682
|
+
const KdsPopover = defineAsyncComponent(() => import("./KdsPopover-Bqel9iqk.js").then((n) => n.n));
|
|
22620
22683
|
const KdsListContainer = defineAsyncComponent(() => Promise.resolve().then(() => KdsListContainer_exports));
|
|
22621
22684
|
const props = createPropsRestProxy(__props, [
|
|
22622
22685
|
"placeholder",
|
|
@@ -26968,6 +27031,35 @@ var KdsMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
26968
27031
|
}
|
|
26969
27032
|
});
|
|
26970
27033
|
//#endregion
|
|
27034
|
+
//#region src/util/useKeyPressedUntilMouseClick.ts
|
|
27035
|
+
var defaultKeys = [
|
|
27036
|
+
"Tab",
|
|
27037
|
+
"ArrowUp",
|
|
27038
|
+
"ArrowDown",
|
|
27039
|
+
"ArrowLeft",
|
|
27040
|
+
"ArrowRight",
|
|
27041
|
+
" ",
|
|
27042
|
+
"Enter"
|
|
27043
|
+
];
|
|
27044
|
+
var useKeyPressedUntilMouseClick = (keys = defaultKeys) => {
|
|
27045
|
+
const hasUsedKeyboard = ref(false);
|
|
27046
|
+
const turnKeyboardUsageOn = (event) => {
|
|
27047
|
+
if (keys.includes(event.key)) hasUsedKeyboard.value = true;
|
|
27048
|
+
};
|
|
27049
|
+
const turnKeyboardUsageOff = () => {
|
|
27050
|
+
hasUsedKeyboard.value = false;
|
|
27051
|
+
};
|
|
27052
|
+
onMounted(() => {
|
|
27053
|
+
document.addEventListener("keydown", turnKeyboardUsageOn, { capture: true });
|
|
27054
|
+
document.addEventListener("pointerdown", turnKeyboardUsageOff, { capture: true });
|
|
27055
|
+
});
|
|
27056
|
+
onUnmounted(() => {
|
|
27057
|
+
document.removeEventListener("keydown", turnKeyboardUsageOn, true);
|
|
27058
|
+
document.removeEventListener("pointerdown", turnKeyboardUsageOff, true);
|
|
27059
|
+
});
|
|
27060
|
+
return hasUsedKeyboard;
|
|
27061
|
+
};
|
|
27062
|
+
//#endregion
|
|
26971
27063
|
//#region src/components/lists/ContextMenu/KdsContextMenu.vue
|
|
26972
27064
|
var KdsContextMenu_default = /* @__PURE__ */ defineComponent({
|
|
26973
27065
|
inheritAttrs: false,
|
|
@@ -27002,9 +27094,17 @@ var KdsContextMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
27002
27094
|
open.value = false;
|
|
27003
27095
|
emit("itemClick", itemId);
|
|
27004
27096
|
};
|
|
27097
|
+
const openedWithKeyboard = useKeyPressedUntilMouseClick([
|
|
27098
|
+
"ContextMenu",
|
|
27099
|
+
"F10",
|
|
27100
|
+
"Enter",
|
|
27101
|
+
" "
|
|
27102
|
+
]);
|
|
27103
|
+
const hideFocusRing = ref(false);
|
|
27005
27104
|
const menuContainerEl = useTemplateRef("menuContainer");
|
|
27006
27105
|
watch(open, (isOpen, _oldVal, onCleanup) => {
|
|
27007
27106
|
if (!isOpen) return;
|
|
27107
|
+
hideFocusRing.value = !openedWithKeyboard.value;
|
|
27008
27108
|
if (menuContainerEl.value) {
|
|
27009
27109
|
menuContainerEl.value.focus();
|
|
27010
27110
|
return;
|
|
@@ -27016,11 +27116,12 @@ var KdsContextMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
27016
27116
|
return (_ctx, _cache) => {
|
|
27017
27117
|
return openBlock(), createBlock(KdsPopover_default, {
|
|
27018
27118
|
modelValue: open.value,
|
|
27019
|
-
"onUpdate:modelValue": _cache[
|
|
27119
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
27020
27120
|
placement: "custom",
|
|
27021
27121
|
"custom-placement-position": __props.position,
|
|
27022
27122
|
"popover-type": __props.popoverMode,
|
|
27023
|
-
"aria-label": "Menu"
|
|
27123
|
+
"aria-label": "Menu",
|
|
27124
|
+
onContextmenu: _cache[1] || (_cache[1] = withModifiers(() => {}, ["prevent"]))
|
|
27024
27125
|
}, {
|
|
27025
27126
|
default: withCtx(() => [open.value ? (openBlock(), createBlock(KdsMenuContainer_default, {
|
|
27026
27127
|
key: 0,
|
|
@@ -27030,14 +27131,15 @@ var KdsContextMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
27030
27131
|
items: props.items,
|
|
27031
27132
|
"menu-max-height": __props.menuMaxHeight,
|
|
27032
27133
|
variant: __props.variant,
|
|
27033
|
-
|
|
27034
|
-
|
|
27134
|
+
"hide-focus-ring-until-keydown": hideFocusRing.value,
|
|
27135
|
+
onItemClick
|
|
27035
27136
|
}, null, 8, [
|
|
27036
27137
|
"id",
|
|
27037
27138
|
"aria-label",
|
|
27038
27139
|
"items",
|
|
27039
27140
|
"menu-max-height",
|
|
27040
|
-
"variant"
|
|
27141
|
+
"variant",
|
|
27142
|
+
"hide-focus-ring-until-keydown"
|
|
27041
27143
|
])) : createCommentVNode("", true)]),
|
|
27042
27144
|
_: 1
|
|
27043
27145
|
}, 8, [
|
|
@@ -27912,35 +28014,6 @@ var useFocusableMultiSelection = (options) => {
|
|
|
27912
28014
|
};
|
|
27913
28015
|
};
|
|
27914
28016
|
//#endregion
|
|
27915
|
-
//#region src/util/useKeyPressedUntilMouseClick.ts
|
|
27916
|
-
var defaultKeys = [
|
|
27917
|
-
"Tab",
|
|
27918
|
-
"ArrowUp",
|
|
27919
|
-
"ArrowDown",
|
|
27920
|
-
"ArrowLeft",
|
|
27921
|
-
"ArrowRight",
|
|
27922
|
-
" ",
|
|
27923
|
-
"Enter"
|
|
27924
|
-
];
|
|
27925
|
-
var useKeyPressedUntilMouseClick = (keys = defaultKeys) => {
|
|
27926
|
-
const hasUsedKeyboard = ref(false);
|
|
27927
|
-
const turnKeyboardUsageOn = (event) => {
|
|
27928
|
-
if (keys.includes(event.key)) hasUsedKeyboard.value = true;
|
|
27929
|
-
};
|
|
27930
|
-
const turnKeyboardUsageOff = () => {
|
|
27931
|
-
hasUsedKeyboard.value = false;
|
|
27932
|
-
};
|
|
27933
|
-
onMounted(() => {
|
|
27934
|
-
document.addEventListener("keydown", turnKeyboardUsageOn, { capture: true });
|
|
27935
|
-
document.addEventListener("pointerdown", turnKeyboardUsageOff, { capture: true });
|
|
27936
|
-
});
|
|
27937
|
-
onUnmounted(() => {
|
|
27938
|
-
document.removeEventListener("keydown", turnKeyboardUsageOn, true);
|
|
27939
|
-
document.removeEventListener("pointerdown", turnKeyboardUsageOff, true);
|
|
27940
|
-
});
|
|
27941
|
-
return hasUsedKeyboard;
|
|
27942
|
-
};
|
|
27943
|
-
//#endregion
|
|
27944
28017
|
//#region src/util/useKdsNameValidator.ts
|
|
27945
28018
|
var INVALID_NAME_CHARACTERS = /[*?#:";<>%~|/\\]/;
|
|
27946
28019
|
var NAME_CHAR_LIMIT = 255;
|
|
@@ -35791,6 +35864,10 @@ var KdsSplitPanel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
35791
35864
|
showSnapEmptyState: {
|
|
35792
35865
|
type: Boolean,
|
|
35793
35866
|
default: false
|
|
35867
|
+
},
|
|
35868
|
+
hideSplitterWhenClosed: {
|
|
35869
|
+
type: Boolean,
|
|
35870
|
+
default: false
|
|
35794
35871
|
}
|
|
35795
35872
|
}, {
|
|
35796
35873
|
"expanded": {
|
|
@@ -35834,7 +35911,10 @@ var KdsSplitPanel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
35834
35911
|
};
|
|
35835
35912
|
const sizePane = computed(() => directionSizePaneMap[__props.direction]);
|
|
35836
35913
|
const isSecondaryReverse = computed(() => [kdsSplitPanelDirection.LEFT, kdsSplitPanelDirection.UP].includes(__props.direction));
|
|
35837
|
-
const hiddenPane = computed(() =>
|
|
35914
|
+
const hiddenPane = computed(() => {
|
|
35915
|
+
if (__props.hideSecondaryPane) return sizePane.value;
|
|
35916
|
+
if (__props.hideSplitterWhenClosed && !expanded.value) return sizePane.value;
|
|
35917
|
+
});
|
|
35838
35918
|
const previousSecondarySize = ref(secondarySize.value);
|
|
35839
35919
|
const willSnap = computed(() => {
|
|
35840
35920
|
if (__props.usePixel) return __props.secondarySnapSize > pixelSize.value;
|
|
@@ -35958,7 +36038,7 @@ var KdsSplitPanel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
35958
36038
|
]);
|
|
35959
36039
|
};
|
|
35960
36040
|
}
|
|
35961
|
-
}), [["__scopeId", "data-v-
|
|
36041
|
+
}), [["__scopeId", "data-v-d6459278"]]);
|
|
35962
36042
|
//#endregion
|
|
35963
36043
|
//#region src/layouts/panels/TabPanel/TabBar/useTabBarAdaptiveLayout.ts
|
|
35964
36044
|
/**
|