@knime/kds-components 11.5.0 → 12.0.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/{KdsIcon-CJrxt0gq.js → KdsIcon-DWTHABhA.js} +6 -47
  3. package/dist/KdsIcon-DWTHABhA.js.map +1 -0
  4. package/dist/KdsIcon.css +2 -0
  5. package/dist/{KdsPopover-Bqel9iqk.js → KdsPopover-DezPib64.js} +28 -13
  6. package/dist/KdsPopover-DezPib64.js.map +1 -0
  7. package/dist/KdsPopover.css +17 -17
  8. package/dist/index.css +66 -63
  9. package/dist/index.js +511 -454
  10. package/dist/index.js.map +1 -1
  11. package/dist/src/components/buttons/KdsMenuButton/KdsMenuButton.vue.d.ts +2 -83
  12. package/dist/src/components/buttons/KdsMenuButton/KdsMenuButton.vue.d.ts.map +1 -1
  13. package/dist/src/components/buttons/KdsMenuButton/types.d.ts +4 -0
  14. package/dist/src/components/buttons/KdsMenuButton/types.d.ts.map +1 -1
  15. package/dist/src/components/buttons/KdsSplitButton/KdsSplitButton.vue.d.ts.map +1 -1
  16. package/dist/src/components/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts.map +1 -1
  17. package/dist/src/components/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts.map +1 -1
  18. package/dist/src/components/forms/inputs/ColorInput/KdsColorInput.vue.d.ts.map +1 -1
  19. package/dist/src/components/forms/inputs/DateTimeFormatInput/KdsDateTimeFormatInput.vue.d.ts.map +1 -1
  20. package/dist/src/components/forms/inputs/IntervalInput/KdsIntervalInput.vue.d.ts.map +1 -1
  21. package/dist/src/components/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts.map +1 -1
  22. package/dist/src/components/forms/inputs/TextInput/KdsTextInput.vue.d.ts.map +1 -1
  23. package/dist/src/components/forms/selects/MultiSelectListBox/KdsMultiSelectListBox.vue.d.ts.map +1 -1
  24. package/dist/src/components/forms/selects/TwinList/TwinListBody.vue.d.ts.map +1 -1
  25. package/dist/src/components/lists/Menu/KdsMenu.vue.d.ts +3 -7
  26. package/dist/src/components/lists/Menu/KdsMenu.vue.d.ts.map +1 -1
  27. package/dist/src/components/lists/MenuContainer/KdsMenuContainer.vue.d.ts.map +1 -1
  28. package/dist/src/components/lists/MenuContainer/KdsMenuItem.vue.d.ts +1 -6
  29. package/dist/src/components/lists/MenuContainer/KdsMenuItem.vue.d.ts.map +1 -1
  30. package/dist/src/layouts/explorer/FileExplorer/KdsFileExplorer.vue.d.ts.map +1 -1
  31. package/dist/src/layouts/explorer/FileExplorer/utils/popoverAnchorElement.d.ts +1 -1
  32. package/dist/src/layouts/explorer/FileExplorer/utils/popoverAnchorElement.d.ts.map +1 -1
  33. package/dist/src/layouts/overlays/Popover/KdsPopover.vue.d.ts +4 -0
  34. package/dist/src/layouts/overlays/Popover/KdsPopover.vue.d.ts.map +1 -1
  35. package/dist/src/layouts/overlays/Popover/types.d.ts +11 -5
  36. package/dist/src/layouts/overlays/Popover/types.d.ts.map +1 -1
  37. package/dist/src/layouts/overlays/Tooltip/vKdsTooltip.d.ts +0 -2
  38. package/dist/src/layouts/overlays/Tooltip/vKdsTooltip.d.ts.map +1 -1
  39. package/dist/src/layouts/panels/Navigation/KdsNavItem/types.d.ts +3 -1
  40. package/dist/src/layouts/panels/Navigation/KdsNavItem/types.d.ts.map +1 -1
  41. package/package.json +7 -7
  42. package/dist/KdsIcon-CJrxt0gq.js.map +0 -1
  43. package/dist/KdsPopover-Bqel9iqk.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-Bqel9iqk.js";
2
- import { a as useKdsIsTruncated, i as elementOverflowsHorizontally, n as useIcon, r as vKdsTooltip, t as KdsIcon_default } from "./KdsIcon-CJrxt0gq.js";
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-DezPib64.js";
2
+ import { a as useKdsIsTruncated, i as elementOverflowsHorizontally, n as useIcon, r as vKdsTooltip, t as KdsIcon_default } from "./KdsIcon-DWTHABhA.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
@@ -22,13 +22,13 @@ var kdsAvatarSizes = Object.values(kdsAvatarSize);
22
22
  var nameInitials = (name) => name.split(/[., _-]+/).filter(Boolean).slice(0, 2).map((part) => [...part][0].toUpperCase()).join("");
23
23
  //#endregion
24
24
  //#region src/components/accessories/Avatar/KdsAvatar.vue?vue&type=script&setup=true&lang.ts
25
- var _hoisted_1$88 = [
25
+ var _hoisted_1$90 = [
26
26
  "role",
27
27
  "aria-hidden",
28
28
  "aria-label",
29
29
  "data-color"
30
30
  ];
31
- var _hoisted_2$55 = ["src"];
31
+ var _hoisted_2$54 = ["src"];
32
32
  var _hoisted_3$40 = {
33
33
  key: 1,
34
34
  class: "kds-avatar-initials",
@@ -93,14 +93,14 @@ var KdsAvatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
93
93
  alt: "",
94
94
  "aria-hidden": "true",
95
95
  onError: onImageError
96
- }, null, 40, _hoisted_2$55)) : (openBlock(), createElementBlock("div", _hoisted_3$40, [createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)]))], 10, _hoisted_1$88)), [[unref(vKdsTooltip), hasTitle.value ? accessibleTitle.value : void 0]]);
96
+ }, null, 40, _hoisted_2$54)) : (openBlock(), createElementBlock("div", _hoisted_3$40, [createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)]))], 10, _hoisted_1$90)), [[unref(vKdsTooltip), hasTitle.value ? accessibleTitle.value : void 0]]);
97
97
  };
98
98
  }
99
99
  }), [["__scopeId", "data-v-971c1c8a"]]);
100
100
  //#endregion
101
101
  //#region src/components/accessories/Avatar/KdsAvatarCounter.vue?vue&type=script&setup=true&lang.ts
102
- var _hoisted_1$87 = ["aria-label"];
103
- var _hoisted_2$54 = { class: "avatars" };
102
+ var _hoisted_1$89 = ["aria-label"];
103
+ var _hoisted_2$53 = { class: "avatars" };
104
104
  var _hoisted_3$39 = {
105
105
  key: 0,
106
106
  class: "more-count",
@@ -131,14 +131,14 @@ var KdsAvatarCounter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
131
131
  class: "kds-avatar-counter",
132
132
  role: "group",
133
133
  "aria-label": ariaLabel.value
134
- }, [createElementVNode("div", _hoisted_2$54, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.avatars, (avatar, index) => {
134
+ }, [createElementVNode("div", _hoisted_2$53, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.avatars, (avatar, index) => {
135
135
  return openBlock(), createBlock(KdsAvatar_default, mergeProps({
136
136
  key: index,
137
137
  "aria-hidden": "true",
138
138
  style: { zIndex: __props.avatars.length - index },
139
139
  class: "avatar"
140
140
  }, { ref_for: true }, avatar, { size: __props.size }), null, 16, ["style", "size"]);
141
- }), 128))]), __props.moreCount > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$39, " +" + toDisplayString(__props.moreCount), 1)) : createCommentVNode("", true)], 8, _hoisted_1$87);
141
+ }), 128))]), __props.moreCount > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$39, " +" + toDisplayString(__props.moreCount), 1)) : createCommentVNode("", true)], 8, _hoisted_1$89);
142
142
  };
143
143
  }
144
144
  }), [["__scopeId", "data-v-0bcb6934"]]);
@@ -494,7 +494,7 @@ var kdsDataTypeSize = {
494
494
  var kdsDataTypeSizes = Object.values(kdsDataTypeSize);
495
495
  //#endregion
496
496
  //#region src/components/accessories/Icon/KdsDataType.vue?vue&type=script&setup=true&lang.ts
497
- var _hoisted_1$86 = ["data-kds-icon-name"];
497
+ var _hoisted_1$88 = ["data-kds-icon-name"];
498
498
  //#endregion
499
499
  //#region src/components/accessories/Icon/KdsDataType.vue
500
500
  var KdsDataType_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -553,7 +553,7 @@ var KdsDataType_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
553
553
  ]),
554
554
  "aria-hidden": "true",
555
555
  focusable: "false"
556
- }, null, 8, ["class"]))], 10, _hoisted_1$86)), [[unref(vKdsTooltip), resolvedTitle.value]]);
556
+ }, null, 8, ["class"]))], 10, _hoisted_1$88)), [[unref(vKdsTooltip), resolvedTitle.value]]);
557
557
  };
558
558
  }
559
559
  }), [["__scopeId", "data-v-b85206a7"]]);
@@ -575,7 +575,7 @@ var kdsBadgeSize = {
575
575
  var kdsBadgeSizes = Object.values(kdsBadgeSize);
576
576
  //#endregion
577
577
  //#region src/components/accessories/Badge/KdsBadge.vue?vue&type=script&setup=true&lang.ts
578
- var _hoisted_1$85 = { class: "label-wrapper" };
578
+ var _hoisted_1$87 = { class: "label-wrapper" };
579
579
  //#endregion
580
580
  //#region src/components/accessories/Badge/KdsBadge.vue
581
581
  var KdsBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -600,7 +600,7 @@ var KdsBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
600
600
  key: 0,
601
601
  name: __props.leadingIcon,
602
602
  size: sizeToIconSize[__props.size]
603
- }, null, 8, ["name", "size"])) : createCommentVNode("", true), createElementVNode("span", _hoisted_1$85, toDisplayString(__props.label), 1)], 2);
603
+ }, null, 8, ["name", "size"])) : createCommentVNode("", true), createElementVNode("span", _hoisted_1$87, toDisplayString(__props.label), 1)], 2);
604
604
  };
605
605
  }
606
606
  }), [["__scopeId", "data-v-ed7689bb"]]);
@@ -6867,7 +6867,7 @@ var kdsColorSwatchSize = {
6867
6867
  var kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
6868
6868
  //#endregion
6869
6869
  //#region src/components/accessories/ColorSwatch/KdsColorSwatch.vue?vue&type=script&setup=true&lang.ts
6870
- var _hoisted_1$84 = [
6870
+ var _hoisted_1$86 = [
6871
6871
  "role",
6872
6872
  "aria-hidden",
6873
6873
  "aria-label"
@@ -6942,7 +6942,7 @@ var KdsColorSwatch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
6942
6942
  style: normalizeStyle(swatchStyle.value),
6943
6943
  "aria-hidden": hasTitle.value ? void 0 : "true",
6944
6944
  "aria-label": hasTitle.value ? accessibleTitle.value : void 0
6945
- }, null, 14, _hoisted_1$84)), [[unref(vKdsTooltip), hasTitle.value ? accessibleTitle.value : void 0]]);
6945
+ }, null, 14, _hoisted_1$86)), [[unref(vKdsTooltip), hasTitle.value ? accessibleTitle.value : void 0]]);
6946
6946
  };
6947
6947
  }
6948
6948
  }), [["__scopeId", "data-v-2f562103"]]);
@@ -6952,12 +6952,12 @@ var PORT_SIZE = 8;
6952
6952
  var PORT_STROKE_WIDTH = 1.4;
6953
6953
  //#endregion
6954
6954
  //#region src/components/accessories/PortIcon/KdsPortIcon.vue?vue&type=script&setup=true&lang.ts
6955
- var _hoisted_1$83 = [
6955
+ var _hoisted_1$85 = [
6956
6956
  "points",
6957
6957
  "data-type",
6958
6958
  "stroke-width"
6959
6959
  ];
6960
- var _hoisted_2$53 = [
6960
+ var _hoisted_2$52 = [
6961
6961
  "r",
6962
6962
  "data-type",
6963
6963
  "stroke-width"
@@ -7022,13 +7022,13 @@ var KdsPortIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
7022
7022
  class: normalizeClass({ optional: __props.optional }),
7023
7023
  "data-type": __props.type,
7024
7024
  "stroke-width": unref(PORT_STROKE_WIDTH)
7025
- }, null, 10, _hoisted_1$83)) : __props.type === "flowVariable" ? (openBlock(), createElementBlock("circle", {
7025
+ }, null, 10, _hoisted_1$85)) : __props.type === "flowVariable" ? (openBlock(), createElementBlock("circle", {
7026
7026
  key: 1,
7027
7027
  r: unref(8) / 2 - unref(PORT_STROKE_WIDTH) / 2,
7028
7028
  class: normalizeClass({ optional: __props.optional }),
7029
7029
  "data-type": __props.type,
7030
7030
  "stroke-width": unref(PORT_STROKE_WIDTH)
7031
- }, null, 10, _hoisted_2$53)) : (openBlock(), createElementBlock("rect", {
7031
+ }, null, 10, _hoisted_2$52)) : (openBlock(), createElementBlock("rect", {
7032
7032
  key: 2,
7033
7033
  width: unref(8) - unref(PORT_STROKE_WIDTH),
7034
7034
  height: unref(8) - unref(PORT_STROKE_WIDTH),
@@ -7167,8 +7167,8 @@ function prettyBytes(number, options) {
7167
7167
  return applyFixedWidth(result, options.fixedWidth);
7168
7168
  }
7169
7169
  //#endregion
7170
- //#region ../../node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.mjs
7171
- /*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */
7170
+ //#region ../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs
7171
+ /*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
7172
7172
  function _OverloadYield(e, d) {
7173
7173
  this.v = e, this.k = d;
7174
7174
  }
@@ -7292,9 +7292,12 @@ Array.prototype.indexOf;
7292
7292
  var arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
7293
7293
  var arrayPop = unapply(Array.prototype.pop);
7294
7294
  var arrayPush = unapply(Array.prototype.push);
7295
- Array.prototype.slice;
7295
+ var arraySlice = unapply(Array.prototype.slice);
7296
7296
  var arraySplice = unapply(Array.prototype.splice);
7297
7297
  var arrayIsArray = Array.isArray;
7298
+ var setCreate = unconstruct(Set);
7299
+ var setAdd = unapply(Set.prototype.add);
7300
+ var setHas = unapply(Set.prototype.has);
7298
7301
  var stringToLowerCase = unapply(String.prototype.toLowerCase);
7299
7302
  var stringToString = unapply(String.prototype.toString);
7300
7303
  var stringMatch = unapply(String.prototype.match);
@@ -7437,6 +7440,25 @@ function lookupGetter(object, prop) {
7437
7440
  }
7438
7441
  return fallbackValue;
7439
7442
  }
7443
+ /**
7444
+ * Like lookupGetter, but for accessor properties only, and returns null
7445
+ * instead of a null-returning fallback when no getter exists on the chain.
7446
+ * Lets a caller fall back to a direct property read in environments that
7447
+ * lack the getter, where a fallback returning null would be indistinguishable
7448
+ * from a legitimate null value (e.g. namespaceURI of a no-namespace element).
7449
+ *
7450
+ * @param object - The object (usually a prototype) to start the lookup at.
7451
+ * @param prop - The accessor property name.
7452
+ * @returns The unapplied getter, or null if none was found.
7453
+ */
7454
+ function lookupAccessor(object, prop) {
7455
+ while (object !== null) {
7456
+ const desc = getOwnPropertyDescriptor(object, prop);
7457
+ if (desc) return desc.get ? unapply(desc.get) : null;
7458
+ object = getPrototypeOf(object);
7459
+ }
7460
+ return null;
7461
+ }
7440
7462
  function isRegex(value) {
7441
7463
  try {
7442
7464
  regExpTest(value, "");
@@ -8121,7 +8143,7 @@ var NODE_TYPE = {
8121
8143
  documentFragment: 11,
8122
8144
  notation: 12
8123
8145
  };
8124
- var LITERAL_TEXT_ELEMENT_NAMES = [
8146
+ var LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, [
8125
8147
  "style",
8126
8148
  "script",
8127
8149
  "xmp",
@@ -8130,15 +8152,7 @@ var LITERAL_TEXT_ELEMENT_NAMES = [
8130
8152
  "noframes",
8131
8153
  "plaintext",
8132
8154
  "noscript"
8133
- ];
8134
- var LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));
8135
- var LITERAL_TEXT_CLOSE = function() {
8136
- const map = {};
8137
- arrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {
8138
- map[name] = seal(new RegExp("</" + name + "(?=[\\t\\n\\f\\r />])", "i"));
8139
- });
8140
- return freeze(map);
8141
- }();
8155
+ ]));
8142
8156
  var getGlobal = function getGlobal() {
8143
8157
  return typeof window === "undefined" ? null : window;
8144
8158
  };
@@ -8216,7 +8230,7 @@ var _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback)
8216
8230
  function createDOMPurify() {
8217
8231
  let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
8218
8232
  const DOMPurify = (root) => createDOMPurify(root);
8219
- DOMPurify.version = "3.4.16";
8233
+ DOMPurify.version = "3.4.17";
8220
8234
  DOMPurify.removed = [];
8221
8235
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
8222
8236
  DOMPurify.isSupported = false;
@@ -8248,6 +8262,10 @@ function createDOMPurify() {
8248
8262
  const _readNodeName = function _readNodeName(node) {
8249
8263
  return getNodeName ? getNodeName(node) : node.nodeName;
8250
8264
  };
8265
+ const getNamespaceURI = lookupAccessor(ElementPrototype, "namespaceURI");
8266
+ const _readNamespaceURI = function _readNamespaceURI(element) {
8267
+ return getNamespaceURI ? getNamespaceURI(element) : element.namespaceURI;
8268
+ };
8251
8269
  if (typeof HTMLTemplateElement === "function") {
8252
8270
  const template = document.createElement("template");
8253
8271
  if (template.content && template.content.ownerDocument) document = template.content.ownerDocument;
@@ -8368,6 +8386,7 @@ function createDOMPurify() {
8368
8386
  const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
8369
8387
  let KEEP_CONTENT = true;
8370
8388
  let IN_PLACE = false;
8389
+ let IN_PLACE_VISITED = null;
8371
8390
  let USE_PROFILES = {};
8372
8391
  let FORBID_CONTENTS = null;
8373
8392
  const DEFAULT_FORBID_CONTENTS = addToSet({}, [
@@ -8641,18 +8660,23 @@ function createDOMPurify() {
8641
8660
  * return. Return true otherwise.
8642
8661
  */
8643
8662
  const _checkValidNamespace = function _checkValidNamespace(element) {
8644
- let parent = getParentNode(element);
8645
- if (!parent || !parent.tagName) parent = {
8646
- namespaceURI: NAMESPACE,
8647
- tagName: "template"
8648
- };
8649
- const tagName = stringToLowerCase(element.tagName);
8650
- const parentTagName = stringToLowerCase(parent.tagName);
8651
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;
8652
- if (element.namespaceURI === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
8653
- if (element.namespaceURI === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
8654
- if (element.namespaceURI === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
8655
- if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;
8663
+ const elementNamespace = _readNamespaceURI(element);
8664
+ const tagName = stringToLowerCase(_readNodeName(element));
8665
+ const parentNode = getParentNode(element);
8666
+ let parent;
8667
+ let parentTagName;
8668
+ if (parentNode && _readNodeType(parentNode) === NODE_TYPE.element) {
8669
+ parent = { namespaceURI: _readNamespaceURI(parentNode) };
8670
+ parentTagName = stringToLowerCase(_readNodeName(parentNode));
8671
+ } else {
8672
+ parent = { namespaceURI: NAMESPACE };
8673
+ parentTagName = "template";
8674
+ }
8675
+ if (!ALLOWED_NAMESPACES[elementNamespace]) return false;
8676
+ if (elementNamespace === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
8677
+ if (elementNamespace === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
8678
+ if (elementNamespace === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
8679
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[elementNamespace]) return true;
8656
8680
  return false;
8657
8681
  };
8658
8682
  /**
@@ -8696,36 +8720,21 @@ function createDOMPurify() {
8696
8720
  }
8697
8721
  };
8698
8722
  /**
8699
- * _neutralizeRoot
8700
- *
8701
- * Fail-closed teardown of an in-place root after the sanitize walk aborts
8702
- * (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered
8703
- * custom element's reaction detaches a node so `_forceRemove`'s deliberate
8704
- * parentless guard throws, or any other re-entrant engine mutation — would
8705
- * otherwise leave the caller's *live* tree half-sanitized, with everything
8706
- * after the abort point still carrying its handlers. There is no safe way
8707
- * to resume the walk (the tree mutated under us), so we strip the root bare:
8708
- * remove every child and every attribute, then let the caller's catch see
8709
- * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`
8710
- * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).
8723
+ * Fail-closed teardown of an in-place root: strip every disallowed attribute
8724
+ * in the subtree first, so nothing armed is left behind, then remove all
8725
+ * children and the root's own attributes.
8711
8726
  *
8712
8727
  * @param root the in-place root to empty
8713
8728
  */
8714
8729
  const _neutralizeRoot = function _neutralizeRoot(root) {
8715
8730
  _neutralizeSubtree(root);
8716
8731
  const childNodes = getChildNodes(root);
8717
- if (childNodes) {
8718
- const snapshot = [];
8719
- arrayForEach(childNodes, (child) => {
8720
- arrayPush(snapshot, child);
8721
- });
8722
- arrayForEach(snapshot, (child) => {
8723
- try {
8724
- remove(child);
8725
- } catch (_) {}
8726
- });
8727
- }
8728
- const attributes = getAttributes(root);
8732
+ if (childNodes) arrayForEach(arraySlice(childNodes), (child) => {
8733
+ try {
8734
+ remove(child);
8735
+ } catch (_) {}
8736
+ });
8737
+ const attributes = _readNodeType(root) === NODE_TYPE.element ? getAttributes(root) : null;
8729
8738
  if (attributes) for (let i = attributes.length - 1; i >= 0; --i) {
8730
8739
  const attribute = attributes[i];
8731
8740
  const name = attribute && attribute.name;
@@ -8733,18 +8742,9 @@ function createDOMPurify() {
8733
8742
  }
8734
8743
  };
8735
8744
  /**
8736
- * _removeAttribute
8737
- *
8738
- * Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their
8739
- * lookup key for HTML elements in an HTML document, so they silently miss an
8740
- * attribute whose stored qualified name still contains uppercase ASCII
8741
- * letters. That happens when the node came from a case-preserving source
8742
- * (an XML/XHTML document imported via importNode(), or createAttributeNS()),
8743
- * where e.g. `ONERROR` survives the walk: the policy check lowercases to
8744
- * `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up
8745
- * `onerror` and finds nothing. Remove the exact Attr node instead, which is
8746
- * case- and namespace-exact, and fall back to name-based removal only when
8747
- * the caller could not supply the node.
8745
+ * Removes an attribute, preferably as its exact Attr node: name-based
8746
+ * removal lowercases the name in HTML documents and misses case-preserved
8747
+ * names, e.g. from imported XHTML.
8748
8748
  *
8749
8749
  * @param name an Attribute name
8750
8750
  * @param element a DOM node
@@ -8776,12 +8776,8 @@ function createDOMPurify() {
8776
8776
  } catch (_) {}
8777
8777
  };
8778
8778
  /**
8779
- * _stripDisallowedAttributes
8780
- *
8781
- * Removes every attribute the active configuration does not allow from a
8782
- * single element, using the same allowlist as the main attribute pass (so
8783
- * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to
8784
- * neutralise nodes that are being discarded from an in-place tree.
8779
+ * Removes every attribute the configuration does not allow. Used to
8780
+ * neutralize nodes discarded from an in-place tree.
8785
8781
  *
8786
8782
  * @param element the element to strip
8787
8783
  */
@@ -8796,77 +8792,158 @@ function createDOMPurify() {
8796
8792
  }
8797
8793
  };
8798
8794
  /**
8799
- * _neutralizeSubtree
8795
+ * Iterative depth-first walk, so deep trees cannot overflow the call stack,
8796
+ * reading through the cached getters, so clobbering cannot hide children.
8797
+ * When `visit` returns false, the node's children are skipped. With
8798
+ * `intoShadow`, open shadow roots are walked after their host's children.
8800
8799
  *
8801
- * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT
8802
- * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,
8803
- * namespace, comment, processing-instruction and KEEP_CONTENT:false removals
8804
- * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path
8805
- * those dropped nodes are detached from the caller's LIVE tree but a
8806
- * handler-bearing original among them (an `<img onerror>`/`<video>` that was
8807
- * loading) keeps its queued resource event, which fires in page scope after
8808
- * sanitize returns. This walks a removed subtree and strips every attribute
8809
- * the active configuration does not allow — so `on*` handlers are cancelled
8810
- * through the SAME allowlist that governs kept nodes, not a separate `/^on/`
8811
- * blocklist. Run synchronously before sanitize returns, i.e. before any
8812
- * queued event can fire. Hook-free by design: these nodes leave the output,
8813
- * so firing attribute hooks for them would be surprising. Clobber-safe reads;
8814
- * a doomed clobbered node may shadow `removeAttribute` (its own attributes are
8815
- * irrelevant — it is discarded — while its non-clobbered descendants, e.g.
8816
- * the `<img>`, are reached and scrubbed).
8817
- *
8818
- * @param root the root of a removed subtree to neutralise
8800
+ * @param root where to start
8801
+ * @param visit called for every node
8802
+ * @param intoShadow whether to enter open shadow roots
8819
8803
  */
8820
- const _neutralizeSubtree = function _neutralizeSubtree(root) {
8804
+ const _walkTree = function _walkTree(root, visit) {
8805
+ let intoShadow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
8821
8806
  const stack = [root];
8822
8807
  while (stack.length > 0) {
8823
8808
  const node = stack.pop();
8824
- if (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);
8809
+ if (visit(node) === false) continue;
8810
+ if (intoShadow && _readNodeType(node) === NODE_TYPE.element) {
8811
+ const shadowRoot = getShadowRoot(node);
8812
+ if (_isDocumentFragment(shadowRoot)) stack.push(shadowRoot);
8813
+ }
8825
8814
  const childNodes = getChildNodes(node);
8826
8815
  if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
8827
8816
  }
8828
8817
  };
8829
8818
  /**
8830
- * _neutralizePatchLinkage
8819
+ * Strips disallowed attributes from every element of a discarded subtree,
8820
+ * so a handler that is already queued (a loading image) cannot fire.
8831
8821
  *
8832
- * IN_PLACE entry pre-pass (declarative-partial-updates / streaming
8833
- * hardening, https://github.com/WICG/declarative-partial-updates).
8822
+ * @param root the root of a removed subtree
8823
+ */
8824
+ const _neutralizeSubtree = function _neutralizeSubtree(root) {
8825
+ _walkTree(root, (node) => {
8826
+ if (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);
8827
+ });
8828
+ };
8829
+ /**
8830
+ * All nodes under `root`, root first, including open shadow roots. Template
8831
+ * content is not entered, it is inert.
8832
+ *
8833
+ * @param root the in-place root
8834
+ * @return the nodes
8835
+ */
8836
+ const _collectLiveNodes = function _collectLiveNodes(root) {
8837
+ const nodes = [];
8838
+ _walkTree(root, (node) => {
8839
+ nodes.push(node);
8840
+ }, true);
8841
+ return nodes;
8842
+ };
8843
+ /**
8844
+ * Strips disallowed attributes from every element that was under the
8845
+ * in-place root when the call started and no longer is, whatever removed
8846
+ * or moved it.
8834
8847
  *
8835
- * The main walk strips patch linkage (`for`/`patchsrc`) and removes range
8836
- * markers (PIs / markup comments) node-by-node, in document order, AS it
8837
- * reaches each node. On a live in-place root that leaves a window: from the
8838
- * moment the root is connected until the walk arrives at a given node, that
8839
- * node's linkage is live. A patch applied on connection/stream can fire as
8840
- * a microtask during the walk and inject or teleport an unsanitized DOM
8841
- * range into a region the iterator has already passed and will not revisit,
8842
- * so the post-return "tree is sanitized" contract is violated. Sweep the
8843
- * whole tree once up front and sever every linkage before the walk begins,
8844
- * closing that window.
8848
+ * @param root the in-place root
8849
+ * @param before the root's nodes, collected before the walk
8850
+ */
8851
+ const _neutralizeEscapedElements = function _neutralizeEscapedElements(root, before) {
8852
+ const reachable = setCreate();
8853
+ arrayForEach(_collectLiveNodes(root), (node) => {
8854
+ if (_readNodeType(node) === NODE_TYPE.element) setAdd(reachable, node);
8855
+ });
8856
+ arrayForEach(before, (node) => {
8857
+ if (_readNodeType(node) === NODE_TYPE.element && !setHas(reachable, node)) _stripDisallowedAttributes(node);
8858
+ });
8859
+ };
8860
+ /**
8861
+ * Neutralizes everything that left the in-place tree during the call: what
8862
+ * DOMPurify removed, and what hooks or custom elements removed or moved out.
8845
8863
  *
8846
- * This CANNOT undo a patch that already fired before sanitize ran — that is
8847
- * the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
8848
- * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
8849
- * to group with the rest of the declarative-partial-updates handling and
8850
- * stay overridable, consistent with the codebase.
8864
+ * @param root the in-place root
8865
+ * @param before the root's nodes, collected before the walk
8866
+ * @return true if the root itself was removed
8867
+ */
8868
+ const _neutralizeDiscarded = function _neutralizeDiscarded(root, before) {
8869
+ let rootRemoved = false;
8870
+ arrayForEach(DOMPurify.removed, (entry) => {
8871
+ if (entry.element) {
8872
+ rootRemoved = rootRemoved || entry.element === root;
8873
+ _neutralizeSubtree(entry.element);
8874
+ }
8875
+ });
8876
+ _neutralizeEscapedElements(root, before);
8877
+ return rootRemoved;
8878
+ };
8879
+ const MAX_UNVISITED_ROUNDS = 8;
8880
+ /**
8881
+ * The walk only moves forward, so a node moved to a position it already
8882
+ * passed is never visited. Give every original node that is still in the
8883
+ * tree but unvisited the normal treatment, hooks included. Nodes created
8884
+ * during the call are left alone. Fails closed if the tree keeps changing.
8851
8885
  *
8852
- * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
8853
- * clobbered root cannot defeat the sweep of its non-clobbered descendants.
8886
+ * @param root the in-place root
8887
+ * @param before the root's nodes, collected before the walk
8888
+ */
8889
+ const _sanitizeUnvisitedNodes = function _sanitizeUnvisitedNodes(root, before) {
8890
+ const visited = IN_PLACE_VISITED;
8891
+ let original = null;
8892
+ const getOriginal = () => {
8893
+ if (!original) {
8894
+ original = setCreate();
8895
+ arrayForEach(before, (beforeNode) => {
8896
+ setAdd(original, beforeNode);
8897
+ });
8898
+ }
8899
+ return original;
8900
+ };
8901
+ for (let round = 0;; round++) {
8902
+ const live = _collectLiveNodes(root);
8903
+ const containers = [root];
8904
+ let pending = false;
8905
+ arrayForEach(live, (node) => {
8906
+ if (_readNodeType(node) === NODE_TYPE.documentFragment) arrayPush(containers, node);
8907
+ else if (!pending && !setHas(visited, node)) pending = setHas(getOriginal(), node);
8908
+ });
8909
+ if (!pending) return;
8910
+ if (round >= MAX_UNVISITED_ROUNDS) throw typeErrorCreate("the tree kept changing during in-place sanitization; refusing to return it");
8911
+ arrayForEach(containers, (container, index) => {
8912
+ _sanitizeUnvisitedIn(container, index > 0, root, getOriginal());
8913
+ });
8914
+ }
8915
+ };
8916
+ /**
8917
+ * One _sanitizeUnvisitedNodes pass over the root or an open shadow root.
8854
8918
  *
8855
- * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
8856
- * .html Q1): this mirrors the existing policy of keeping `for` on
8857
- * <label>/<output>. If the shipping feature can drive a patch through a
8858
- * surviving `for`-on-label/output + `id` pair, this pre-pass and the
8859
- * attribute check at _isBasicCustomElement's caller must additionally drop
8860
- * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
8919
+ * @param container the root or an open shadow root
8920
+ * @param inShadow whether container is a shadow root
8921
+ * @param root the in-place root
8922
+ * @param original the root's nodes collected before the walk, as a set
8923
+ */
8924
+ const _sanitizeUnvisitedIn = function _sanitizeUnvisitedIn(container, inShadow, root, original) {
8925
+ const iterator = _createNodeIterator(container);
8926
+ let node;
8927
+ while (node = iterator.nextNode()) {
8928
+ if (!setHas(original, node) || setHas(IN_PLACE_VISITED, node)) continue;
8929
+ if (inShadow) _executeHooks(hooks.uponSanitizeShadowNode, node, null);
8930
+ _sanitizeElements(node, root);
8931
+ _sanitizeAttributes(node, root);
8932
+ if (_isDocumentFragment(node.content)) _sanitizeShadowDOM2(node.content);
8933
+ }
8934
+ };
8935
+ /**
8936
+ * Records that _sanitizeElements processed `node`. No-op outside IN_PLACE.
8861
8937
  *
8862
- * @param root the in-place root to sweep
8938
+ * @param node the node being processed
8863
8939
  */
8940
+ const _markVisited = function _markVisited(node) {
8941
+ if (IN_PLACE_VISITED) setAdd(IN_PLACE_VISITED, node);
8942
+ };
8864
8943
  /**
8865
- * Central policy for declarative-partial-updates patch-linkage attributes,
8866
- * shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so
8867
- * the two sites cannot drift: `patchsrc` always links, `for` links
8868
- * everywhere except on <label>/<output>, and the whole policy is gated on
8869
- * SAFE_FOR_XML (see the rationale block in _isValidAttribute).
8944
+ * Patch-linkage attributes (declarative partial updates): `patchsrc`
8945
+ * always, `for` everywhere except on <label> and <output>. Gated on
8946
+ * SAFE_FOR_XML. Shared by the IN_PLACE pre-pass and _isValidAttribute.
8870
8947
  *
8871
8948
  * @param lcName the transformCaseFunc'd attribute name
8872
8949
  * @param lcTag the transformCaseFunc'd tag name of the carrying element
@@ -8877,17 +8954,26 @@ function createDOMPurify() {
8877
8954
  if (lcName === "patchsrc") return true;
8878
8955
  return lcName === "for" && lcTag !== "label" && lcTag !== "output";
8879
8956
  };
8957
+ /**
8958
+ * IN_PLACE pre-pass: sever all patch linkage before the walk, so no patch
8959
+ * can fire mid-walk into a part of the tree the walker already passed.
8960
+ * Removes range markers (processing instructions, comments with markup)
8961
+ * and strips linkage attributes. It cannot undo a patch that already fired.
8962
+ *
8963
+ * TODO: if the shipped feature can patch through `for` on <label>/<output>,
8964
+ * drop that pair here too (see test/declarative-patch-probe.html).
8965
+ *
8966
+ * @param root the in-place root to sweep
8967
+ */
8880
8968
  const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
8881
8969
  if (!SAFE_FOR_XML) return;
8882
- const stack = [root];
8883
- while (stack.length > 0) {
8884
- const node = stack.pop();
8970
+ _walkTree(root, (node) => {
8885
8971
  const nodeType = _readNodeType(node);
8886
8972
  if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
8887
8973
  try {
8888
8974
  remove(node);
8889
8975
  } catch (_) {}
8890
- continue;
8976
+ return false;
8891
8977
  }
8892
8978
  if (nodeType === NODE_TYPE.element) {
8893
8979
  const element = node;
@@ -8897,9 +8983,8 @@ function createDOMPurify() {
8897
8983
  if (element.hasAttribute && element.hasAttribute("for") && _isPatchLinkageAttribute("for", lcTag)) element.removeAttribute("for");
8898
8984
  } catch (_) {}
8899
8985
  }
8900
- const childNodes = getChildNodes(node);
8901
- if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
8902
- }
8986
+ return true;
8987
+ });
8903
8988
  };
8904
8989
  /**
8905
8990
  * _initDocument
@@ -8976,6 +9061,27 @@ function createDOMPurify() {
8976
9061
  */
8977
9062
  const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
8978
9063
  var _node$querySelectorAl;
9064
+ _scrubOwnCharacterData(node);
9065
+ const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
9066
+ if (templates) arrayForEach(templates, (tmpl) => {
9067
+ if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
9068
+ });
9069
+ };
9070
+ /**
9071
+ * _scrubOwnCharacterData
9072
+ *
9073
+ * Non-recursive core of _scrubTemplateExpressions: normalize `node` and
9074
+ * strip template expressions from its own character data only. Does not
9075
+ * enter <template>.content or attached shadow roots (NodeIterator never
9076
+ * does). Used by _sanitizeShadowDOM, where every nested template content
9077
+ * and shadow root is already walked - and therefore scrubbed - by its own
9078
+ * recursive _sanitizeShadowDOM call; recursing here as well would rescrub
9079
+ * each nested fragment once per ancestor, which is quadratic in nesting
9080
+ * depth.
9081
+ *
9082
+ * @param node The root whose own character data should be scrubbed.
9083
+ */
9084
+ const _scrubOwnCharacterData = function _scrubOwnCharacterData(node) {
8979
9085
  node.normalize();
8980
9086
  const doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;
8981
9087
  const walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
@@ -8984,10 +9090,6 @@ function createDOMPurify() {
8984
9090
  currentNode.data = _stripTemplateExpressions(currentNode.data);
8985
9091
  currentNode = walker.nextNode();
8986
9092
  }
8987
- const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
8988
- if (templates) arrayForEach(templates, (tmpl) => {
8989
- if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
8990
- });
8991
9093
  };
8992
9094
  /**
8993
9095
  * _isClobbered
@@ -9063,7 +9165,7 @@ function createDOMPurify() {
9063
9165
  */
9064
9166
  const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
9065
9167
  if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;
9066
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) return true;
9168
+ if (SAFE_FOR_XML && LITERAL_TEXT_ELEMENTS[tagName] && _readNodeType(currentNode) === NODE_TYPE.element && _readNamespaceURI(currentNode) === HTML_NAMESPACE && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent))) return true;
9067
9169
  if (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;
9068
9170
  if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;
9069
9171
  return false;
@@ -9107,7 +9209,7 @@ function createDOMPurify() {
9107
9209
  */
9108
9210
  const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {
9109
9211
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
9110
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
9212
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && !FORBID_CONTENTS[stringToLowerCase(tagName)]) {
9111
9213
  const parentNode = getParentNode(currentNode);
9112
9214
  const childNodes = getChildNodes(currentNode);
9113
9215
  if (childNodes && parentNode) {
@@ -9140,35 +9242,13 @@ function createDOMPurify() {
9140
9242
  return set === defaultSet || set === setConfigSet ? clone(set) : set;
9141
9243
  };
9142
9244
  /**
9143
- * Shared guard for a node that a hook has detached from the walk tree,
9144
- * used after each element-hook site in _sanitizeElements. Detaching is a
9145
- * long-standing user pattern (issue #469; draw.io-style foreignObject
9146
- * filtering). Per the cached, unclobberable parentNode getter the node is
9147
- * genuinely out of the tree, so it can reach neither the serialized
9148
- * output nor an IN_PLACE live tree; treat it as removed and stop
9149
- * processing it. Without this guard, the unsafe-node / namespace checks
9150
- * would call _forceRemove on a parentless node and hit the REPORT-3
9151
- * fail-closed throw — which exists for nodes DOMPurify wants gone but
9152
- * *cannot* detach (clobbered / parentless roots), the opposite of a node
9153
- * that is already safely gone. The walk root is exempt: a detached
9154
- * IN_PLACE root is legitimate input and must still be fully sanitized,
9155
- * and a kill-decision on it must keep hitting the REPORT-3 throw.
9156
- *
9157
- * Nodes detached by hooks stay the hook's responsibility for placement:
9158
- * they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE
9159
- * pass (which iterates DOMPurify.removed) does not reach them. But a
9160
- * hook-detached subtree can still hold a queued resource-event handler -
9161
- * e.g. an <img onload> that began loading when the caller built the live
9162
- * tree - which fires in page scope after sanitize returns even though the
9163
- * handler never reached the returned tree. That is the audit-5 F1 hazard,
9164
- * and the documented node.remove() hook pattern walks straight into it.
9165
- * So on the IN_PLACE path we neutralize the detached subtree inline,
9166
- * stripping its non-allow-listed attributes before returning, exactly as
9167
- * the post-walk pass does for _forceRemove'd subtrees.
9245
+ * A hook may have detached the node it was called for. If so, treat it as
9246
+ * removed and stop processing it; the walk root is exempt. On the IN_PLACE
9247
+ * path the detached subtree is neutralized right away.
9168
9248
  *
9169
9249
  * @param currentNode the node a hook may have detached
9170
9250
  * @param root the current walk root
9171
- * @return true if the node is detached and now handled, false otherwise
9251
+ * @return true if the node was detached
9172
9252
  */
9173
9253
  const _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {
9174
9254
  if (currentNode === root || getParentNode(currentNode) !== null) return false;
@@ -9185,6 +9265,7 @@ function createDOMPurify() {
9185
9265
  * @return true if node was killed, false if left alive
9186
9266
  */
9187
9267
  const _sanitizeElements = function _sanitizeElements(currentNode, root) {
9268
+ _markVisited(currentNode);
9188
9269
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
9189
9270
  if (_handleHookDetachedNode(currentNode, root)) return true;
9190
9271
  if (_isClobbered(currentNode)) {
@@ -9328,6 +9409,22 @@ function createDOMPurify() {
9328
9409
  }
9329
9410
  };
9330
9411
  /**
9412
+ * _isUnsafeAttributeValue
9413
+ *
9414
+ * Value-based attribute checks that the attribute walk applies before any
9415
+ * hook can force-keep an attribute, shared with the public
9416
+ * isValidAttribute() so that it never approves a value sanitize() would
9417
+ * strip.
9418
+ *
9419
+ * @param name the attribute name as found on the node (case preserved)
9420
+ * @param value the attribute value
9421
+ * @returns true if the attribute must be removed because of its value
9422
+ */
9423
+ const _isUnsafeAttributeValue = function _isUnsafeAttributeValue(name, value) {
9424
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) return true;
9425
+ return stringToLowerCase(name) === "attributename" && stringMatch(value, "href") !== null;
9426
+ };
9427
+ /**
9331
9428
  * _sanitizeAttributes
9332
9429
  *
9333
9430
  * @protect attributes
@@ -9371,11 +9468,7 @@ function createDOMPurify() {
9371
9468
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
9372
9469
  recreatedNamedProp = true;
9373
9470
  }
9374
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
9375
- _removeAttribute(name, currentNode, attr);
9376
- continue;
9377
- }
9378
- if (lcName === "attributename" && stringMatch(value, "href")) {
9471
+ if (_isUnsafeAttributeValue(name, value)) {
9379
9472
  _removeAttribute(name, currentNode, attr);
9380
9473
  continue;
9381
9474
  }
@@ -9423,24 +9516,13 @@ function createDOMPurify() {
9423
9516
  }
9424
9517
  }
9425
9518
  }
9519
+ if (SAFE_FOR_TEMPLATES) _scrubOwnCharacterData(fragment);
9426
9520
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
9427
9521
  };
9428
9522
  /**
9429
- * _sanitizeAttachedShadowRoots
9430
- *
9431
- * Walks `root` and feeds every attached shadow root we encounter into
9432
- * the existing _sanitizeShadowDOM pipeline. The default node iterator
9433
- * does not descend into shadow trees, so nodes inside an attached
9434
- * shadow root would otherwise be skipped entirely.
9435
- *
9436
- * Two real input paths put attached shadow roots in front of us:
9437
- * 1. IN_PLACE on a DOM node that already has shadow roots attached.
9438
- * 2. DOM-node input where importNode(dirty, true) deep-clones the
9439
- * shadow root because it was created with `clonable: true`.
9440
- *
9441
- * This pass runs once, up front, so the main iteration loop (and the
9442
- * existing _sanitizeShadowDOM template-content recursion) stay
9443
- * untouched — string-input paths are not affected.
9523
+ * Sanitizes every attached shadow root under `root`, since the node
9524
+ * iterator does not enter shadow trees. Needed for IN_PLACE input and for
9525
+ * DOM input whose clonable shadow roots were copied by importNode().
9444
9526
  *
9445
9527
  * @param root the subtree root to walk for attached shadow roots
9446
9528
  */
@@ -9505,6 +9587,8 @@ function createDOMPurify() {
9505
9587
  if (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);
9506
9588
  DOMPurify.removed = [];
9507
9589
  const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
9590
+ let inPlaceNodes = [];
9591
+ const outerVisited = IN_PLACE_VISITED;
9508
9592
  if (inPlace) {
9509
9593
  _neutralizePatchLinkage(dirty);
9510
9594
  const nn = _readNodeName(dirty);
@@ -9519,12 +9603,8 @@ function createDOMPurify() {
9519
9603
  _neutralizeRoot(dirty);
9520
9604
  throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
9521
9605
  }
9522
- try {
9523
- _sanitizeAttachedShadowRoots(dirty);
9524
- } catch (error) {
9525
- _neutralizeRoot(dirty);
9526
- throw error;
9527
- }
9606
+ inPlaceNodes = _collectLiveNodes(dirty);
9607
+ IN_PLACE_VISITED = setCreate();
9528
9608
  } else if (_isNode(dirty)) {
9529
9609
  body = _initDocument("<!---->");
9530
9610
  importedNode = body.ownerDocument.importNode(dirty, true);
@@ -9540,30 +9620,25 @@ function createDOMPurify() {
9540
9620
  if (body && FORCE_BODY) _forceRemove(body.firstChild);
9541
9621
  const walkRoot = inPlace ? dirty : body;
9542
9622
  try {
9623
+ if (inPlace) _sanitizeAttachedShadowRoots(dirty);
9543
9624
  const nodeIterator = _createNodeIterator(walkRoot);
9544
9625
  while (currentNode = nodeIterator.nextNode()) {
9545
9626
  _sanitizeElements(currentNode, walkRoot);
9546
9627
  _sanitizeAttributes(currentNode, walkRoot);
9547
9628
  if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
9548
9629
  }
9630
+ if (inPlace) _sanitizeUnvisitedNodes(dirty, inPlaceNodes);
9549
9631
  } catch (error) {
9550
9632
  if (inPlace) {
9551
9633
  _neutralizeRoot(dirty);
9552
- arrayForEach(DOMPurify.removed, (entry) => {
9553
- if (entry.element) _neutralizeSubtree(entry.element);
9554
- });
9634
+ _neutralizeDiscarded(dirty, inPlaceNodes);
9555
9635
  }
9556
9636
  throw error;
9637
+ } finally {
9638
+ IN_PLACE_VISITED = outerVisited;
9557
9639
  }
9558
9640
  if (inPlace) {
9559
- let rootWasRemoved = false;
9560
- arrayForEach(DOMPurify.removed, (entry) => {
9561
- if (entry.element) {
9562
- if (entry.element === dirty) rootWasRemoved = true;
9563
- _neutralizeSubtree(entry.element);
9564
- }
9565
- });
9566
- if (rootWasRemoved) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
9641
+ if (_neutralizeDiscarded(dirty, inPlaceNodes)) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
9567
9642
  if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);
9568
9643
  return dirty;
9569
9644
  }
@@ -9600,6 +9675,7 @@ function createDOMPurify() {
9600
9675
  if (!CONFIG) _parseConfig({});
9601
9676
  const lcTag = transformCaseFunc(tag);
9602
9677
  const lcName = transformCaseFunc(attr);
9678
+ if (typeof value === "string" && (_isUnsafeAttributeValue(attr, value) || !ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value))) return false;
9603
9679
  return _isValidAttribute(lcTag, lcName, value);
9604
9680
  };
9605
9681
  DOMPurify.addHook = function(entryPoint, hookFunction) {
@@ -9993,8 +10069,8 @@ var KdsKeyboardShortcut_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
9993
10069
  }), [["__scopeId", "data-v-5a9d1e42"]]);
9994
10070
  //#endregion
9995
10071
  //#region src/components/accessories/LiveStatus/KdsLiveStatus.vue?vue&type=script&setup=true&lang.ts
9996
- var _hoisted_1$82 = ["aria-label"];
9997
- var _hoisted_2$52 = {
10072
+ var _hoisted_1$84 = ["aria-label"];
10073
+ var _hoisted_2$51 = {
9998
10074
  key: 0,
9999
10075
  class: "label"
10000
10076
  };
@@ -10024,11 +10100,11 @@ var KdsLiveStatus_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
10024
10100
  ]),
10025
10101
  role: "img",
10026
10102
  "aria-label": accessibleTitle.value
10027
- }, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "dot" }, null, -1)), __props.label ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$52, [createTextVNode(toDisplayString(__props.label), 1)])), [[
10103
+ }, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "dot" }, null, -1)), __props.label ? withDirectives((openBlock(), createElementBlock("span", _hoisted_2$51, [createTextVNode(toDisplayString(__props.label), 1)])), [[
10028
10104
  unref(vKdsTooltip),
10029
10105
  __props.label,
10030
10106
  "truncated"
10031
- ]]) : createCommentVNode("", true)], 10, _hoisted_1$82)), [[unref(vKdsTooltip), !__props.label ? accessibleTitle.value : void 0]]);
10107
+ ]]) : createCommentVNode("", true)], 10, _hoisted_1$84)), [[unref(vKdsTooltip), !__props.label ? accessibleTitle.value : void 0]]);
10032
10108
  };
10033
10109
  }
10034
10110
  }), [["__scopeId", "data-v-d5a7f94a"]]);
@@ -10049,7 +10125,7 @@ var kdsLiveStatusSize = {
10049
10125
  var kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
10050
10126
  //#endregion
10051
10127
  //#region src/components/accessories/LoadingSpinner/KdsLoadingSpinner.vue?vue&type=script&setup=true&lang.ts
10052
- var _hoisted_1$81 = ["data-style"];
10128
+ var _hoisted_1$83 = ["data-style"];
10053
10129
  //#endregion
10054
10130
  //#region src/components/accessories/LoadingSpinner/KdsLoadingSpinner.vue
10055
10131
  var KdsLoadingSpinner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -10074,7 +10150,7 @@ var KdsLoadingSpinner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
10074
10150
  cx: "60",
10075
10151
  cy: "60",
10076
10152
  r: "50"
10077
- }, null, -1)])], 10, _hoisted_1$81);
10153
+ }, null, -1)])], 10, _hoisted_1$83);
10078
10154
  };
10079
10155
  }
10080
10156
  }), [["__scopeId", "data-v-ea91036d"]]);
@@ -10102,8 +10178,8 @@ var KdsMissingValueIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
10102
10178
  }), [["__scopeId", "data-v-e6901949"]]);
10103
10179
  //#endregion
10104
10180
  //#region src/components/accessories/Text/KdsTextHighlight/KdsTextHighlight.vue?vue&type=script&setup=true&lang.ts
10105
- var _hoisted_1$80 = { class: "kds-highlighted-text" };
10106
- var _hoisted_2$51 = {
10181
+ var _hoisted_1$82 = { class: "kds-highlighted-text" };
10182
+ var _hoisted_2$50 = {
10107
10183
  key: 0,
10108
10184
  class: "kds-highlighted-text-match"
10109
10185
  };
@@ -10147,8 +10223,8 @@ var KdsTextHighlight_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
10147
10223
  return result;
10148
10224
  });
10149
10225
  return (_ctx, _cache) => {
10150
- return openBlock(), createElementBlock("span", _hoisted_1$80, [(openBlock(true), createElementBlock(Fragment, null, renderList(segments.value, (segment, index) => {
10151
- return openBlock(), createElementBlock(Fragment, { key: index }, [segment.match ? (openBlock(), createElementBlock("mark", _hoisted_2$51, toDisplayString(segment.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(segment.text), 1)], 64))], 64);
10226
+ return openBlock(), createElementBlock("span", _hoisted_1$82, [(openBlock(true), createElementBlock(Fragment, null, renderList(segments.value, (segment, index) => {
10227
+ return openBlock(), createElementBlock(Fragment, { key: index }, [segment.match ? (openBlock(), createElementBlock("mark", _hoisted_2$50, toDisplayString(segment.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(segment.text), 1)], 64))], 64);
10152
10228
  }), 128))]);
10153
10229
  };
10154
10230
  }
@@ -10156,9 +10232,9 @@ var KdsTextHighlight_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
10156
10232
  //#endregion
10157
10233
  //#region src/components/accessories/Divider/KdsDivider.vue
10158
10234
  var _sfc_main = {};
10159
- var _hoisted_1$79 = { class: "kds-divider" };
10235
+ var _hoisted_1$81 = { class: "kds-divider" };
10160
10236
  function _sfc_render$1(_ctx, _cache) {
10161
- return openBlock(), createElementBlock("hr", _hoisted_1$79);
10237
+ return openBlock(), createElementBlock("hr", _hoisted_1$81);
10162
10238
  }
10163
10239
  var KdsDivider_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render$1], ["__scopeId", "data-v-dead6417"]]);
10164
10240
  //#endregion
@@ -10180,7 +10256,7 @@ var kdsAccessorySize = {
10180
10256
  var kdsAccessorySizes = Object.values(kdsAccessorySize);
10181
10257
  //#endregion
10182
10258
  //#region src/components/buttons/BaseButton.vue?vue&type=script&setup=true&lang.ts
10183
- var _hoisted_1$78 = {
10259
+ var _hoisted_1$80 = {
10184
10260
  key: 0,
10185
10261
  class: "label"
10186
10262
  };
@@ -10266,7 +10342,7 @@ var BaseButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
10266
10342
  name: props.leadingIcon,
10267
10343
  size: iconSize.value
10268
10344
  }, null, 8, ["name", "size"])) : createCommentVNode("", true)], true),
10269
- props.label ? (openBlock(), createElementBlock("span", _hoisted_1$78, toDisplayString(props.label), 1)) : createCommentVNode("", true),
10345
+ props.label ? (openBlock(), createElementBlock("span", _hoisted_1$80, toDisplayString(props.label), 1)) : createCommentVNode("", true),
10270
10346
  props.label ? renderSlot(_ctx.$slots, "trailing", {}, () => [props.trailingIcon ? (openBlock(), createBlock(KdsIcon_default, {
10271
10347
  key: 0,
10272
10348
  name: props.trailingIcon,
@@ -10449,8 +10525,8 @@ var kdsModalLayoutPropsDefault = {
10449
10525
  kdsModalHeight.AUTO, kdsModalWidth.MEDIUM, kdsModalClosedBy.CLOSEREQUEST, { ...kdsModalLayoutPropsDefault };
10450
10526
  //#endregion
10451
10527
  //#region src/layouts/overlays/Modal/KdsModalLayout.vue?vue&type=script&setup=true&lang.ts
10452
- var _hoisted_1$77 = { class: "modal-header" };
10453
- var _hoisted_2$50 = { class: "modal-header-headline" };
10528
+ var _hoisted_1$79 = { class: "modal-header" };
10529
+ var _hoisted_2$49 = { class: "modal-header-headline" };
10454
10530
  var _hoisted_3$37 = ["data-variant"];
10455
10531
  var _hoisted_4$32 = {
10456
10532
  key: 0,
@@ -10477,13 +10553,13 @@ var KdsModalLayout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
10477
10553
  ]);
10478
10554
  return (_ctx, _cache) => {
10479
10555
  return openBlock(), createElementBlock(Fragment, null, [
10480
- createElementVNode("header", _hoisted_1$77, [
10556
+ createElementVNode("header", _hoisted_1$79, [
10481
10557
  props.leadingIcon ? (openBlock(), createBlock(KdsIcon_default, {
10482
10558
  key: 0,
10483
10559
  name: props.leadingIcon,
10484
10560
  size: "medium"
10485
10561
  }, null, 8, ["name"])) : createCommentVNode("", true),
10486
- createElementVNode("div", _hoisted_2$50, toDisplayString(__props.headline), 1),
10562
+ createElementVNode("div", _hoisted_2$49, toDisplayString(__props.headline), 1),
10487
10563
  createVNode(KdsButton_default, {
10488
10564
  "leading-icon": "x-close",
10489
10565
  variant: "transparent",
@@ -10504,7 +10580,7 @@ var KdsModalLayout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
10504
10580
  }), [["__scopeId", "data-v-3e1612e8"]]);
10505
10581
  //#endregion
10506
10582
  //#region src/layouts/overlays/Modal/KdsModal.vue?vue&type=script&setup=true&lang.ts
10507
- var _hoisted_1$76 = ["closedby"];
10583
+ var _hoisted_1$78 = ["closedby"];
10508
10584
  //#endregion
10509
10585
  //#region src/layouts/overlays/Modal/KdsModal.vue
10510
10586
  var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -10589,14 +10665,14 @@ var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
10589
10665
  "leading-icon",
10590
10666
  "variant",
10591
10667
  "overflow"
10592
- ])], true)], 42, _hoisted_1$76)) : createCommentVNode("", true);
10668
+ ])], true)], 42, _hoisted_1$78)) : createCommentVNode("", true);
10593
10669
  };
10594
10670
  }
10595
10671
  }), [["__scopeId", "data-v-9c8c5863"]]);
10596
10672
  //#endregion
10597
10673
  //#region src/components/forms/_helper/KdsSubText.vue?vue&type=script&setup=true&lang.ts
10598
- var _hoisted_1$75 = ["id"];
10599
- var _hoisted_2$49 = { class: "subtext-text" };
10674
+ var _hoisted_1$77 = ["id"];
10675
+ var _hoisted_2$48 = { class: "subtext-text" };
10600
10676
  //#endregion
10601
10677
  //#region src/components/forms/_helper/KdsSubText.vue
10602
10678
  var KdsSubText_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -10652,20 +10728,20 @@ var KdsSubText_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
10652
10728
  size: "small",
10653
10729
  variant: "onSurface",
10654
10730
  "aria-hidden": "true"
10655
- })) : createCommentVNode("", true), createElementVNode("span", _hoisted_2$49, toDisplayString(props.subText), 1)], 10, _hoisted_1$75)) : createCommentVNode("", true);
10731
+ })) : createCommentVNode("", true), createElementVNode("span", _hoisted_2$48, toDisplayString(props.subText), 1)], 10, _hoisted_1$77)) : createCommentVNode("", true);
10656
10732
  };
10657
10733
  }
10658
10734
  }), [["__scopeId", "data-v-1bd6d710"]]);
10659
10735
  //#endregion
10660
10736
  //#region src/components/forms/Checkbox/BaseCheckbox.vue?vue&type=script&setup=true&lang.ts
10661
- var _hoisted_1$74 = [
10737
+ var _hoisted_1$76 = [
10662
10738
  "disabled",
10663
10739
  "aria-label",
10664
10740
  "aria-checked",
10665
10741
  "aria-describedby",
10666
10742
  "aria-invalid"
10667
10743
  ];
10668
- var _hoisted_2$48 = { class: "control" };
10744
+ var _hoisted_2$47 = { class: "control" };
10669
10745
  var _hoisted_3$36 = {
10670
10746
  key: 0,
10671
10747
  class: "content"
@@ -10742,7 +10818,7 @@ var BaseCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
10742
10818
  type: "button",
10743
10819
  role: "checkbox",
10744
10820
  onClick: handleClick
10745
- }, [createElementVNode("div", _hoisted_2$48, [icon.value ? (openBlock(), createBlock(KdsIcon_default, {
10821
+ }, [createElementVNode("div", _hoisted_2$47, [icon.value ? (openBlock(), createBlock(KdsIcon_default, {
10746
10822
  key: 0,
10747
10823
  name: icon.value,
10748
10824
  class: "icon",
@@ -10751,7 +10827,7 @@ var BaseCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
10751
10827
  key: 0,
10752
10828
  id: unref(helperId),
10753
10829
  class: "helper-text"
10754
- }, toDisplayString(props.helperText), 9, _hoisted_5$17)) : createCommentVNode("", true)])) : createCommentVNode("", true)], 10, _hoisted_1$74)), [[unref(vKdsTooltip), props.tooltip]]), props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$11, [createVNode(KdsSubText_default, {
10830
+ }, toDisplayString(props.helperText), 9, _hoisted_5$17)) : createCommentVNode("", true)])) : createCommentVNode("", true)], 10, _hoisted_1$76)), [[unref(vKdsTooltip), props.tooltip]]), props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$11, [createVNode(KdsSubText_default, {
10755
10831
  id: unref(descriptionId),
10756
10832
  "sub-text": props.subText,
10757
10833
  "preserve-sub-text-space": props.preserveSubTextSpace,
@@ -10904,11 +10980,11 @@ var useKdsDynamicModal = () => {
10904
10980
  };
10905
10981
  //#endregion
10906
10982
  //#region src/layouts/overlays/Modal/KdsDynamicModalProvider.vue?vue&type=script&setup=true&lang.ts
10907
- var _hoisted_1$73 = {
10983
+ var _hoisted_1$75 = {
10908
10984
  key: 1,
10909
10985
  class: "confirmation"
10910
10986
  };
10911
- var _hoisted_2$47 = { class: "message" };
10987
+ var _hoisted_2$46 = { class: "message" };
10912
10988
  var _hoisted_3$35 = {
10913
10989
  key: 0,
10914
10990
  class: "ask-again"
@@ -10960,7 +11036,7 @@ var KdsDynamicModalProvider_default = /*#__PURE__*/ _plugin_vue_export_helper_de
10960
11036
  return openBlock(), createBlock(KdsModal_default, mergeProps({ class: "confirm-modal" }, kdsModalProps.value), createSlots({ _: 2 }, [
10961
11037
  unref(config)?.type === "confirm" ? {
10962
11038
  name: "body",
10963
- fn: withCtx(() => [unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$73, [createElementVNode("div", _hoisted_2$47, toDisplayString(unref(config).value.message), 1), unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3$35, [createVNode(KdsCheckbox_default, {
11039
+ fn: withCtx(() => [unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$75, [createElementVNode("div", _hoisted_2$46, toDisplayString(unref(config).value.message), 1), unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3$35, [createVNode(KdsCheckbox_default, {
10964
11040
  modelValue: askAgain.value,
10965
11041
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
10966
11042
  label: unref(config).value.doNotAskAgain.label,
@@ -11011,7 +11087,7 @@ var KdsDynamicModalProvider_default = /*#__PURE__*/ _plugin_vue_export_helper_de
11011
11087
  }), [["__scopeId", "data-v-9937b6b2"]]);
11012
11088
  //#endregion
11013
11089
  //#region src/layouts/overlays/SideDrawer/KdsSideDrawer.vue?vue&type=script&setup=true&lang.ts
11014
- var _hoisted_1$72 = ["data-width"];
11090
+ var _hoisted_1$74 = ["data-width"];
11015
11091
  //#endregion
11016
11092
  //#region src/layouts/overlays/SideDrawer/KdsSideDrawer.vue
11017
11093
  var KdsSideDrawer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -11037,14 +11113,14 @@ var KdsSideDrawer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
11037
11113
  popover: "manual",
11038
11114
  class: "kds-side-drawer",
11039
11115
  "data-width": __props.width
11040
- }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 8, _hoisted_1$72);
11116
+ }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 8, _hoisted_1$74);
11041
11117
  };
11042
11118
  }
11043
11119
  }), [["__scopeId", "data-v-2bceb215"]]);
11044
11120
  //#endregion
11045
11121
  //#region src/components/buttons/links/KdsLink/KdsLink.vue?vue&type=script&setup=true&lang.ts
11046
- var _hoisted_1$71 = { class: "label" };
11047
- var _hoisted_2$46 = {
11122
+ var _hoisted_1$73 = { class: "label" };
11123
+ var _hoisted_2$45 = {
11048
11124
  key: 0,
11049
11125
  class: "file-size"
11050
11126
  };
@@ -11128,7 +11204,7 @@ var KdsLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
11128
11204
  "aria-disabled": __props.disabled ? "true" : void 0,
11129
11205
  onClick
11130
11206
  }, {
11131
- default: withCtx(() => [createElementVNode("span", _hoisted_1$71, toDisplayString(__props.label), 1), normalizedFileSize.value ? (openBlock(), createElementBlock("span", _hoisted_2$46, toDisplayString(normalizedFileSize.value), 1)) : createCommentVNode("", true)]),
11207
+ default: withCtx(() => [createElementVNode("span", _hoisted_1$73, toDisplayString(__props.label), 1), normalizedFileSize.value ? (openBlock(), createElementBlock("span", _hoisted_2$45, toDisplayString(normalizedFileSize.value), 1)) : createCommentVNode("", true)]),
11132
11208
  _: 1
11133
11209
  }, 8, [
11134
11210
  "class",
@@ -11197,8 +11273,8 @@ var kdsToggleButtonVariant = {
11197
11273
  var kdsToggleButtonVariants = Object.values(kdsToggleButtonVariant);
11198
11274
  //#endregion
11199
11275
  //#region src/components/buttons/KdsProgressButton/KdsProgressButton.vue?vue&type=script&setup=true&lang.ts
11200
- var _hoisted_1$70 = ["data-visible"];
11201
- var _hoisted_2$45 = ["data-visible"];
11276
+ var _hoisted_1$72 = ["data-visible"];
11277
+ var _hoisted_2$44 = ["data-visible"];
11202
11278
  //#endregion
11203
11279
  //#region src/components/buttons/KdsProgressButton/KdsProgressButton.vue
11204
11280
  var KdsProgressButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -11258,13 +11334,13 @@ var KdsProgressButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
11258
11334
  }, [createVNode(KdsIcon_default, {
11259
11335
  name: props.leadingIcon,
11260
11336
  size: iconSize.value
11261
- }, null, 8, ["name", "size"])], 8, _hoisted_1$70), createElementVNode("span", {
11337
+ }, null, 8, ["name", "size"])], 8, _hoisted_1$72), createElementVNode("span", {
11262
11338
  class: "spinner",
11263
11339
  "data-visible": state.value === "progress"
11264
11340
  }, [createVNode(KdsLoadingSpinner_default, {
11265
11341
  size: iconSize.value,
11266
11342
  variant: __props.variant === "filled" ? "onPrimary" : "onSurface"
11267
- }, null, 8, ["size", "variant"])], 8, _hoisted_2$45)], 2)]),
11343
+ }, null, 8, ["size", "variant"])], 8, _hoisted_2$44)], 2)]),
11268
11344
  _: 1
11269
11345
  }, 16, ["data-kds-progress-state"]);
11270
11346
  };
@@ -11413,13 +11489,13 @@ var _Accessory_default = /* @__PURE__ */ defineComponent({
11413
11489
  });
11414
11490
  //#endregion
11415
11491
  //#region src/components/lists/ListContainer/ListItem/ListItem/KdsListItem.vue?vue&type=script&setup=true&lang.ts
11416
- var _hoisted_1$69 = [
11492
+ var _hoisted_1$71 = [
11417
11493
  "id",
11418
11494
  "role",
11419
11495
  "aria-selected",
11420
11496
  "aria-disabled"
11421
11497
  ];
11422
- var _hoisted_2$44 = {
11498
+ var _hoisted_2$43 = {
11423
11499
  key: 0,
11424
11500
  class: "accessory"
11425
11501
  };
@@ -11532,7 +11608,7 @@ var KdsListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
11532
11608
  ]),
11533
11609
  onClick
11534
11610
  }, [
11535
- props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$44, [createVNode(_Accessory_default, {
11611
+ props.accessory ? (openBlock(), createElementBlock("span", _hoisted_2$43, [createVNode(_Accessory_default, {
11536
11612
  accessory: props.accessory,
11537
11613
  size: accessorySize.value,
11538
11614
  disabled: __props.disabled
@@ -11582,14 +11658,14 @@ var KdsListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
11582
11658
  name: "drag-handle",
11583
11659
  size: "small"
11584
11660
  })], 32)) : createCommentVNode("", true)])
11585
- ], 10, _hoisted_1$69);
11661
+ ], 10, _hoisted_1$71);
11586
11662
  };
11587
11663
  }
11588
11664
  }), [["__scopeId", "data-v-5a3cda6b"]]);
11589
11665
  //#endregion
11590
11666
  //#region src/components/lists/ListContainer/ListItem/ListItemSectionTitle/ListItemSectionTitle.vue?vue&type=script&setup=true&lang.ts
11591
- var _hoisted_1$68 = { class: "kds-list-item-section-title" };
11592
- var _hoisted_2$43 = {
11667
+ var _hoisted_1$70 = { class: "kds-list-item-section-title" };
11668
+ var _hoisted_2$42 = {
11593
11669
  key: 0,
11594
11670
  class: "icon"
11595
11671
  };
@@ -11605,7 +11681,7 @@ var ListItemSectionTitle_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
11605
11681
  setup(__props) {
11606
11682
  const props = __props;
11607
11683
  return (_ctx, _cache) => {
11608
- return openBlock(), createElementBlock("div", _hoisted_1$68, [props.leadingIcon ? (openBlock(), createElementBlock("span", _hoisted_2$43, [createVNode(KdsIcon_default, {
11684
+ return openBlock(), createElementBlock("div", _hoisted_1$70, [props.leadingIcon ? (openBlock(), createElementBlock("span", _hoisted_2$42, [createVNode(KdsIcon_default, {
11609
11685
  name: props.leadingIcon,
11610
11686
  size: "small"
11611
11687
  }, null, 8, ["name"])])) : createCommentVNode("", true), withDirectives((openBlock(), createElementBlock("span", _hoisted_3$33, [createTextVNode(toDisplayString(props.label), 1)])), [[
@@ -11661,9 +11737,6 @@ var KdsMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
11661
11737
  });
11662
11738
  const effectiveTo = computed(() => props.item.disabled ? void 0 : props.item.to);
11663
11739
  const hasChildren = computed(() => props.item.children && props.item.children.length > 0);
11664
- const anchorId = useId();
11665
- const anchorName = `--anchor-${anchorId}`;
11666
- const anchorRootStyle = computed(() => hasChildren.value ? { anchorName } : {});
11667
11740
  return (_ctx, _cache) => {
11668
11741
  return openBlock(), createElementBlock(Fragment, null, [
11669
11742
  __props.item.sectionHeadline ? (openBlock(), createBlock(unref(ListItemSectionTitle_default), mergeProps({
@@ -11758,7 +11831,6 @@ var KdsMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
11758
11831
  active: __props.activeId === __props.item.id,
11759
11832
  variant: __props.variant,
11760
11833
  "trailing-icon": "chevron-right",
11761
- style: anchorRootStyle.value,
11762
11834
  role: "menuitem",
11763
11835
  "aria-haspopup": "menu"
11764
11836
  }, _ctx.$attrs, {
@@ -11771,8 +11843,7 @@ var KdsMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
11771
11843
  "sub-text",
11772
11844
  "disabled",
11773
11845
  "active",
11774
- "variant",
11775
- "style"
11846
+ "variant"
11776
11847
  ])),
11777
11848
  __props.item.separator && !__props.isLast ? (openBlock(), createBlock(unref(KdsDivider_default), {
11778
11849
  key: 4,
@@ -11780,26 +11851,22 @@ var KdsMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
11780
11851
  role: "presentation",
11781
11852
  "aria-hidden": "true"
11782
11853
  })) : createCommentVNode("", true),
11783
- hasChildren.value ? renderSlot(_ctx.$slots, "children", { anchor: {
11784
- id: unref(anchorId),
11785
- name: anchorName
11786
- } }, void 0, true, 5) : createCommentVNode("", true)
11854
+ hasChildren.value ? renderSlot(_ctx.$slots, "children", {}, void 0, true, 5) : createCommentVNode("", true)
11787
11855
  ], 64);
11788
11856
  };
11789
11857
  }
11790
- }), [["__scopeId", "data-v-86ff8e48"]]);
11858
+ }), [["__scopeId", "data-v-44f992ef"]]);
11791
11859
  //#endregion
11792
11860
  //#region src/components/lists/MenuContainer/keys.ts
11793
11861
  var ContainerDepthKey = Symbol("ContainerDepth");
11794
11862
  var ChildItemKey = Symbol("ChildItem");
11795
11863
  //#endregion
11796
11864
  //#region src/components/lists/MenuContainer/KdsMenuContainer.vue?vue&type=script&setup=true&lang.ts
11797
- var _hoisted_1$67 = [
11865
+ var _hoisted_1$69 = [
11798
11866
  "id",
11799
11867
  "aria-label",
11800
11868
  "aria-activedescendant"
11801
11869
  ];
11802
- var _hoisted_2$42 = ["id"];
11803
11870
  //#endregion
11804
11871
  //#region src/components/lists/MenuContainer/KdsMenuContainer.vue
11805
11872
  var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -11868,7 +11935,8 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
11868
11935
  if (!itemId) return;
11869
11936
  if (popovers.value[itemId]) {
11870
11937
  activePopoverId.value = itemId;
11871
- popovers.value[itemId].showPopover?.();
11938
+ const itemEl = (containerEl.value?.getRootNode())?.getElementById(itemId);
11939
+ popovers.value[itemId].showPopover?.({ source: itemEl ?? void 0 });
11872
11940
  return popovers.value[itemId];
11873
11941
  }
11874
11942
  };
@@ -12061,15 +12129,13 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
12061
12129
  if (!item.disabled && hasChildren(item)) showPopover(item.id);
12062
12130
  }
12063
12131
  }, {
12064
- children: withCtx(({ anchor }) => [createElementVNode("div", {
12065
- id: anchor.id,
12132
+ children: withCtx(() => [createElementVNode("div", {
12066
12133
  ref_for: true,
12067
12134
  ref: (el) => {
12068
12135
  popovers.value[item.id] = el;
12069
12136
  },
12070
12137
  popover: "manual",
12071
12138
  class: "submenu-popover",
12072
- style: normalizeStyle({ positionAnchor: anchor.name }),
12073
12139
  onMouseleave: _cache[1] || (_cache[1] = ($event) => closePopover()),
12074
12140
  onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {}, ["stop", "prevent"]), ["esc"]))
12075
12141
  }, [createVNode(_component_KdsMenuContainer, {
@@ -12084,7 +12150,7 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
12084
12150
  "id",
12085
12151
  "ariaLabel",
12086
12152
  "items"
12087
- ])], 44, _hoisted_2$42)]),
12153
+ ])], 544)]),
12088
12154
  _: 2
12089
12155
  }, 1032, [
12090
12156
  "item",
@@ -12094,10 +12160,10 @@ var KdsMenuContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
12094
12160
  "onClick",
12095
12161
  "onMouseenter"
12096
12162
  ]);
12097
- }), 128))], 46, _hoisted_1$67);
12163
+ }), 128))], 46, _hoisted_1$69);
12098
12164
  };
12099
12165
  }
12100
- }), [["__scopeId", "data-v-e83a636c"]]);
12166
+ }), [["__scopeId", "data-v-ac2b5dd6"]]);
12101
12167
  //#endregion
12102
12168
  //#region src/components/buttons/KdsMenuButton/KdsMenuButton.vue
12103
12169
  var KdsMenuButton_default = /* @__PURE__ */ defineComponent({
@@ -12138,7 +12204,6 @@ var KdsMenuButton_default = /* @__PURE__ */ defineComponent({
12138
12204
  });
12139
12205
  /** Whether the menu is open. */
12140
12206
  const isMenuOpen = useModel(__props, "modelValue");
12141
- const popoverEl = useTemplateRef("popover");
12142
12207
  const menuContainerEl = useTemplateRef("menuContainer");
12143
12208
  const menuButtonEl = useTemplateRef("menuButton");
12144
12209
  const menuId = useId();
@@ -12163,17 +12228,15 @@ var KdsMenuButton_default = /* @__PURE__ */ defineComponent({
12163
12228
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isMenuOpen.value = $event),
12164
12229
  "aria-haspopup": "menu",
12165
12230
  "aria-expanded": isMenuOpen.value,
12166
- "aria-controls": isMenuOpen.value ? unref(menuId) : void 0,
12167
- style: popoverEl.value?.anchorStyle
12231
+ "aria-controls": isMenuOpen.value ? unref(menuId) : void 0
12168
12232
  }), null, 16, [
12169
12233
  "modelValue",
12170
12234
  "aria-expanded",
12171
- "aria-controls",
12172
- "style"
12235
+ "aria-controls"
12173
12236
  ]), createVNode(KdsPopover_default, {
12174
- ref: "popover",
12175
12237
  modelValue: isMenuOpen.value,
12176
12238
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isMenuOpen.value = $event),
12239
+ anchor: menuButtonEl.value?.$el,
12177
12240
  placement: "bottom-left",
12178
12241
  "aria-label": "Menu"
12179
12242
  }, {
@@ -12190,7 +12253,7 @@ var KdsMenuButton_default = /* @__PURE__ */ defineComponent({
12190
12253
  "menu-max-height"
12191
12254
  ])) : createCommentVNode("", true)]),
12192
12255
  _: 1
12193
- }, 8, ["modelValue"])], 64);
12256
+ }, 8, ["modelValue", "anchor"])], 64);
12194
12257
  };
12195
12258
  }
12196
12259
  });
@@ -12221,7 +12284,7 @@ var KdsSplitButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
12221
12284
  ]);
12222
12285
  const emit = __emit;
12223
12286
  const isMenuOpen = ref(false);
12224
- const popoverEl = useTemplateRef("popoverEl");
12287
+ const menuToggleEl = useTemplateRef("menuToggle");
12225
12288
  const menuContainer = useTemplateRef("menuContainer");
12226
12289
  const menuId = useId();
12227
12290
  const onMenuEscape = (event) => {
@@ -12260,6 +12323,7 @@ var KdsSplitButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
12260
12323
  "variant"
12261
12324
  ]),
12262
12325
  createVNode(BaseButton_default, {
12326
+ ref: "menuToggle",
12263
12327
  class: "kds-split-button-secondary",
12264
12328
  "remove-border-radius": "left",
12265
12329
  size: __props.size,
@@ -12270,22 +12334,19 @@ var KdsSplitButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
12270
12334
  "aria-haspopup": "menu",
12271
12335
  "aria-expanded": isMenuOpen.value,
12272
12336
  "aria-controls": isMenuOpen.value ? unref(menuId) : void 0,
12273
- style: normalizeStyle(popoverEl.value?.anchorStyle),
12274
12337
  onClick: _cache[1] || (_cache[1] = ($event) => isMenuOpen.value = !isMenuOpen.value)
12275
12338
  }, null, 8, [
12276
12339
  "size",
12277
12340
  "variant",
12278
12341
  "disabled",
12279
12342
  "aria-expanded",
12280
- "aria-controls",
12281
- "style"
12343
+ "aria-controls"
12282
12344
  ]),
12283
12345
  createVNode(KdsPopover_default, {
12284
- ref_key: "popoverEl",
12285
- ref: popoverEl,
12286
12346
  modelValue: isMenuOpen.value,
12287
12347
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isMenuOpen.value = $event),
12288
- placement: "bottom-left"
12348
+ placement: "bottom-left",
12349
+ anchor: menuToggleEl.value?.$el
12289
12350
  }, {
12290
12351
  default: withCtx(() => [isMenuOpen.value ? (openBlock(), createBlock(KdsMenuContainer_default, {
12291
12352
  key: 0,
@@ -12303,11 +12364,11 @@ var KdsSplitButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
12303
12364
  "menu-max-height"
12304
12365
  ])) : createCommentVNode("", true)]),
12305
12366
  _: 1
12306
- }, 8, ["modelValue"])
12367
+ }, 8, ["modelValue", "anchor"])
12307
12368
  ], 2);
12308
12369
  };
12309
12370
  }
12310
- }), [["__scopeId", "data-v-a8a9ea3f"]]);
12371
+ }), [["__scopeId", "data-v-fbe3327b"]]);
12311
12372
  //#endregion
12312
12373
  //#region src/components/buttons/ActionButton/enums.ts
12313
12374
  var kdsActionButtonType = {
@@ -12341,7 +12402,7 @@ var ActionButton_default = /* @__PURE__ */ defineComponent({
12341
12402
  });
12342
12403
  //#endregion
12343
12404
  //#region src/components/feedback/EmptyState/KdsEmptyState.vue?vue&type=script&setup=true&lang.ts
12344
- var _hoisted_1$66 = ["aria-disabled"];
12405
+ var _hoisted_1$68 = ["aria-disabled"];
12345
12406
  var _hoisted_2$41 = { class: "kds-empty-state-headline" };
12346
12407
  var _hoisted_3$32 = {
12347
12408
  key: 1,
@@ -12392,13 +12453,13 @@ var KdsEmptyState_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
12392
12453
  createElementVNode("p", _hoisted_2$41, toDisplayString(props.headline), 1),
12393
12454
  props.description ? (openBlock(), createElementBlock("p", _hoisted_3$32, toDisplayString(props.description), 1)) : createCommentVNode("", true),
12394
12455
  resolvedPrimaryAction.value ? (openBlock(), createElementBlock("div", _hoisted_4$29, [createVNode(ActionButton_default, mergeProps(resolvedPrimaryAction.value, { size: "small" }), null, 16), resolvedSecondaryAction.value ? (openBlock(), createBlock(ActionButton_default, mergeProps({ key: 0 }, resolvedSecondaryAction.value, { size: "small" }), null, 16)) : createCommentVNode("", true)])) : createCommentVNode("", true)
12395
- ], 10, _hoisted_1$66);
12456
+ ], 10, _hoisted_1$68);
12396
12457
  };
12397
12458
  }
12398
12459
  }), [["__scopeId", "data-v-e9b806e2"]]);
12399
12460
  //#endregion
12400
12461
  //#region src/components/lists/ListContainer/KdsListContainer.vue?vue&type=script&setup=true&lang.ts
12401
- var _hoisted_1$65 = [
12462
+ var _hoisted_1$67 = [
12402
12463
  "aria-busy",
12403
12464
  "aria-label",
12404
12465
  "aria-activedescendant",
@@ -12631,7 +12692,7 @@ var KdsListContainer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
12631
12692
  }, [createVNode(KdsEmptyState_default, {
12632
12693
  headline: __props.loading ? loadingStateText : __props.emptyText,
12633
12694
  "loading-spinner": __props.loading
12634
- }, null, 8, ["headline", "loading-spinner"])])) : createCommentVNode("", true)], 16, _hoisted_1$65);
12695
+ }, null, 8, ["headline", "loading-spinner"])])) : createCommentVNode("", true)], 16, _hoisted_1$67);
12635
12696
  };
12636
12697
  }
12637
12698
  });
@@ -12641,7 +12702,7 @@ var KdsListContainer_exports = /* @__PURE__ */ __exportAll$1({ default: () => Kd
12641
12702
  var KdsListContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(KdsListContainer_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-23465b31"]]);
12642
12703
  //#endregion
12643
12704
  //#region src/components/lists/ListContainer/ListItem/ListItemButton/KdsListItemButton.vue?vue&type=script&setup=true&lang.ts
12644
- var _hoisted_1$64 = ["disabled"];
12705
+ var _hoisted_1$66 = ["disabled"];
12645
12706
  var _hoisted_2$40 = { class: "label" };
12646
12707
  //#endregion
12647
12708
  //#region src/components/lists/ListContainer/ListItem/ListItemButton/KdsListItemButton.vue
@@ -12673,7 +12734,7 @@ var KdsListItemButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
12673
12734
  unref(vKdsTooltip),
12674
12735
  props.label,
12675
12736
  "truncated"
12676
- ]])], 8, _hoisted_1$64);
12737
+ ]])], 8, _hoisted_1$66);
12677
12738
  };
12678
12739
  }
12679
12740
  }), [["__scopeId", "data-v-a756f0b8"]]);
@@ -13249,7 +13310,7 @@ var useInputSegments = (modelValue, getInputElement, configRef) => {
13249
13310
  };
13250
13311
  //#endregion
13251
13312
  //#region src/components/forms/inputs/BaseInput.vue?vue&type=script&setup=true&lang.ts
13252
- var _hoisted_1$63 = {
13313
+ var _hoisted_1$65 = {
13253
13314
  key: 0,
13254
13315
  class: "icon-wrapper leading"
13255
13316
  };
@@ -13448,7 +13509,7 @@ focus: focusInput });
13448
13509
  }),
13449
13510
  onClick: handleContainerClick
13450
13511
  }, [
13451
- props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$63, [props.leadingIcon ? (openBlock(), createBlock(KdsIcon_default, {
13512
+ props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$65, [props.leadingIcon ? (openBlock(), createBlock(KdsIcon_default, {
13452
13513
  key: 0,
13453
13514
  name: props.leadingIcon
13454
13515
  }, null, 8, ["name"])) : createCommentVNode("", true)])) : createCommentVNode("", true),
@@ -13567,7 +13628,7 @@ var filterOptionsPreservingSections = (options, query) => {
13567
13628
  var countSearchableOptions = (options) => options.filter((option) => !option.sectionHeadline).length;
13568
13629
  //#endregion
13569
13630
  //#region src/components/forms/selects/Dropdown/MultiSelectDropdownContainer.vue?vue&type=script&setup=true&lang.ts
13570
- var _hoisted_1$62 = { class: "kds-multi-select-dropdown-options" };
13631
+ var _hoisted_1$64 = { class: "kds-multi-select-dropdown-options" };
13571
13632
  var _hoisted_2$38 = {
13572
13633
  key: 0,
13573
13634
  class: "kds-multi-select-dropdown-search"
@@ -13711,7 +13772,7 @@ var MultiSelectDropdownContainer_default = /*#__PURE__*/ _plugin_vue_export_help
13711
13772
  else listContainerRef.value?.focus();
13712
13773
  } });
13713
13774
  return (_ctx, _cache) => {
13714
- return openBlock(), createElementBlock("div", _hoisted_1$62, [
13775
+ return openBlock(), createElementBlock("div", _hoisted_1$64, [
13715
13776
  searchable.value ? (openBlock(), createElementBlock("div", _hoisted_2$38, [createVNode(BaseInput_default, {
13716
13777
  ref_key: "searchEl",
13717
13778
  ref: searchEl,
@@ -13892,7 +13953,6 @@ var KdsMultiSelectButton_default = /* @__PURE__ */ defineComponent({
13892
13953
  "aria-haspopup": "dialog",
13893
13954
  "aria-expanded": open.value,
13894
13955
  "aria-controls": open.value ? popoverEl.value?.popoverId : void 0,
13895
- style: popoverEl.value?.anchorStyle,
13896
13956
  onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
13897
13957
  }), createSlots({ _: 2 }, [__props.showCount && selectedCount.value > 0 ? {
13898
13958
  name: "trailing",
@@ -13906,12 +13966,12 @@ var KdsMultiSelectButton_default = /* @__PURE__ */ defineComponent({
13906
13966
  "toggled",
13907
13967
  "aria-pressed",
13908
13968
  "aria-expanded",
13909
- "aria-controls",
13910
- "style"
13969
+ "aria-controls"
13911
13970
  ]), createVNode(KdsPopover_default, {
13912
13971
  ref: "popover",
13913
13972
  modelValue: open.value,
13914
13973
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => open.value = $event),
13974
+ anchor: multiSelectButtonEl.value?.$el,
13915
13975
  placement: "bottom-left",
13916
13976
  role: "dialog",
13917
13977
  "aria-label": "Multi select dropdown options"
@@ -13937,13 +13997,13 @@ var KdsMultiSelectButton_default = /* @__PURE__ */ defineComponent({
13937
13997
  "hide-clear-all"
13938
13998
  ])) : createCommentVNode("", true)]),
13939
13999
  _: 1
13940
- }, 8, ["modelValue"])], 64);
14000
+ }, 8, ["modelValue", "anchor"])], 64);
13941
14001
  };
13942
14002
  }
13943
14003
  });
13944
14004
  //#endregion
13945
14005
  //#region src/components/forms/selects/Dropdown/DropdownContainer.vue?vue&type=script&setup=true&lang.ts
13946
- var _hoisted_1$61 = { class: "kds-dropdown-container" };
14006
+ var _hoisted_1$63 = { class: "kds-dropdown-container" };
13947
14007
  var _hoisted_2$37 = {
13948
14008
  key: 0,
13949
14009
  class: "kds-dropdown-container-sticky-top"
@@ -14006,7 +14066,7 @@ var DropdownContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
14006
14066
  listContainerRef.value?.scrollSelectedIntoView();
14007
14067
  } });
14008
14068
  return (_ctx, _cache) => {
14009
- return openBlock(), createElementBlock("div", _hoisted_1$61, [searchable.value ? (openBlock(), createElementBlock("div", _hoisted_2$37, [createVNode(BaseInput_default, {
14069
+ return openBlock(), createElementBlock("div", _hoisted_1$63, [searchable.value ? (openBlock(), createElementBlock("div", _hoisted_2$37, [createVNode(BaseInput_default, {
14010
14070
  ref_key: "searchEl",
14011
14071
  ref: searchEl,
14012
14072
  modelValue: searchValue.value,
@@ -14135,7 +14195,6 @@ var KdsSelectButton_default = /* @__PURE__ */ defineComponent({
14135
14195
  "aria-haspopup": "dialog",
14136
14196
  "aria-expanded": open.value,
14137
14197
  "aria-controls": open.value ? popoverEl.value?.popoverId : void 0,
14138
- style: popoverEl.value?.anchorStyle,
14139
14198
  onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
14140
14199
  }), createSlots({ _: 2 }, [__props.showCount && selectedCount.value > 0 ? {
14141
14200
  name: "trailing",
@@ -14149,12 +14208,12 @@ var KdsSelectButton_default = /* @__PURE__ */ defineComponent({
14149
14208
  "toggled",
14150
14209
  "aria-pressed",
14151
14210
  "aria-expanded",
14152
- "aria-controls",
14153
- "style"
14211
+ "aria-controls"
14154
14212
  ]), createVNode(KdsPopover_default, {
14155
14213
  ref: "popover",
14156
14214
  modelValue: open.value,
14157
14215
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => open.value = $event),
14216
+ anchor: selectButtonEl.value?.$el,
14158
14217
  placement: "bottom-left",
14159
14218
  role: "dialog",
14160
14219
  "aria-label": "Dropdown menu"
@@ -14173,7 +14232,7 @@ var KdsSelectButton_default = /* @__PURE__ */ defineComponent({
14173
14232
  "loading"
14174
14233
  ])) : createCommentVNode("", true)]),
14175
14234
  _: 1
14176
- }, 8, ["modelValue"])], 64);
14235
+ }, 8, ["modelValue", "anchor"])], 64);
14177
14236
  };
14178
14237
  }
14179
14238
  });
@@ -14277,7 +14336,7 @@ var toMenuItem = (entry) => {
14277
14336
  };
14278
14337
  //#endregion
14279
14338
  //#region src/components/buttons/ResponsiveButtonGroup/KdsResponsiveButtonGroup.vue?vue&type=script&setup=true&lang.ts
14280
- var _hoisted_1$60 = {
14339
+ var _hoisted_1$62 = {
14281
14340
  ref: "measureContainer",
14282
14341
  class: "kds-button-group-measure",
14283
14342
  "aria-hidden": "true",
@@ -14421,7 +14480,7 @@ var KdsResponsiveButtonGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_d
14421
14480
  measureButtons();
14422
14481
  });
14423
14482
  return (_ctx, _cache) => {
14424
- return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", _hoisted_1$60, [
14483
+ return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", _hoisted_1$62, [
14425
14484
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.buttons, (button) => {
14426
14485
  return openBlock(), createBlock(resolveDynamicComponent(unref(typeToComponent)[button.type]), mergeProps({
14427
14486
  key: `full-${button.id}`,
@@ -14466,7 +14525,7 @@ var kdsResponsiveButtonGroupAlignment = {
14466
14525
  var kdsResponsiveButtonGroupAlignments = Object.values(kdsResponsiveButtonGroupAlignment);
14467
14526
  //#endregion
14468
14527
  //#region src/components/buttons/Breadcrumb/BreadcrumbItem.vue?vue&type=script&setup=true&lang.ts
14469
- var _hoisted_1$59 = {
14528
+ var _hoisted_1$61 = {
14470
14529
  key: 1,
14471
14530
  class: "breadcrumb-label"
14472
14531
  };
@@ -14509,7 +14568,7 @@ var BreadcrumbItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
14509
14568
  key: 0,
14510
14569
  name: __props.item.leadingIcon,
14511
14570
  class: "breadcrumb-icon"
14512
- }, null, 8, ["name"])) : createCommentVNode("", true), __props.item.text ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$59, [createTextVNode(toDisplayString(__props.item.text), 1)])), [[
14571
+ }, null, 8, ["name"])) : createCommentVNode("", true), __props.item.text ? withDirectives((openBlock(), createElementBlock("span", _hoisted_1$61, [createTextVNode(toDisplayString(__props.item.text), 1)])), [[
14513
14572
  unref(vKdsTooltip),
14514
14573
  __props.item.title,
14515
14574
  "truncated"
@@ -14638,7 +14697,7 @@ var useBreadcrumbAdaptiveLayout = (listRef, itemRefs, itemsSource) => {
14638
14697
  };
14639
14698
  //#endregion
14640
14699
  //#region src/components/buttons/Breadcrumb/KdsBreadcrumb.vue?vue&type=script&setup=true&lang.ts
14641
- var _hoisted_1$58 = ["aria-label"];
14700
+ var _hoisted_1$60 = ["aria-label"];
14642
14701
  //#endregion
14643
14702
  //#region src/components/buttons/Breadcrumb/KdsBreadcrumb.vue
14644
14703
  var KdsBreadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -14685,7 +14744,7 @@ var KdsBreadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
14685
14744
  class: "path-separator",
14686
14745
  "aria-hidden": "true"
14687
14746
  })) : createCommentVNode("", true)], 2);
14688
- }), 128))], 512)], 8, _hoisted_1$58)) : createCommentVNode("", true);
14747
+ }), 128))], 512)], 8, _hoisted_1$60)) : createCommentVNode("", true);
14689
14748
  };
14690
14749
  }
14691
14750
  }), [["__scopeId", "data-v-56b6e44e"]]);
@@ -14722,7 +14781,7 @@ var feedbackVariantIcon = (variant) => {
14722
14781
  var feedbackVariantRole = (variant) => variant === "warning" || variant === "error" ? "alert" : "status";
14723
14782
  //#endregion
14724
14783
  //#region src/components/feedback/BaseMessage.vue?vue&type=script&setup=true&lang.ts
14725
- var _hoisted_1$57 = ["role"];
14784
+ var _hoisted_1$59 = ["role"];
14726
14785
  //#endregion
14727
14786
  //#region src/components/feedback/BaseMessage.vue
14728
14787
  var BaseMessage_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -14734,13 +14793,13 @@ var BaseMessage_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
14734
14793
  return openBlock(), createElementBlock("div", {
14735
14794
  class: normalizeClass(["kds-base-message", __props.variant]),
14736
14795
  role: role.value
14737
- }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 10, _hoisted_1$57);
14796
+ }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 10, _hoisted_1$59);
14738
14797
  };
14739
14798
  }
14740
14799
  }), [["__scopeId", "data-v-e9196441"]]);
14741
14800
  //#endregion
14742
14801
  //#region src/components/feedback/Banner/KdsBanner.vue?vue&type=script&setup=true&lang.ts
14743
- var _hoisted_1$56 = { class: "icon-wrapper" };
14802
+ var _hoisted_1$58 = { class: "icon-wrapper" };
14744
14803
  var _hoisted_2$35 = { class: "content" };
14745
14804
  var _hoisted_3$28 = { class: "description" };
14746
14805
  var _hoisted_4$26 = {
@@ -14764,7 +14823,7 @@ var KdsBanner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
14764
14823
  variant: __props.variant,
14765
14824
  class: "kds-banner"
14766
14825
  }, {
14767
- default: withCtx(() => [createElementVNode("div", _hoisted_1$56, [createVNode(unref(KdsIcon_default), {
14826
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$58, [createVNode(unref(KdsIcon_default), {
14768
14827
  class: "kds-feedback-icon",
14769
14828
  name: iconName.value,
14770
14829
  size: "medium"
@@ -14787,7 +14846,7 @@ var kdsFeedbackVariant = {
14787
14846
  var kdsFeedbackVariants = Object.values(kdsFeedbackVariant);
14788
14847
  //#endregion
14789
14848
  //#region src/components/feedback/InlineMessage/KdsInlineMessage.vue?vue&type=script&setup=true&lang.ts
14790
- var _hoisted_1$55 = { class: "header" };
14849
+ var _hoisted_1$57 = { class: "header" };
14791
14850
  var _hoisted_2$34 = { class: "headline" };
14792
14851
  var _hoisted_3$27 = {
14793
14852
  key: 0,
@@ -14816,7 +14875,7 @@ var KdsInlineMessage_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
14816
14875
  class: "kds-inline-message"
14817
14876
  }, {
14818
14877
  default: withCtx(() => [
14819
- createElementVNode("div", _hoisted_1$55, [createVNode(unref(KdsIcon_default), {
14878
+ createElementVNode("div", _hoisted_1$57, [createVNode(unref(KdsIcon_default), {
14820
14879
  class: "kds-feedback-icon",
14821
14880
  name: iconName.value,
14822
14881
  size: "small"
@@ -14856,7 +14915,7 @@ var kdsLimitBarThresholdVariant = {
14856
14915
  var kdsLimitBarThresholdVariants = Object.values(kdsLimitBarThresholdVariant);
14857
14916
  //#endregion
14858
14917
  //#region src/components/feedback/LimitBar/KdsLimitBar.vue?vue&type=script&setup=true&lang.ts
14859
- var _hoisted_1$54 = {
14918
+ var _hoisted_1$56 = {
14860
14919
  key: 0,
14861
14920
  class: "header"
14862
14921
  };
@@ -14981,7 +15040,7 @@ var KdsLimitBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
14981
15040
  const descriptionId = useId();
14982
15041
  return (_ctx, _cache) => {
14983
15042
  return withDirectives((openBlock(), createElementBlock("div", { class: normalizeClass(["kds-limit-bar", stateClass.value]) }, [
14984
- showHeader.value ? (openBlock(), createElementBlock("div", _hoisted_1$54, [__props.headline ? (openBlock(), createElementBlock("span", _hoisted_2$33, toDisplayString(__props.headline), 1)) : createCommentVNode("", true), activeThreshold.value ? (openBlock(), createBlock(unref(KdsBadge_default), {
15043
+ showHeader.value ? (openBlock(), createElementBlock("div", _hoisted_1$56, [__props.headline ? (openBlock(), createElementBlock("span", _hoisted_2$33, toDisplayString(__props.headline), 1)) : createCommentVNode("", true), activeThreshold.value ? (openBlock(), createBlock(unref(KdsBadge_default), {
14985
15044
  key: 1,
14986
15045
  class: "badge",
14987
15046
  size: "xxsmall",
@@ -15028,7 +15087,7 @@ var LoadingSkeletonItem_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
15028
15087
  }), [["__scopeId", "data-v-52935649"]]);
15029
15088
  //#endregion
15030
15089
  //#region src/components/feedback/LoadingSkeleton/KdsLoadingSkeleton.vue?vue&type=script&setup=true&lang.ts
15031
- var _hoisted_1$53 = {
15090
+ var _hoisted_1$55 = {
15032
15091
  key: 0,
15033
15092
  class: "kds-loading-skeleton-headline-with-paragraph"
15034
15093
  };
@@ -15055,7 +15114,7 @@ var KdsLoadingSkeleton_default = /*#__PURE__*/ _plugin_vue_export_helper_default
15055
15114
  useCssVars((_ctx) => ({ "v2472a0c7": _ctx.repeatGap }));
15056
15115
  return (_ctx, _cache) => {
15057
15116
  return __props.loading ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, { class: "kds-loading-skeleton" }), [_cache[0] || (_cache[0] = createElementVNode("output", { class: "kds-loading-skeleton-status" }, "Loading…", -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.repeat, (index) => {
15058
- return openBlock(), createElementBlock(Fragment, { key: `skeleton-${index}` }, [__props.variant === "headline-with-paragraph" ? (openBlock(), createElementBlock("div", _hoisted_1$53, [createVNode(LoadingSkeletonItem_default, {
15117
+ return openBlock(), createElementBlock(Fragment, { key: `skeleton-${index}` }, [__props.variant === "headline-with-paragraph" ? (openBlock(), createElementBlock("div", _hoisted_1$55, [createVNode(LoadingSkeletonItem_default, {
15059
15118
  shape: "text",
15060
15119
  class: "headline"
15061
15120
  }), createElementVNode("div", _hoisted_2$32, [
@@ -15112,7 +15171,7 @@ var kdsProgressBarSize = {
15112
15171
  var kdsProgressBarSizes = Object.values(kdsProgressBarSize);
15113
15172
  //#endregion
15114
15173
  //#region src/components/feedback/ProgressBar/KdsProgressBar.vue?vue&type=script&setup=true&lang.ts
15115
- var _hoisted_1$52 = {
15174
+ var _hoisted_1$54 = {
15116
15175
  key: 0,
15117
15176
  class: "indeterminate-bar",
15118
15177
  "aria-hidden": "true"
@@ -15144,13 +15203,13 @@ var KdsProgressBar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
15144
15203
  }]) }, [withDirectives(createElementVNode("progress", mergeProps({ class: "progress" }, __props.indeterminate ? {} : {
15145
15204
  value: progressValue.value,
15146
15205
  max: 100
15147
- }), null, 16), [[unref(vKdsTooltip), tooltip.value]]), __props.indeterminate ? (openBlock(), createElementBlock("span", _hoisted_1$52)) : createCommentVNode("", true)], 2);
15206
+ }), null, 16), [[unref(vKdsTooltip), tooltip.value]]), __props.indeterminate ? (openBlock(), createElementBlock("span", _hoisted_1$54)) : createCommentVNode("", true)], 2);
15148
15207
  };
15149
15208
  }
15150
15209
  }), [["__scopeId", "data-v-a27a7f07"]]);
15151
15210
  //#endregion
15152
15211
  //#region src/components/forms/_helper/KdsLabel.vue?vue&type=script&setup=true&lang.ts
15153
- var _hoisted_1$51 = { class: "kds-label-wrapper" };
15212
+ var _hoisted_1$53 = { class: "kds-label-wrapper" };
15154
15213
  var _hoisted_2$31 = ["id", "for"];
15155
15214
  //#endregion
15156
15215
  //#region src/components/forms/_helper/KdsLabel.vue
@@ -15170,7 +15229,7 @@ var KdsLabel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
15170
15229
  const props = createPropsRestProxy(__props, ["showDescriptionButton"]);
15171
15230
  const KdsInfoToggleButton = defineAsyncComponent(() => Promise.resolve().then(() => KdsInfoToggleButton_exports));
15172
15231
  return (_ctx, _cache) => {
15173
- return openBlock(), createElementBlock("div", _hoisted_1$51, [withDirectives((openBlock(), createElementBlock("label", {
15232
+ return openBlock(), createElementBlock("div", _hoisted_1$53, [withDirectives((openBlock(), createElementBlock("label", {
15174
15233
  id: props.id,
15175
15234
  for: props.for,
15176
15235
  class: "label"
@@ -15188,7 +15247,7 @@ var KdsLabel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
15188
15247
  }), [["__scopeId", "data-v-527750fe"]]);
15189
15248
  //#endregion
15190
15249
  //#region src/components/forms/_helper/BaseFieldsetWrapper.vue?vue&type=script&setup=true&lang.ts
15191
- var _hoisted_1$50 = [
15250
+ var _hoisted_1$52 = [
15192
15251
  "id",
15193
15252
  "role",
15194
15253
  "aria-label",
@@ -15259,7 +15318,7 @@ var BaseFieldsetWrapper_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
15259
15318
  "validating",
15260
15319
  "preserve-sub-text-space"
15261
15320
  ])
15262
- ], 40, _hoisted_1$50);
15321
+ ], 40, _hoisted_1$52);
15263
15322
  };
15264
15323
  }
15265
15324
  }), [["__scopeId", "data-v-70509f83"]]);
@@ -15380,7 +15439,7 @@ var kdsToggleSwitchLabelPosition = {
15380
15439
  var kdsToggleSwitchLabelPositions = Object.values(kdsToggleSwitchLabelPosition);
15381
15440
  //#endregion
15382
15441
  //#region src/components/forms/ToggleSwitch/KdsToggleSwitch.vue?vue&type=script&setup=true&lang.ts
15383
- var _hoisted_1$49 = [
15442
+ var _hoisted_1$51 = [
15384
15443
  "disabled",
15385
15444
  "aria-label",
15386
15445
  "aria-checked"
@@ -15448,13 +15507,13 @@ var KdsToggleSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
15448
15507
  key: 0,
15449
15508
  name: isChecked.value ? "checkmark" : "x-close",
15450
15509
  size: __props.size === "small" ? "xsmall" : "small"
15451
- }, null, 8, ["name", "size"])) : createCommentVNode("", true)])]), props.label ? (openBlock(), createElementBlock("div", _hoisted_4$21, [createElementVNode("span", _hoisted_5$13, toDisplayString(props.label), 1)])) : createCommentVNode("", true)], 10, _hoisted_1$49);
15510
+ }, null, 8, ["name", "size"])) : createCommentVNode("", true)])]), props.label ? (openBlock(), createElementBlock("div", _hoisted_4$21, [createElementVNode("span", _hoisted_5$13, toDisplayString(props.label), 1)])) : createCommentVNode("", true)], 10, _hoisted_1$51);
15452
15511
  };
15453
15512
  }
15454
15513
  }), [["__scopeId", "data-v-1f2d16a6"]]);
15455
15514
  //#endregion
15456
15515
  //#region src/components/forms/RadioButton/KdsRadioButton.vue?vue&type=script&setup=true&lang.ts
15457
- var _hoisted_1$48 = [
15516
+ var _hoisted_1$50 = [
15458
15517
  "aria-checked",
15459
15518
  "aria-describedby",
15460
15519
  "aria-invalid",
@@ -15526,7 +15585,7 @@ var KdsRadioButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
15526
15585
  key: 0,
15527
15586
  id: `${unref(id)}-helper`,
15528
15587
  class: "helper-text"
15529
- }, toDisplayString(props.helperText), 9, _hoisted_6$8)) : createCommentVNode("", true)])], 10, _hoisted_1$48);
15588
+ }, toDisplayString(props.helperText), 9, _hoisted_6$8)) : createCommentVNode("", true)])], 10, _hoisted_1$50);
15530
15589
  };
15531
15590
  }
15532
15591
  }), [["__scopeId", "data-v-fdb5a895"]]);
@@ -15730,7 +15789,7 @@ var KdsRadioButtonGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
15730
15789
  }), [["__scopeId", "data-v-010d4c8b"]]);
15731
15790
  //#endregion
15732
15791
  //#region src/components/forms/RadioButton/ValueSwitchItem.vue?vue&type=script&setup=true&lang.ts
15733
- var _hoisted_1$47 = [
15792
+ var _hoisted_1$49 = [
15734
15793
  "aria-checked",
15735
15794
  "aria-label",
15736
15795
  "disabled",
@@ -15796,7 +15855,7 @@ var ValueSwitchItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
15796
15855
  name: props.trailingIcon,
15797
15856
  size: __props.size
15798
15857
  }, null, 8, ["name", "size"])) : createCommentVNode("", true)
15799
- ], 10, _hoisted_1$47)), [[unref(vKdsTooltip), props.tooltip || void 0]]);
15858
+ ], 10, _hoisted_1$49)), [[unref(vKdsTooltip), props.tooltip || void 0]]);
15800
15859
  };
15801
15860
  }
15802
15861
  }), [["__scopeId", "data-v-b3315a21"]]);
@@ -16452,7 +16511,6 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
16452
16511
  /** The current text value. */
16453
16512
  const modelValue = useModel(__props, "modelValue");
16454
16513
  const baseInput = useTemplateRef("baseInput");
16455
- const popoverRef = useTemplateRef("popoverRef");
16456
16514
  const listContainerRef = useTemplateRef("listContainerRef");
16457
16515
  const popoverOpen = ref(false);
16458
16516
  const isFocused = ref(false);
@@ -16537,7 +16595,6 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
16537
16595
  "aria-autocomplete": hasSuggestions.value ? "list" : void 0,
16538
16596
  "aria-controls": hasSuggestions.value && popoverOpen.value ? unref(suggestionId) : void 0,
16539
16597
  "aria-activedescendant": listContainerRef.value?.activeDescendant,
16540
- style: hasSuggestions.value ? popoverRef.value?.anchorStyle : void 0,
16541
16598
  onFocus,
16542
16599
  onBlur,
16543
16600
  onKeydown
@@ -16553,14 +16610,12 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
16553
16610
  "aria-expanded",
16554
16611
  "aria-autocomplete",
16555
16612
  "aria-controls",
16556
- "aria-activedescendant",
16557
- "style"
16613
+ "aria-activedescendant"
16558
16614
  ]), hasSuggestions.value ? (openBlock(), createBlock(KdsPopover_default, {
16559
16615
  key: 0,
16560
- ref_key: "popoverRef",
16561
- ref: popoverRef,
16562
16616
  modelValue: popoverOpen.value,
16563
16617
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => popoverOpen.value = $event),
16618
+ anchor: baseInput.value?.$el,
16564
16619
  placement: "bottom-left",
16565
16620
  "full-width": "",
16566
16621
  "popover-type": "manual"
@@ -16577,7 +16632,7 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
16577
16632
  onItemClick
16578
16633
  }, null, 8, ["id", "possible-values"])) : createCommentVNode("", true)]),
16579
16634
  _: 1
16580
- }, 8, ["modelValue"])) : createCommentVNode("", true)]),
16635
+ }, 8, ["modelValue", "anchor"])) : createCommentVNode("", true)]),
16581
16636
  _: 1
16582
16637
  }, 8, [
16583
16638
  "id",
@@ -16591,7 +16646,7 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
16591
16646
  ]);
16592
16647
  };
16593
16648
  }
16594
- }), [["__scopeId", "data-v-a89218cd"]]);
16649
+ }), [["__scopeId", "data-v-c1a9cc98"]]);
16595
16650
  //#endregion
16596
16651
  //#region src/components/forms/inputs/ColorInput/colorUtils.ts
16597
16652
  var HEX_RADIX = 16;
@@ -16721,7 +16776,7 @@ var removeAlphaFromHexInput = (next) => {
16721
16776
  };
16722
16777
  //#endregion
16723
16778
  //#region src/components/forms/inputs/ColorInput/ColorPicker/ColorPickerSlider.vue?vue&type=script&setup=true&lang.ts
16724
- var _hoisted_1$46 = [
16779
+ var _hoisted_1$48 = [
16725
16780
  "aria-label",
16726
16781
  "aria-valuenow",
16727
16782
  "aria-valuemin",
@@ -16795,13 +16850,13 @@ var ColorPickerSlider_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
16795
16850
  onPointercancel: _cache[3] || (_cache[3] = (...args) => unref(onPointerUp) && unref(onPointerUp)(...args)),
16796
16851
  onLostpointercapture: _cache[4] || (_cache[4] = (...args) => unref(onPointerUp) && unref(onPointerUp)(...args)),
16797
16852
  onKeydown: onKeyDown
16798
- }, [..._cache[5] || (_cache[5] = [createElementVNode("div", { class: "handle" }, null, -1)])], 40, _hoisted_1$46);
16853
+ }, [..._cache[5] || (_cache[5] = [createElementVNode("div", { class: "handle" }, null, -1)])], 40, _hoisted_1$48);
16799
16854
  };
16800
16855
  }
16801
16856
  }), [["__scopeId", "data-v-a7e448b0"]]);
16802
16857
  //#endregion
16803
16858
  //#region src/components/forms/inputs/ColorInput/ColorPicker/ColorPicker.vue?vue&type=script&setup=true&lang.ts
16804
- var _hoisted_1$45 = { class: "kds-color-picker" };
16859
+ var _hoisted_1$47 = { class: "kds-color-picker" };
16805
16860
  var _hoisted_2$26 = ["aria-valuetext"];
16806
16861
  var _hoisted_3$21 = { class: "value-inputs" };
16807
16862
  var DEFAULT_HUE_DEG = 270;
@@ -16952,7 +17007,7 @@ var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
16952
17007
  }
16953
17008
  };
16954
17009
  return (_ctx, _cache) => {
16955
- return openBlock(), createElementBlock("div", _hoisted_1$45, [
17010
+ return openBlock(), createElementBlock("div", _hoisted_1$47, [
16956
17011
  createElementVNode("div", {
16957
17012
  ref_key: "colorspaceEl",
16958
17013
  ref: colorspaceEl,
@@ -17131,6 +17186,7 @@ var KdsColorInput_default = /* @__PURE__ */ defineComponent({
17131
17186
  const modelValue = useModel(__props, "modelValue");
17132
17187
  const open = ref(false);
17133
17188
  const popoverEl = useTemplateRef("popoverEl");
17189
+ const popoverAnchorEl = useTemplateRef("popoverAnchor");
17134
17190
  const swatchColor = computed(() => normalizeHexColor(modelValue.value) ?? "#FFFFFF");
17135
17191
  const { handleFocusOut } = useColorInputValidationOnFocusOut(modelValue);
17136
17192
  const onClickColorSwatch = () => {
@@ -17143,7 +17199,7 @@ var KdsColorInput_default = /* @__PURE__ */ defineComponent({
17143
17199
  "preserve-sub-text-space": __props.preserveSubTextSpace
17144
17200
  }), {
17145
17201
  default: withCtx((slotProps) => [createElementVNode("div", {
17146
- style: normalizeStyle(popoverEl.value?.anchorStyle),
17202
+ ref: "popoverAnchor",
17147
17203
  onFocusout: _cache[4] || (_cache[4] = (...args) => unref(handleFocusOut) && unref(handleFocusOut)(...args))
17148
17204
  }, [createVNode(BaseInput_default, mergeProps(slotProps, {
17149
17205
  modelValue: modelValue.value,
@@ -17191,6 +17247,7 @@ var KdsColorInput_default = /* @__PURE__ */ defineComponent({
17191
17247
  ref: popoverEl,
17192
17248
  modelValue: open.value,
17193
17249
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => open.value = $event),
17250
+ anchor: popoverAnchorEl.value,
17194
17251
  placement: "bottom-right",
17195
17252
  role: "dialog",
17196
17253
  "aria-label": "Color picker"
@@ -17201,7 +17258,7 @@ var KdsColorInput_default = /* @__PURE__ */ defineComponent({
17201
17258
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => modelValue.value = $event)
17202
17259
  }, null, 8, ["modelValue"])) : createCommentVNode("", true)]),
17203
17260
  _: 1
17204
- }, 8, ["modelValue"])], 36)]),
17261
+ }, 8, ["modelValue", "anchor"])], 544)]),
17205
17262
  _: 1
17206
17263
  }, 16, [
17207
17264
  "error",
@@ -20993,7 +21050,7 @@ var Temporal = NativeTemporal || Temporal$1;
20993
21050
  NativeTemporal && Date.prototype.toTemporalInstant;
20994
21051
  //#endregion
20995
21052
  //#region src/components/forms/inputs/DateInput/_helper/DatePickerDayGrid.vue?vue&type=script&setup=true&lang.ts
20996
- var _hoisted_1$44 = {
21053
+ var _hoisted_1$46 = {
20997
21054
  role: "row",
20998
21055
  class: "kds-date-picker-header-row"
20999
21056
  };
@@ -21253,7 +21310,7 @@ var DatePickerDayGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
21253
21310
  class: "kds-date-picker-grid",
21254
21311
  role: "grid",
21255
21312
  "aria-label": "Calendar"
21256
- }, [createElementVNode("div", _hoisted_1$44, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(DAY_LABELS), (day, i) => {
21313
+ }, [createElementVNode("div", _hoisted_1$46, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(DAY_LABELS), (day, i) => {
21257
21314
  return openBlock(), createElementBlock("div", {
21258
21315
  key: day,
21259
21316
  role: "columnheader",
@@ -21292,7 +21349,7 @@ var DatePickerDayGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
21292
21349
  }), [["__scopeId", "data-v-a40b4d62"]]);
21293
21350
  //#endregion
21294
21351
  //#region src/components/forms/inputs/DateInput/_helper/DatePickerMonthGrid.vue?vue&type=script&setup=true&lang.ts
21295
- var _hoisted_1$43 = [
21352
+ var _hoisted_1$45 = [
21296
21353
  "aria-selected",
21297
21354
  "aria-disabled",
21298
21355
  "aria-label",
@@ -21451,7 +21508,7 @@ var DatePickerMonthGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
21451
21508
  onClick: ($event) => selectMonth(cell.month),
21452
21509
  onKeydown: ($event) => onKeydown($event, cell.month),
21453
21510
  onFocus: ($event) => focusedCell.value = cell.month
21454
- }, toDisplayString(cell.label), 43, _hoisted_1$43);
21511
+ }, toDisplayString(cell.label), 43, _hoisted_1$45);
21455
21512
  }), 128))]);
21456
21513
  }), 128))], 512);
21457
21514
  };
@@ -21459,7 +21516,7 @@ var DatePickerMonthGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
21459
21516
  }), [["__scopeId", "data-v-53f3f58c"]]);
21460
21517
  //#endregion
21461
21518
  //#region src/components/forms/inputs/DateInput/_helper/DatePickerYearGrid.vue?vue&type=script&setup=true&lang.ts
21462
- var _hoisted_1$42 = [
21519
+ var _hoisted_1$44 = [
21463
21520
  "aria-selected",
21464
21521
  "aria-disabled",
21465
21522
  "aria-label",
@@ -21602,7 +21659,7 @@ var DatePickerYearGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_default
21602
21659
  onClick: ($event) => selectYear(cell.year),
21603
21660
  onKeydown: ($event) => onKeydown($event, cell.year),
21604
21661
  onFocus: ($event) => focusedCell.value = cell.year
21605
- }, toDisplayString(cell.label), 43, _hoisted_1$42);
21662
+ }, toDisplayString(cell.label), 43, _hoisted_1$44);
21606
21663
  }), 128))]);
21607
21664
  }), 128))], 512);
21608
21665
  };
@@ -21610,7 +21667,7 @@ var DatePickerYearGrid_default = /*#__PURE__*/ _plugin_vue_export_helper_default
21610
21667
  }), [["__scopeId", "data-v-41d5070e"]]);
21611
21668
  //#endregion
21612
21669
  //#region src/components/forms/inputs/DateInput/KdsDatePicker.vue?vue&type=script&setup=true&lang.ts
21613
- var _hoisted_1$41 = { class: "kds-date-picker" };
21670
+ var _hoisted_1$43 = { class: "kds-date-picker" };
21614
21671
  var _hoisted_2$24 = { class: "kds-date-picker-header" };
21615
21672
  var _hoisted_3$19 = { class: "kds-date-picker-nav-block" };
21616
21673
  var _hoisted_4$18 = {
@@ -21773,7 +21830,7 @@ var KdsDatePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
21773
21830
  });
21774
21831
  __expose({ focus });
21775
21832
  return (_ctx, _cache) => {
21776
- return openBlock(), createElementBlock("div", _hoisted_1$41, [createElementVNode("div", _hoisted_2$24, [
21833
+ return openBlock(), createElementBlock("div", _hoisted_1$43, [createElementVNode("div", _hoisted_2$24, [
21777
21834
  createElementVNode("div", _hoisted_3$19, [view.value === "day" ? (openBlock(), createBlock(KdsButton_default, {
21778
21835
  key: 0,
21779
21836
  variant: "transparent",
@@ -22086,7 +22143,6 @@ var KdsDateInput_default = /* @__PURE__ */ defineComponent({
22086
22143
  disabled: __props.disabled,
22087
22144
  error: effectiveError.value,
22088
22145
  autocomplete: __props.autocomplete,
22089
- style: popoverRef.value?.anchorStyle,
22090
22146
  "aria-controls": popoverRef.value?.popoverId,
22091
22147
  onBlur: onTextInputBlur
22092
22148
  }), {
@@ -22120,13 +22176,13 @@ var KdsDateInput_default = /* @__PURE__ */ defineComponent({
22120
22176
  "disabled",
22121
22177
  "error",
22122
22178
  "autocomplete",
22123
- "style",
22124
22179
  "aria-controls"
22125
22180
  ]), createVNode(KdsPopover_default, {
22126
22181
  ref_key: "popoverRef",
22127
22182
  ref: popoverRef,
22128
22183
  modelValue: popoverIsVisible.value,
22129
22184
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => popoverIsVisible.value = $event),
22185
+ anchor: baseInput.value?.$el,
22130
22186
  placement: "bottom-right",
22131
22187
  role: "dialog",
22132
22188
  "aria-label": "Date picker"
@@ -22145,7 +22201,7 @@ var KdsDateInput_default = /* @__PURE__ */ defineComponent({
22145
22201
  "max-date"
22146
22202
  ])) : createCommentVNode("", true)]),
22147
22203
  _: 1
22148
- }, 8, ["modelValue"])]),
22204
+ }, 8, ["modelValue", "anchor"])]),
22149
22205
  _: 1
22150
22206
  }, 16, ["error", "sub-text"]);
22151
22207
  };
@@ -22153,7 +22209,7 @@ var KdsDateInput_default = /* @__PURE__ */ defineComponent({
22153
22209
  });
22154
22210
  //#endregion
22155
22211
  //#region src/components/forms/inputs/DateTimeFormatInput/DateTimeFormatPopover.vue?vue&type=script&setup=true&lang.ts
22156
- var _hoisted_1$40 = { class: "kds-date-time-format-popover" };
22212
+ var _hoisted_1$42 = { class: "kds-date-time-format-popover" };
22157
22213
  //#endregion
22158
22214
  //#region src/components/forms/inputs/DateTimeFormatInput/DateTimeFormatPopover.vue
22159
22215
  var DateTimeFormatPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
@@ -22272,7 +22328,7 @@ var DateTimeFormatPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
22272
22328
  }));
22273
22329
  });
22274
22330
  return (_ctx, _cache) => {
22275
- return openBlock(), createElementBlock("div", _hoisted_1$40, [
22331
+ return openBlock(), createElementBlock("div", _hoisted_1$42, [
22276
22332
  modeOptions.value.length > 1 ? (openBlock(), createBlock(KdsValueSwitch_default, {
22277
22333
  key: 0,
22278
22334
  "model-value": effectiveSelectedMode.value,
@@ -22304,6 +22360,9 @@ var DateTimeFormatPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
22304
22360
  }
22305
22361
  }), [["__scopeId", "data-v-f866f9fd"]]);
22306
22362
  //#endregion
22363
+ //#region src/components/forms/inputs/DateTimeFormatInput/KdsDateTimeFormatInput.vue?vue&type=script&setup=true&lang.ts
22364
+ var _hoisted_1$41 = { ref: "popoverAnchor" };
22365
+ //#endregion
22307
22366
  //#region src/components/forms/inputs/DateTimeFormatInput/KdsDateTimeFormatInput.vue
22308
22367
  var KdsDateTimeFormatInput_default = /* @__PURE__ */ defineComponent({
22309
22368
  __name: "KdsDateTimeFormatInput",
@@ -22350,13 +22409,14 @@ var KdsDateTimeFormatInput_default = /* @__PURE__ */ defineComponent({
22350
22409
  const modelValue = useModel(__props, "modelValue");
22351
22410
  const open = ref(false);
22352
22411
  const popoverEl = useTemplateRef("popoverEl");
22412
+ const popoverAnchorEl = useTemplateRef("popoverAnchor");
22353
22413
  return (_ctx, _cache) => {
22354
22414
  return openBlock(), createBlock(BaseFormFieldWrapper_default, mergeProps(props, {
22355
22415
  error: __props.error,
22356
22416
  validating: __props.validating,
22357
22417
  "preserve-sub-text-space": __props.preserveSubTextSpace
22358
22418
  }), {
22359
- default: withCtx((slotProps) => [createElementVNode("div", { style: normalizeStyle(popoverEl.value?.anchorStyle) }, [createVNode(BaseInput_default, mergeProps(slotProps, {
22419
+ default: withCtx((slotProps) => [createElementVNode("div", _hoisted_1$41, [createVNode(BaseInput_default, mergeProps(slotProps, {
22360
22420
  modelValue: modelValue.value,
22361
22421
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue.value = $event),
22362
22422
  type: "text",
@@ -22398,6 +22458,7 @@ var KdsDateTimeFormatInput_default = /* @__PURE__ */ defineComponent({
22398
22458
  ref: popoverEl,
22399
22459
  modelValue: open.value,
22400
22460
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => open.value = $event),
22461
+ anchor: popoverAnchorEl.value,
22401
22462
  placement: "bottom-right",
22402
22463
  "aria-label": "Date time format selection dialog"
22403
22464
  }, {
@@ -22416,7 +22477,7 @@ var KdsDateTimeFormatInput_default = /* @__PURE__ */ defineComponent({
22416
22477
  "allowed-formats"
22417
22478
  ])) : createCommentVNode("", true)]),
22418
22479
  _: 1
22419
- }, 8, ["modelValue"])], 4)]),
22480
+ }, 8, ["modelValue", "anchor"])], 512)]),
22420
22481
  _: 1
22421
22482
  }, 16, [
22422
22483
  "error",
@@ -22679,7 +22740,7 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
22679
22740
  "resultClick"
22680
22741
  ], ["update:modelValue"]),
22681
22742
  setup(__props, { expose: __expose, emit: __emit }) {
22682
- const KdsPopover = defineAsyncComponent(() => import("./KdsPopover-Bqel9iqk.js").then((n) => n.n));
22743
+ const KdsPopover = defineAsyncComponent(() => import("./KdsPopover-DezPib64.js").then((n) => n.n));
22683
22744
  const KdsListContainer = defineAsyncComponent(() => Promise.resolve().then(() => KdsListContainer_exports));
22684
22745
  const props = createPropsRestProxy(__props, [
22685
22746
  "placeholder",
@@ -22693,7 +22754,6 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
22693
22754
  const modelValue = useModel(__props, "modelValue");
22694
22755
  const emit = __emit;
22695
22756
  const baseInput = useTemplateRef("baseInput");
22696
- const popoverEl = useTemplateRef("popover");
22697
22757
  const listContainerEl = useTemplateRef("listContainer");
22698
22758
  const resultsOpen = ref(false);
22699
22759
  const resultsId = useId();
@@ -22760,7 +22820,6 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
22760
22820
  autocomplete: __props.autocomplete,
22761
22821
  "leading-icon": __props.leadingIcon,
22762
22822
  clearable: true,
22763
- style: popoverEl.value?.anchorStyle,
22764
22823
  role: __props.results ? "combobox" : void 0,
22765
22824
  "aria-activedescendant": resultsOpen.value ? listContainerEl.value?.activeDescendant : void 0,
22766
22825
  "aria-haspopup": __props.results ? "listbox" : void 0,
@@ -22778,7 +22837,6 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
22778
22837
  "maxlength",
22779
22838
  "autocomplete",
22780
22839
  "leading-icon",
22781
- "style",
22782
22840
  "role",
22783
22841
  "aria-activedescendant",
22784
22842
  "aria-haspopup",
@@ -22786,9 +22844,9 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
22786
22844
  "aria-expanded"
22787
22845
  ]), __props.results ? (openBlock(), createBlock(unref(KdsPopover), {
22788
22846
  key: 0,
22789
- ref: "popover",
22790
22847
  modelValue: resultsOpen.value,
22791
22848
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => resultsOpen.value = $event),
22849
+ anchor: baseInput.value?.$el,
22792
22850
  "full-width": "",
22793
22851
  "max-inline-size": "anchor-size(width)",
22794
22852
  "popover-type": "manual",
@@ -22810,7 +22868,7 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
22810
22868
  onItemClick: onResultClick
22811
22869
  }, null, 8, ["id", "possible-values"])], 4)) : createCommentVNode("", true)]),
22812
22870
  _: 1
22813
- }, 8, ["modelValue"])) : createCommentVNode("", true)]),
22871
+ }, 8, ["modelValue", "anchor"])) : createCommentVNode("", true)]),
22814
22872
  _: 1
22815
22873
  }, 8, [
22816
22874
  "id",
@@ -22824,10 +22882,10 @@ var KdsSearchInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
22824
22882
  ]);
22825
22883
  };
22826
22884
  }
22827
- }), [["__scopeId", "data-v-45b32444"]]);
22885
+ }), [["__scopeId", "data-v-0dd1bb64"]]);
22828
22886
  //#endregion
22829
22887
  //#region src/components/forms/inputs/Textarea/KdsTextarea.vue?vue&type=script&setup=true&lang.ts
22830
- var _hoisted_1$39 = [
22888
+ var _hoisted_1$40 = [
22831
22889
  "rows",
22832
22890
  "placeholder",
22833
22891
  "disabled",
@@ -22903,7 +22961,7 @@ var KdsTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
22903
22961
  disabled: __props.disabled,
22904
22962
  autocomplete: props.autocomplete,
22905
22963
  maxlength: props.maxlength
22906
- }), null, 16, _hoisted_1$39), [[vModelText, modelValue.value]])]),
22964
+ }), null, 16, _hoisted_1$40), [[vModelText, modelValue.value]])]),
22907
22965
  _: 1
22908
22966
  }, 16, [
22909
22967
  "error",
@@ -22915,7 +22973,7 @@ var KdsTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
22915
22973
  }), [["__scopeId", "data-v-7a6ec8a2"]]);
22916
22974
  //#endregion
22917
22975
  //#region src/components/forms/inputs/TimeInput/TimePicker.vue?vue&type=script&setup=true&lang.ts
22918
- var _hoisted_1$38 = { class: "kds-time-picker" };
22976
+ var _hoisted_1$39 = { class: "kds-time-picker" };
22919
22977
  var _hoisted_2$23 = { class: "kds-time-picker-fields" };
22920
22978
  var _hoisted_3$18 = { class: "kds-time-picker-fields" };
22921
22979
  var _hoisted_4$17 = {
@@ -23005,7 +23063,7 @@ var TimePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
23005
23063
  };
23006
23064
  __expose({ focus });
23007
23065
  return (_ctx, _cache) => {
23008
- return openBlock(), createElementBlock("div", _hoisted_1$38, [
23066
+ return openBlock(), createElementBlock("div", _hoisted_1$39, [
23009
23067
  createElementVNode("div", _hoisted_2$23, [createVNode(KdsNumberInput_default, {
23010
23068
  ref: "hourInput",
23011
23069
  modelValue: hour.value,
@@ -23378,7 +23436,6 @@ var KdsTimeInput_default = /* @__PURE__ */ defineComponent({
23378
23436
  disabled: __props.disabled,
23379
23437
  error: effectiveError.value,
23380
23438
  autocomplete: __props.autocomplete,
23381
- style: popoverRef.value?.anchorStyle,
23382
23439
  "aria-controls": popoverRef.value?.popoverId,
23383
23440
  onBlur: onTextInputBlur
23384
23441
  }), {
@@ -23412,13 +23469,13 @@ var KdsTimeInput_default = /* @__PURE__ */ defineComponent({
23412
23469
  "disabled",
23413
23470
  "error",
23414
23471
  "autocomplete",
23415
- "style",
23416
23472
  "aria-controls"
23417
23473
  ]), createVNode(KdsPopover_default, {
23418
23474
  ref_key: "popoverRef",
23419
23475
  ref: popoverRef,
23420
23476
  modelValue: popoverIsVisible.value,
23421
23477
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => popoverIsVisible.value = $event),
23478
+ anchor: baseInput.value?.$el,
23422
23479
  placement: "bottom-right",
23423
23480
  role: "dialog",
23424
23481
  "aria-label": "Time picker"
@@ -23438,7 +23495,7 @@ var KdsTimeInput_default = /* @__PURE__ */ defineComponent({
23438
23495
  "max-granularity"
23439
23496
  ])) : createCommentVNode("", true)]),
23440
23497
  _: 1
23441
- }, 8, ["modelValue"])]),
23498
+ }, 8, ["modelValue", "anchor"])]),
23442
23499
  _: 1
23443
23500
  }, 16, ["error", "sub-text"]);
23444
23501
  };
@@ -23616,7 +23673,7 @@ var stripInactiveFields = (duration, usedFormat) => {
23616
23673
  var toTitleCase = (key) => key.charAt(0).toUpperCase() + key.slice(1).toLowerCase();
23617
23674
  //#endregion
23618
23675
  //#region src/components/forms/inputs/IntervalInput/IntervalInputPopover.vue?vue&type=script&setup=true&lang.ts
23619
- var _hoisted_1$37 = { class: "kds-interval-popover" };
23676
+ var _hoisted_1$38 = { class: "kds-interval-popover" };
23620
23677
  var _hoisted_2$22 = { class: "kds-interval-popover-header" };
23621
23678
  var _hoisted_3$17 = { class: "kds-interval-popover-content" };
23622
23679
  var _hoisted_4$16 = { class: "kds-interval-popover-grid" };
@@ -23711,7 +23768,7 @@ var IntervalInputPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
23711
23768
  }
23712
23769
  });
23713
23770
  return (_ctx, _cache) => {
23714
- return openBlock(), createElementBlock("div", _hoisted_1$37, [
23771
+ return openBlock(), createElementBlock("div", _hoisted_1$38, [
23715
23772
  createElementVNode("div", _hoisted_2$22, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "kds-interval-popover-title" }, "Interval value", -1)), props.format === unref(kdsIntervalInputFormat).DATE_OR_TIME ? (openBlock(), createBlock(unref(KdsValueSwitch_default), {
23716
23773
  key: 0,
23717
23774
  modelValue: mode.value,
@@ -23765,6 +23822,9 @@ var IntervalInputPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
23765
23822
  }
23766
23823
  }), [["__scopeId", "data-v-f4a7d41b"]]);
23767
23824
  //#endregion
23825
+ //#region src/components/forms/inputs/IntervalInput/KdsIntervalInput.vue?vue&type=script&setup=true&lang.ts
23826
+ var _hoisted_1$37 = { ref: "popoverAnchor" };
23827
+ //#endregion
23768
23828
  //#region src/components/forms/inputs/IntervalInput/KdsIntervalInput.vue
23769
23829
  var KdsIntervalInput_default = /* @__PURE__ */ defineComponent({
23770
23830
  __name: "KdsIntervalInput",
@@ -23817,6 +23877,7 @@ var KdsIntervalInput_default = /* @__PURE__ */ defineComponent({
23817
23877
  const isToggling = ref(false);
23818
23878
  const inputError = ref(false);
23819
23879
  const popoverRef = useTemplateRef("popoverEl");
23880
+ const popoverAnchorEl = useTemplateRef("popoverAnchor");
23820
23881
  const baseInputRef = useTemplateRef("baseInput");
23821
23882
  const defaultFormat = kdsIntervalInputFormat.DATE;
23822
23883
  const resolveActiveFormat = (duration, fallback) => {
@@ -23906,7 +23967,7 @@ var KdsIntervalInput_default = /* @__PURE__ */ defineComponent({
23906
23967
  "preserve-sub-text-space": __props.preserveSubTextSpace,
23907
23968
  "sub-text": effectiveSubText.value
23908
23969
  }), {
23909
- default: withCtx((slotProps) => [createElementVNode("div", { style: normalizeStyle(popoverRef.value?.anchorStyle) }, [createVNode(BaseInput_default, mergeProps({ ref: "baseInput" }, slotProps, {
23970
+ default: withCtx((slotProps) => [createElementVNode("div", _hoisted_1$37, [createVNode(BaseInput_default, mergeProps({ ref: "baseInput" }, slotProps, {
23910
23971
  modelValue: inputValue.value,
23911
23972
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => inputValue.value = $event),
23912
23973
  type: "text",
@@ -23955,6 +24016,7 @@ var KdsIntervalInput_default = /* @__PURE__ */ defineComponent({
23955
24016
  ref: "popoverEl",
23956
24017
  modelValue: isPopoverOpen.value,
23957
24018
  "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isPopoverOpen.value = $event),
24019
+ anchor: popoverAnchorEl.value,
23958
24020
  placement: "bottom-right",
23959
24021
  role: "dialog",
23960
24022
  "aria-label": "Interval selection dialog"
@@ -23974,7 +24036,7 @@ var KdsIntervalInput_default = /* @__PURE__ */ defineComponent({
23974
24036
  "allow-descending"
23975
24037
  ])) : createCommentVNode("", true)]),
23976
24038
  _: 1
23977
- }, 8, ["modelValue"])], 4)]),
24039
+ }, 8, ["modelValue", "anchor"])], 512)]),
23978
24040
  _: 1
23979
24041
  }, 16, [
23980
24042
  "error",
@@ -24343,7 +24405,6 @@ focus: () => baseDropdownEl.value?.focus() });
24343
24405
  error: __props.error,
24344
24406
  missing: !!modelValue.value && !selectedOption.value,
24345
24407
  accessory: selectedOption.value?.accessory,
24346
- style: popoverEl.value?.anchorStyle,
24347
24408
  "popover-id": popoverEl.value?.popoverId,
24348
24409
  onClick: _cache[1] || (_cache[1] = ($event) => open.value = !open.value)
24349
24410
  }), null, 16, [
@@ -24354,13 +24415,13 @@ focus: () => baseDropdownEl.value?.focus() });
24354
24415
  "error",
24355
24416
  "missing",
24356
24417
  "accessory",
24357
- "style",
24358
24418
  "popover-id"
24359
24419
  ]), createVNode(KdsPopover_default, {
24360
24420
  ref_key: "popoverEl",
24361
24421
  ref: popoverEl,
24362
24422
  modelValue: open.value,
24363
24423
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => open.value = $event),
24424
+ anchor: baseDropdownEl.value?.$el,
24364
24425
  placement: "bottom-left",
24365
24426
  role: "dialog",
24366
24427
  "full-width": "",
@@ -24383,7 +24444,7 @@ focus: () => baseDropdownEl.value?.focus() });
24383
24444
  "loading"
24384
24445
  ])) : createCommentVNode("", true)]),
24385
24446
  _: 1
24386
- }, 8, ["modelValue"])]),
24447
+ }, 8, ["modelValue", "anchor"])]),
24387
24448
  _: 1
24388
24449
  }, 8, [
24389
24450
  "id",
@@ -24938,7 +24999,6 @@ focus: () => baseDropdownEl.value?.focus() });
24938
24999
  disabled: __props.disabled,
24939
25000
  error: __props.error,
24940
25001
  missing: missingIds.value.length > 0,
24941
- style: popoverEl.value?.anchorStyle,
24942
25002
  "popover-id": popoverEl.value?.popoverId,
24943
25003
  onClick: _cache[1] || (_cache[1] = ($event) => open.value = !open.value)
24944
25004
  }), null, 16, [
@@ -24948,13 +25008,13 @@ focus: () => baseDropdownEl.value?.focus() });
24948
25008
  "disabled",
24949
25009
  "error",
24950
25010
  "missing",
24951
- "style",
24952
25011
  "popover-id"
24953
25012
  ]), createVNode(KdsPopover_default, {
24954
25013
  ref_key: "popoverEl",
24955
25014
  ref: popoverEl,
24956
25015
  modelValue: open.value,
24957
25016
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => open.value = $event),
25017
+ anchor: baseDropdownEl.value?.$el,
24958
25018
  placement: "bottom-left",
24959
25019
  role: "dialog",
24960
25020
  "full-width": "",
@@ -24981,7 +25041,7 @@ focus: () => baseDropdownEl.value?.focus() });
24981
25041
  "maxlength"
24982
25042
  ])) : createCommentVNode("", true)]),
24983
25043
  _: 1
24984
- }, 8, ["modelValue"])]),
25044
+ }, 8, ["modelValue", "anchor"])]),
24985
25045
  _: 1
24986
25046
  }, 8, [
24987
25047
  "id",
@@ -25565,9 +25625,9 @@ var KdsMultiSelectListBox_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
25565
25625
  ], ["update:modelValue"]),
25566
25626
  setup(__props, { expose: __expose, emit: __emit }) {
25567
25627
  useCssVars((_ctx) => ({
25568
- "v21e36790": dropIndicatorTop.value,
25569
- "v1a85c12c": dropIndicatorLeft.value,
25570
- "v36cf3141": dropIndicatorWidth.value
25628
+ "v452199fa": dropIndicatorTop.value,
25629
+ "v5f1937ce": dropIndicatorLeft.value,
25630
+ "v3e95ebf4": dropIndicatorWidth.value
25571
25631
  }));
25572
25632
  const OPTION_LINE_HEIGHT = dimension.component.height["1.5x"].value + spacing.container["0.10x"].value;
25573
25633
  const DEFAULT_HEIGHT = dimension.component.height["20x"].value;
@@ -25599,10 +25659,11 @@ var KdsMultiSelectListBox_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
25599
25659
  const allValues = computed(() => visibleBottomValue.value ? [...visiblePossibleValues.value, visibleBottomValue.value] : visiblePossibleValues.value);
25600
25660
  const bottomIndex = computed(() => visiblePossibleValues.value.length);
25601
25661
  const { containerProps, wrapperProps, list: virtualList, scrollTo } = useVirtualList(visiblePossibleValues, { itemHeight: OPTION_LINE_HEIGHT });
25602
- watch(visiblePossibleValues, () => {
25662
+ watch(visiblePossibleValues, (values) => {
25603
25663
  const el = containerProps.ref.value;
25604
25664
  if (!el) return;
25605
- scrollTo(Math.max(Math.min(Math.floor(el.scrollTop / OPTION_LINE_HEIGHT), visiblePossibleValues.value.length - 1), 0));
25665
+ if (Math.floor(el.scrollTop / OPTION_LINE_HEIGHT) < values.length) return;
25666
+ scrollTo(Math.max(values.length - 1, 0));
25606
25667
  });
25607
25668
  const scrollToIndex = (index) => {
25608
25669
  if (index === bottomIndex.value && visibleBottomValue.value) return;
@@ -25839,7 +25900,7 @@ var KdsMultiSelectListBox_default = /*#__PURE__*/ _plugin_vue_export_helper_defa
25839
25900
  ]);
25840
25901
  };
25841
25902
  }
25842
- }), [["__scopeId", "data-v-ff301db7"]]);
25903
+ }), [["__scopeId", "data-v-9feb50c6"]]);
25843
25904
  //#endregion
25844
25905
  //#region src/components/forms/selects/TwinList/TwinListBody.vue?vue&type=script&setup=true&lang.ts
25845
25906
  var _hoisted_1$29 = { class: "kds-list-column" };
@@ -25926,28 +25987,20 @@ var TwinListBody_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
25926
25987
  return props.possibleValues.filter((v) => includedSet.has(String(v.id)));
25927
25988
  });
25928
25989
  const matchesSearch = (item) => item.text.toLowerCase().includes(__props.searchTerm.toLowerCase());
25929
- const toMissingOption = (id, selectedSet) => ({
25990
+ const toMissingOption = (id) => ({
25930
25991
  id,
25931
25992
  text: id,
25932
- missing: true,
25933
- selected: selectedSet.has(id)
25993
+ missing: true
25934
25994
  });
25935
25995
  const filteredExcludedItems = computed(() => __props.searchTerm ? excludedItems.value.filter(matchesSearch) : excludedItems.value);
25936
25996
  const filteredIncludedItems = computed(() => __props.searchTerm ? includedItems.value.filter(matchesSearch) : includedItems.value);
25937
- const toListOption = (item, selectedSet) => ({
25997
+ const toListOption = (item) => ({
25938
25998
  id: String(item.id),
25939
25999
  text: item.text,
25940
- accessory: item.accessory,
25941
- selected: selectedSet.has(String(item.id))
25942
- });
25943
- const leftOptions = computed(() => {
25944
- const selectedSet = new Set(leftSelected.value);
25945
- return [...missingExcludedIds.value.map((id) => toMissingOption(id, selectedSet)), ...filteredExcludedItems.value.map((item) => toListOption(item, selectedSet))];
25946
- });
25947
- const rightOptions = computed(() => {
25948
- const selectedSet = new Set(rightSelected.value);
25949
- return [...missingIncludedIds.value.map((id) => toMissingOption(id, selectedSet)), ...filteredIncludedItems.value.map((item) => toListOption(item, selectedSet))];
26000
+ accessory: item.accessory
25950
26001
  });
26002
+ const leftOptions = computed(() => [...missingExcludedIds.value.map(toMissingOption), ...filteredExcludedItems.value.map(toListOption)]);
26003
+ const rightOptions = computed(() => [...missingIncludedIds.value.map(toMissingOption), ...filteredIncludedItems.value.map(toListOption)]);
25951
26004
  const unknownValueOption = computed(() => ({
25952
26005
  text: __props.unknownValuesText,
25953
26006
  id: UNKNOWN_VALUE_ID
@@ -26087,7 +26140,7 @@ var TwinListBody_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
26087
26140
  }, 8, ["height", "min-height"]);
26088
26141
  };
26089
26142
  }
26090
- }), [["__scopeId", "data-v-7a9a2c2d"]]);
26143
+ }), [["__scopeId", "data-v-026f08a0"]]);
26091
26144
  //#endregion
26092
26145
  //#region src/components/forms/selects/TwinList/enums.ts
26093
26146
  var kdsTwinListSearchMode = {
@@ -26746,10 +26799,11 @@ var KdsInfoToggleButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
26746
26799
  const props = createPropsRestProxy(__props, ["hidden"]);
26747
26800
  const modelValue = useModel(__props, "modelValue");
26748
26801
  const popoverEl = useTemplateRef("popoverEl");
26802
+ const toggleButtonEl = useTemplateRef("toggleButton");
26749
26803
  const isHovered = ref(false);
26750
26804
  const isFocused = ref(false);
26751
26805
  return (_ctx, _cache) => {
26752
- return openBlock(), createElementBlock(Fragment, null, [withDirectives((openBlock(), createElementBlock("button", mergeProps(_ctx.$attrs, {
26806
+ return openBlock(), createElementBlock(Fragment, null, [withDirectives((openBlock(), createElementBlock("button", mergeProps({ ref: "toggleButton" }, _ctx.$attrs, {
26753
26807
  class: {
26754
26808
  "info-toggle-button": true,
26755
26809
  selected: modelValue.value,
@@ -26760,7 +26814,6 @@ var KdsInfoToggleButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
26760
26814
  "aria-expanded": modelValue.value,
26761
26815
  "aria-controls": popoverEl.value?.popoverId,
26762
26816
  "aria-haspopup": "dialog",
26763
- style: popoverEl.value?.anchorStyle,
26764
26817
  type: "button",
26765
26818
  onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value),
26766
26819
  onMouseenter: _cache[1] || (_cache[1] = ($event) => isHovered.value = true),
@@ -26776,6 +26829,7 @@ var KdsInfoToggleButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
26776
26829
  modelValue: modelValue.value,
26777
26830
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
26778
26831
  placement: "top-right",
26832
+ anchor: toggleButtonEl.value,
26779
26833
  role: "dialog",
26780
26834
  "aria-label": "Description"
26781
26835
  }, {
@@ -26787,14 +26841,14 @@ var KdsInfoToggleButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
26787
26841
  _: 3
26788
26842
  }, 8, ["content"])) : createCommentVNode("", true)]),
26789
26843
  _: 3
26790
- }, 8, ["modelValue"])], 64);
26844
+ }, 8, ["modelValue", "anchor"])], 64);
26791
26845
  };
26792
26846
  }
26793
26847
  });
26794
26848
  //#endregion
26795
26849
  //#region src/components/forms/_helper/InfoPopover/KdsInfoToggleButton.vue
26796
26850
  var KdsInfoToggleButton_exports = /* @__PURE__ */ __exportAll$1({ default: () => KdsInfoToggleButton_default });
26797
- var KdsInfoToggleButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(KdsInfoToggleButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e9c62ffb"]]);
26851
+ var KdsInfoToggleButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(KdsInfoToggleButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-3dd9df2b"]]);
26798
26852
  //#endregion
26799
26853
  //#region src/components/forms/_helper/VariablePopover/VariablePopover.vue?vue&type=script&setup=true&lang.ts
26800
26854
  var _hoisted_1$24 = {
@@ -26861,6 +26915,7 @@ var KdsVariableToggleButton_default = /*#__PURE__*/ _plugin_vue_export_helper_de
26861
26915
  /** Whether the variable popover is open. */
26862
26916
  const modelValue = useModel(__props, "modelValue");
26863
26917
  const popoverEl = useTemplateRef("popoverEl");
26918
+ const toggleButtonEl = useTemplateRef("toggleButton");
26864
26919
  const isHovered = ref(false);
26865
26920
  const isFocused = ref(false);
26866
26921
  const iconState = computed(() => {
@@ -26894,7 +26949,7 @@ var KdsVariableToggleButton_default = /*#__PURE__*/ _plugin_vue_export_helper_de
26894
26949
  return errorTitleByState[iconState.value] ?? baseTitle;
26895
26950
  });
26896
26951
  return (_ctx, _cache) => {
26897
- return openBlock(), createElementBlock(Fragment, null, [withDirectives((openBlock(), createElementBlock("button", mergeProps(_ctx.$attrs, {
26952
+ return openBlock(), createElementBlock(Fragment, null, [withDirectives((openBlock(), createElementBlock("button", mergeProps({ ref: "toggleButton" }, _ctx.$attrs, {
26898
26953
  class: {
26899
26954
  "variable-toggle-button": true,
26900
26955
  error: __props.error,
@@ -26906,7 +26961,6 @@ var KdsVariableToggleButton_default = /*#__PURE__*/ _plugin_vue_export_helper_de
26906
26961
  "aria-expanded": modelValue.value,
26907
26962
  "aria-controls": popoverEl.value?.popoverId,
26908
26963
  "aria-haspopup": "dialog",
26909
- style: popoverEl.value?.anchorStyle,
26910
26964
  type: "button",
26911
26965
  onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value),
26912
26966
  onMouseenter: _cache[1] || (_cache[1] = ($event) => isHovered.value = true),
@@ -26922,6 +26976,7 @@ var KdsVariableToggleButton_default = /*#__PURE__*/ _plugin_vue_export_helper_de
26922
26976
  modelValue: modelValue.value,
26923
26977
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
26924
26978
  placement: "bottom-right",
26979
+ anchor: toggleButtonEl.value,
26925
26980
  role: "dialog",
26926
26981
  "aria-label": "Flow Variable settings"
26927
26982
  }, {
@@ -26933,10 +26988,10 @@ var KdsVariableToggleButton_default = /*#__PURE__*/ _plugin_vue_export_helper_de
26933
26988
  _: 3
26934
26989
  }, 8, ["content"])) : createCommentVNode("", true)]),
26935
26990
  _: 3
26936
- }, 8, ["modelValue"])], 64);
26991
+ }, 8, ["modelValue", "anchor"])], 64);
26937
26992
  };
26938
26993
  }
26939
- }), [["__scopeId", "data-v-d4dead1b"]]);
26994
+ }), [["__scopeId", "data-v-c857bf47"]]);
26940
26995
  //#endregion
26941
26996
  //#region src/components/lists/Menu/KdsMenu.vue
26942
26997
  var KdsMenu_default = /* @__PURE__ */ defineComponent({
@@ -26953,7 +27008,7 @@ var KdsMenu_default = /* @__PURE__ */ defineComponent({
26953
27008
  const props = createPropsRestProxy(__props, ["variant", "menuMaxHeight"]);
26954
27009
  const emit = __emit;
26955
27010
  const isMenuOpen = ref(false);
26956
- const popoverEl = useTemplateRef("popover");
27011
+ const anchorEl = shallowRef(null);
26957
27012
  const menuContainerEl = useTemplateRef("menuContainer");
26958
27013
  const menuId = useId();
26959
27014
  watch(isMenuOpen, (_newVal, _oldVal, onCleanup) => {
@@ -26980,18 +27035,16 @@ var KdsMenu_default = /* @__PURE__ */ defineComponent({
26980
27035
  const toggle = () => {
26981
27036
  isMenuOpen.value = !isMenuOpen.value;
26982
27037
  };
26983
- const attrs = computed(() => {
26984
- const ariaAttrs = {
26985
- "aria-haspopup": "menu",
26986
- "aria-expanded": isMenuOpen.value,
26987
- "aria-controls": isMenuOpen.value ? menuId : void 0
26988
- };
26989
- if (!popoverEl.value) return ariaAttrs;
26990
- return {
26991
- ...ariaAttrs,
26992
- style: popoverEl.value.anchorStyle
26993
- };
26994
- });
27038
+ const setAnchor = (el) => {
27039
+ const element = el && "$el" in el ? el.$el : el;
27040
+ anchorEl.value = element instanceof HTMLElement ? element : null;
27041
+ };
27042
+ const attrs = computed(() => ({
27043
+ "aria-haspopup": "menu",
27044
+ "aria-expanded": isMenuOpen.value,
27045
+ "aria-controls": isMenuOpen.value ? menuId : void 0,
27046
+ ref: setAnchor
27047
+ }));
26995
27048
  const slots = useSlots();
26996
27049
  return (_ctx, _cache) => {
26997
27050
  return openBlock(), createElementBlock(Fragment, null, [renderSlot(_ctx.$slots, "default", {
@@ -27002,9 +27055,9 @@ var KdsMenu_default = /* @__PURE__ */ defineComponent({
27002
27055
  attrs: attrs.value
27003
27056
  }), Boolean(slots.default) ? (openBlock(), createBlock(KdsPopover_default, {
27004
27057
  key: 0,
27005
- ref: "popover",
27006
27058
  modelValue: isMenuOpen.value,
27007
27059
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isMenuOpen.value = $event),
27060
+ anchor: anchorEl.value,
27008
27061
  placement: "bottom-left",
27009
27062
  "popover-type": "auto",
27010
27063
  "aria-label": "Menu"
@@ -27026,7 +27079,7 @@ var KdsMenu_default = /* @__PURE__ */ defineComponent({
27026
27079
  "aria-label"
27027
27080
  ])) : createCommentVNode("", true)]),
27028
27081
  _: 1
27029
- }, 8, ["modelValue"])) : createCommentVNode("", true)], 64);
27082
+ }, 8, ["modelValue", "anchor"])) : createCommentVNode("", true)], 64);
27030
27083
  };
27031
27084
  }
27032
27085
  });
@@ -33925,7 +33978,7 @@ var ELEMENT_ID = "kds-file-explorer-context-menu-anchor-helper";
33925
33978
  var remove = () => {
33926
33979
  document.querySelector(`#${ELEMENT_ID}`)?.remove();
33927
33980
  };
33928
- var create = (top, left, anchorStyle) => {
33981
+ var create = (top, left) => {
33929
33982
  remove();
33930
33983
  const element = document.createElement("div");
33931
33984
  element.id = ELEMENT_ID;
@@ -33936,7 +33989,6 @@ var create = (top, left, anchorStyle) => {
33936
33989
  element.style.width = "0";
33937
33990
  element.style.height = "0";
33938
33991
  element.style.pointerEvents = "none";
33939
- Object.assign(element.style, anchorStyle);
33940
33992
  return element;
33941
33993
  };
33942
33994
  var popoverAnchor = {
@@ -33994,7 +34046,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
33994
34046
  "renameFile"
33995
34047
  ], ["update:activeRenamedItemId"]),
33996
34048
  setup(__props, { emit: __emit }) {
33997
- useCssVars((_ctx) => ({ "v2bc72e90": itemHeight.value + "px" }));
34049
+ useCssVars((_ctx) => ({ "v68199c92": itemHeight.value + "px" }));
33998
34050
  const props = __props;
33999
34051
  /** The id of the item currently being renamed. */
34000
34052
  const activeRenamedItemId = useModel(__props, "activeRenamedItemId");
@@ -34127,9 +34179,11 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
34127
34179
  });
34128
34180
  /** KEYBOARD NAV */
34129
34181
  const contextMenuAnchor = ref(null);
34182
+ const contextMenuAnchorEl = shallowRef(null);
34130
34183
  const closeContextMenu = (focusLastItem = true) => {
34131
34184
  if (!contextMenuAnchor.value) return;
34132
34185
  contextMenuAnchor.value = null;
34186
+ contextMenuAnchorEl.value = null;
34133
34187
  if (focusLastItem) focusIndex(focusedIndex.value, false);
34134
34188
  popoverAnchor.remove();
34135
34189
  };
@@ -34159,16 +34213,19 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
34159
34213
  };
34160
34214
  const openByOptionsMenu = (toggled, item, itemIndex) => {
34161
34215
  if (!props.contextMenuBuilder) return;
34162
- if (toggled) setContextMenuOpen(item, itemIndex, "optionsMenu");
34163
- else closeContextMenu();
34216
+ if (toggled) {
34217
+ contextMenuAnchorEl.value = getItemElement(itemIndex)?.querySelector("[aria-controls=\"file-explorer-options-menu\"]") ?? null;
34218
+ setContextMenuOpen(item, itemIndex, "optionsMenu");
34219
+ } else closeContextMenu();
34164
34220
  };
34165
34221
  const openContextMenuByMouse = async (event, clickedItem, index) => {
34166
34222
  if (!props.contextMenuBuilder) return;
34167
34223
  await new Promise((r) => setTimeout(r, 0));
34168
34224
  const rowElement = getItemElement(index);
34169
34225
  const { x, y } = rowElement.getBoundingClientRect();
34170
- const anchorElement = popoverAnchor.create(`${event.clientY - y}px`, `${event.clientX - x}px`, popover.value?.anchorStyle ?? {});
34226
+ const anchorElement = popoverAnchor.create(`${event.clientY - y}px`, `${event.clientX - x}px`);
34171
34227
  rowElement.appendChild(anchorElement);
34228
+ contextMenuAnchorEl.value = anchorElement;
34172
34229
  setContextMenuOpen(clickedItem, index, "mouse");
34173
34230
  };
34174
34231
  const openContextMenuByKeyboard = (clickedItem, index) => {
@@ -34176,8 +34233,9 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
34176
34233
  const rowElement = getItemElement(index);
34177
34234
  if (!rowElement) return;
34178
34235
  setContextMenuOpen(clickedItem, index, "keyboard");
34179
- const anchorElement = popoverAnchor.create("0px", "50%", popover.value?.anchorStyle ?? {});
34236
+ const anchorElement = popoverAnchor.create("0px", "50%");
34180
34237
  rowElement.appendChild(anchorElement);
34238
+ contextMenuAnchorEl.value = anchorElement;
34181
34239
  };
34182
34240
  const contextMenuItems = computed(() => {
34183
34241
  const anchor = contextMenuAnchor.value?.item;
@@ -34289,7 +34347,6 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
34289
34347
  "aria-haspopup": "menu",
34290
34348
  "aria-expanded": contextMenuAnchor.value?.item.id === item.id && contextMenuAnchor.value.openedBy === "optionsMenu",
34291
34349
  "aria-controls": "file-explorer-options-menu",
34292
- style: normalizeStyle(contextMenuAnchor.value?.openedBy === "optionsMenu" && contextMenuAnchor.value?.item.id === item.id ? popover.value?.anchorStyle : null),
34293
34350
  onClick: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"])),
34294
34351
  onPointerdown: _cache[6] || (_cache[6] = withModifiers(() => {}, ["stop"])),
34295
34352
  onDblclick: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"])),
@@ -34298,7 +34355,6 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
34298
34355
  "model-value",
34299
34356
  "size",
34300
34357
  "aria-expanded",
34301
- "style",
34302
34358
  "onUpdate:modelValue"
34303
34359
  ])]),
34304
34360
  key: "0"
@@ -34337,6 +34393,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
34337
34393
  ref_key: "popover",
34338
34394
  ref: popover,
34339
34395
  "popover-type": "manual",
34396
+ anchor: contextMenuAnchorEl.value,
34340
34397
  "model-value": Boolean(contextMenuAnchor.value && contextMenuItems.value.length > 0),
34341
34398
  placement: "bottom-left",
34342
34399
  "aria-label": "Menu",
@@ -34354,11 +34411,11 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
34354
34411
  onContextmenu: _cache[13] || (_cache[13] = withModifiers(() => {}, ["prevent", "stop"]))
34355
34412
  }, null, 8, ["items", "menu-max-height"])]),
34356
34413
  _: 1
34357
- }, 8, ["model-value"])
34414
+ }, 8, ["anchor", "model-value"])
34358
34415
  ]);
34359
34416
  };
34360
34417
  }
34361
- }), [["__scopeId", "data-v-d13e0460"]]);
34418
+ }), [["__scopeId", "data-v-26aa5225"]]);
34362
34419
  //#endregion
34363
34420
  //#region src/layouts/explorer/FileExplorer/enums.ts
34364
34421
  var kdsFileExplorerSize = {