@knime/kds-components 5.0.0 → 6.1.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 (34) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/{KdsIcon-VyfE1YXh.js → KdsIcon-Ci69AVx1.js} +2 -2
  3. package/dist/{KdsIcon-VyfE1YXh.js.map → KdsIcon-Ci69AVx1.js.map} +1 -1
  4. package/dist/{KdsPopover-FOQyEkHj.js → KdsPopover-DBU9xVEK.js} +9 -3
  5. package/dist/{KdsPopover-FOQyEkHj.js.map → KdsPopover-DBU9xVEK.js.map} +1 -1
  6. package/dist/index.css +59 -59
  7. package/dist/index.js +457 -446
  8. package/dist/index.js.map +1 -1
  9. package/dist/src/components/accessories/index.d.ts +0 -2
  10. package/dist/src/components/accessories/index.d.ts.map +1 -1
  11. package/dist/src/components/buttons/ActionButton/ActionButton.vue.d.ts +18 -0
  12. package/dist/src/components/buttons/ActionButton/ActionButton.vue.d.ts.map +1 -1
  13. package/dist/src/components/buttons/ActionButton/enums.d.ts +2 -1
  14. package/dist/src/components/buttons/ActionButton/enums.d.ts.map +1 -1
  15. package/dist/src/components/buttons/ActionButton/types.d.ts +10 -0
  16. package/dist/src/components/buttons/ActionButton/types.d.ts.map +1 -1
  17. package/dist/src/components/feedback/EmptyState/KdsEmptyState.vue.d.ts.map +1 -1
  18. package/dist/src/components/index.d.ts +2 -0
  19. package/dist/src/components/index.d.ts.map +1 -1
  20. package/dist/src/components/visualizations/DonutChart/KdsDonutChart.vue.d.ts.map +1 -0
  21. package/dist/src/components/visualizations/DonutChart/index.d.ts.map +1 -0
  22. package/dist/src/components/visualizations/DonutChart/types.d.ts.map +1 -0
  23. package/dist/src/components/visualizations/index.d.ts +3 -0
  24. package/dist/src/components/visualizations/index.d.ts.map +1 -0
  25. package/dist/src/util/useKdsDarkMode.d.ts +25 -8
  26. package/dist/src/util/useKdsDarkMode.d.ts.map +1 -1
  27. package/package.json +5 -5
  28. package/dist/_plugin-vue_export-helper-BOaGB7Aw.js +0 -8
  29. package/dist/src/components/accessories/DonutChart/KdsDonutChart.vue.d.ts.map +0 -1
  30. package/dist/src/components/accessories/DonutChart/index.d.ts.map +0 -1
  31. package/dist/src/components/accessories/DonutChart/types.d.ts.map +0 -1
  32. /package/dist/src/components/{accessories → visualizations}/DonutChart/KdsDonutChart.vue.d.ts +0 -0
  33. /package/dist/src/components/{accessories → visualizations}/DonutChart/index.d.ts +0 -0
  34. /package/dist/src/components/{accessories → visualizations}/DonutChart/types.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @knime/kds-components
2
2
 
3
+ ## 6.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - be0ffb8: `KdsEmptyState`: Support Split button
8
+
9
+ ### Patch Changes
10
+
11
+ - @knime/kds-styles@6.1.0
12
+
13
+ ## 6.0.0
14
+
15
+ ### Major Changes
16
+
17
+ - 3041c30: `useKdsDarkMode`: separate the user _preference_ from the _effective_ (rendered) state for clearer, self-documenting accessors.
18
+
19
+ **Breaking:** the preference accessors were renamed:
20
+
21
+ - `currentMode` → `preferredMode`
22
+ - `isDarkMode` → `isDarkPreferred`
23
+ - `isLightMode` → `isLightPreferred`
24
+ - `isSystemMode` → `isSystemPreferred`
25
+
26
+ New effective, read-only accessors resolve the `system` preference against the OS, so they reflect what is actually rendered — use these for JS/canvas theming (e.g. charts) that cannot rely on CSS `light-dark()`:
27
+
28
+ - `isDark`
29
+ - `isLight`
30
+
31
+ ### Patch Changes
32
+
33
+ - @knime/kds-styles@6.0.0
34
+
3
35
  ## 5.0.0
4
36
 
5
37
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
1
+ import { l as _plugin_vue_export_helper_default } from "./KdsPopover-DBU9xVEK.js";
2
2
  import { createBlock, createElementBlock, createPropsRestProxy, defineComponent, effectScope, markRaw, normalizeClass, openBlock, readonly, ref, resolveDynamicComponent, shallowRef, toRef, unref, watch } from "vue";
3
3
  import { useEventListener, useMutationObserver, useResizeObserver } from "@vueuse/core";
4
4
  import './KdsIcon.css';//#region src/util/useKdsIsTruncated.ts
@@ -593,4 +593,4 @@ var KdsIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
593
593
  //#endregion
594
594
  export { useKdsIsTruncated as a, elementOverflowsHorizontally as i, useIcon as n, vKdsTooltip as r, KdsIcon_default as t };
595
595
 
596
- //# sourceMappingURL=KdsIcon-VyfE1YXh.js.map
596
+ //# sourceMappingURL=KdsIcon-Ci69AVx1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KdsIcon-VyfE1YXh.js","names":[],"sources":["../src/util/useKdsIsTruncated.ts","../src/layouts/overlays/Tooltip/vKdsTooltip.ts","../src/components/accessories/Icon/useIcon.ts","../src/components/accessories/Icon/KdsIcon.vue","../src/components/accessories/Icon/KdsIcon.vue"],"sourcesContent":["import { type Ref, ref } from \"vue\";\nimport { useMutationObserver, useResizeObserver } from \"@vueuse/core\";\n\nexport function elementOverflowsHorizontally(\n element: HTMLElement | null,\n): boolean {\n if (!element) {\n return false;\n }\n return element.scrollWidth > element.clientWidth;\n}\n\nexport function elementOverflowsVertically(\n element: HTMLElement | null,\n): boolean {\n if (!element) {\n return false;\n }\n return element.scrollHeight > element.clientHeight;\n}\n\n/**\n * Tracks whether the content of an element is visually truncated.\n *\n * Detects both horizontal truncation (e.g. `text-overflow: ellipsis`)\n * and vertical truncation (e.g. `-webkit-line-clamp`).\n *\n * This can be used to set tooltips or other UI affordances when text is cut off.\n * Changing the size of the provided element based on this composable may result in an infinite loop!\n *\n * @param elementRef - A ref pointing to the element that might be truncated.\n * @returns An object containing a reactive `isTruncated` ref.\n */\nexport function useKdsIsTruncated(elementRef: Ref<HTMLElement | null>) {\n const isTruncated = ref(false);\n\n const checkTruncation = () => {\n isTruncated.value =\n elementOverflowsHorizontally(elementRef.value) ||\n elementOverflowsVertically(elementRef.value);\n };\n\n useResizeObserver(elementRef, checkTruncation);\n\n // Observe changes to the element's subtree, including text-node updates,\n // so content changes without size changes still re-check truncation.\n useMutationObserver(elementRef, checkTruncation, {\n childList: true,\n characterData: true,\n subtree: true,\n // Also observe attribute changes (especially class/style) that can affect\n // truncation without necessarily triggering a resize event.\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n\n return { isTruncated };\n}\n","import { type Directive, type DirectiveBinding, effectScope } from \"vue\";\nimport { useEventListener } from \"@vueuse/core\";\n\nimport {\n elementOverflowsHorizontally,\n elementOverflowsVertically,\n} from \"../../../util/useKdsIsTruncated\";\nimport \"./vKdsTooltip.css\";\n\ntype TooltipState = {\n popoverEl: HTMLDivElement;\n anchorName: string;\n showTimer: ReturnType<typeof setTimeout> | null;\n hideTimer: ReturnType<typeof setTimeout> | null;\n dismissed: boolean;\n visible: boolean;\n attached: boolean;\n scope: ReturnType<typeof effectScope>;\n};\n\nconst SHOW_DELAY = 450;\nconst HIDE_DELAY = 150;\n\nconst stateMap = new WeakMap<HTMLElement, TooltipState>();\n\nlet visibleCount = 0;\nlet currentVisible: TooltipState | null = null;\n\nexport function generateTooltipDiv(text: string): HTMLDivElement {\n const div = document.createElement(\"div\");\n div.classList.add(\"kds-tooltip\");\n div.textContent = text;\n return div;\n}\n\nfunction getText(binding: DirectiveBinding): string | null {\n const value = binding.value;\n if (value === null || value === undefined || value === \"\") {\n return null;\n }\n return String(value);\n}\n\nfunction isTruncatedMod(binding: DirectiveBinding): boolean {\n return binding.arg === \"truncated\";\n}\n\nfunction elementIsTruncated(el: HTMLElement | null): boolean {\n return elementOverflowsHorizontally(el) || elementOverflowsVertically(el);\n}\n\nfunction appendAnchorName(el: HTMLElement, anchorName: string) {\n const existing = el.style.getPropertyValue(\"anchor-name\");\n const names = existing\n ? existing\n .split(\",\")\n .map((n) => n.trim())\n .filter(Boolean)\n : [];\n if (!names.includes(anchorName)) {\n names.push(anchorName);\n }\n el.style.setProperty(\"anchor-name\", names.join(\", \"));\n}\n\nfunction removeAnchorName(el: HTMLElement, anchorName: string) {\n const existing = el.style.getPropertyValue(\"anchor-name\");\n const names = existing\n ? existing\n .split(\",\")\n .map((n) => n.trim())\n .filter((n) => n !== anchorName)\n : [];\n if (names.length > 0) {\n el.style.setProperty(\"anchor-name\", names.join(\", \"));\n } else {\n el.style.removeProperty(\"anchor-name\");\n }\n}\n\nfunction createPopover(\n triggerEl: HTMLElement,\n binding: DirectiveBinding,\n): { popover: HTMLDivElement; anchorName: string } {\n const popover = generateTooltipDiv(getText(binding) ?? \"\");\n popover.setAttribute(\"popover\", \"manual\");\n popover.setAttribute(\"role\", \"tooltip\");\n popover.setAttribute(\"aria-hidden\", \"true\");\n\n const id = `kds-tooltip-${crypto.randomUUID()}`;\n popover.id = id;\n\n if (!isTruncatedMod(binding)) {\n triggerEl.setAttribute(\"aria-describedby\", id);\n }\n\n const anchorName = `--kds-tooltip-anchor-${id}`;\n appendAnchorName(triggerEl, anchorName);\n\n popover.style.setProperty(\"position-anchor\", anchorName);\n\n return { popover, anchorName };\n}\n\nfunction attachPopover(triggerEl: Element, state: TooltipState) {\n if (state.attached) {\n return;\n }\n\n state.attached = true;\n // Appended to `document.body` (or shadow dom root node) to ensure element is decoupled from the Vue render\n // tree for the component using this directive. Otherwise, if inserted inside the render tree this can cause errors during\n // VDOM mutations (e.g v-if) because this element would have been inserted outside of Vue's internal updates\n const root = triggerEl.getRootNode();\n const appendBase = root === document ? document.body : root;\n appendBase.appendChild(state.popoverEl);\n}\n\nfunction detachPopover(state: TooltipState) {\n if (!state.attached) {\n return;\n }\n state.attached = false;\n state.popoverEl.remove();\n}\n\nfunction cancelTimers(state: TooltipState) {\n if (state.showTimer !== null) {\n clearTimeout(state.showTimer);\n state.showTimer = null;\n }\n if (state.hideTimer !== null) {\n clearTimeout(state.hideTimer);\n state.hideTimer = null;\n }\n}\n\nfunction hidePopover(state: TooltipState) {\n if (!state.visible) {\n return;\n }\n state.visible = false;\n visibleCount--;\n if (currentVisible === state) {\n currentVisible = null;\n }\n try {\n state.popoverEl.hidePopover();\n } catch {\n // ignore if already hidden or not connected\n }\n detachPopover(state);\n}\n\nfunction showPopover(triggerEl: HTMLElement, state: TooltipState) {\n if (state.visible) {\n return;\n }\n if (currentVisible && currentVisible !== state) {\n cancelTimers(currentVisible);\n hidePopover(currentVisible);\n }\n appendAnchorName(triggerEl, state.anchorName);\n attachPopover(triggerEl, state);\n try {\n state.popoverEl.showPopover();\n } catch {\n // ignore if already showing or not connected\n }\n state.visible = true;\n visibleCount++;\n currentVisible = state;\n}\n\nfunction scheduleShow(\n triggerEl: HTMLElement,\n state: TooltipState,\n delay: number,\n) {\n cancelTimers(state);\n if (state.dismissed) {\n return;\n }\n state.showTimer = setTimeout(() => {\n state.showTimer = null;\n showPopover(triggerEl, state);\n }, delay);\n}\n\nfunction scheduleHide(state: TooltipState) {\n cancelTimers(state);\n state.hideTimer = setTimeout(() => {\n state.hideTimer = null;\n hidePopover(state);\n }, HIDE_DELAY);\n}\n\nfunction mount(triggerEl: HTMLElement, binding: DirectiveBinding) {\n if (getText(binding) === null) {\n return;\n }\n\n const { popover: popoverEl, anchorName } = createPopover(triggerEl, binding);\n\n const state: TooltipState = {\n popoverEl,\n anchorName,\n showTimer: null,\n hideTimer: null,\n dismissed: false,\n visible: false,\n attached: false,\n scope: effectScope(),\n };\n\n stateMap.set(triggerEl, state);\n\n const onMouseEnter = () => {\n state.dismissed = false;\n if (isTruncatedMod(binding) && !elementIsTruncated(triggerEl)) {\n return;\n }\n const delay = visibleCount > 0 ? 0 : SHOW_DELAY;\n scheduleShow(triggerEl, state, delay);\n };\n\n const onMouseLeave = () => {\n scheduleHide(state);\n };\n\n const onFocusIn = () => {\n state.dismissed = false;\n if (isTruncatedMod(binding) && !elementIsTruncated(triggerEl)) {\n return;\n }\n if (triggerEl.matches(\":focus-visible\")) {\n scheduleShow(triggerEl, state, 0);\n }\n };\n\n const onFocusOut = () => {\n cancelTimers(state);\n hidePopover(state);\n };\n\n const onDocumentKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\" && state.visible) {\n cancelTimers(state);\n hidePopover(state);\n state.dismissed = true;\n }\n };\n\n const onPopoverMouseEnter = () => {\n cancelTimers(state);\n };\n\n const onPopoverMouseLeave = () => {\n scheduleHide(state);\n };\n\n const onScroll = () => {\n cancelTimers(state);\n if (state.visible) {\n hidePopover(state);\n }\n };\n\n state.scope.run(() => {\n useEventListener(triggerEl, \"mouseenter\", onMouseEnter);\n useEventListener(triggerEl, \"mouseleave\", onMouseLeave);\n useEventListener(triggerEl, \"focusin\", onFocusIn);\n useEventListener(triggerEl, \"focusout\", onFocusOut);\n useEventListener(document, \"keydown\", onDocumentKeyDown, true);\n useEventListener(document, \"scroll\", onScroll, true);\n\n useEventListener(popoverEl, \"mouseenter\", onPopoverMouseEnter);\n useEventListener(popoverEl, \"mouseleave\", onPopoverMouseLeave);\n });\n}\n\nfunction unmount(triggerEl: HTMLElement, binding?: DirectiveBinding) {\n const state = stateMap.get(triggerEl);\n if (state) {\n state.scope.stop();\n cancelTimers(state);\n hidePopover(state);\n removeAnchorName(triggerEl, state.anchorName);\n stateMap.delete(triggerEl);\n }\n\n if (!binding || !isTruncatedMod(binding)) {\n triggerEl.removeAttribute(\"aria-describedby\");\n }\n}\n\nexport const vKdsTooltip: Directive<HTMLElement> = {\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n mount(el, binding);\n },\n\n updated(el: HTMLElement, binding: DirectiveBinding) {\n const state = stateMap.get(el);\n const newText = getText(binding);\n\n if (newText === null) {\n if (state) {\n unmount(el, binding);\n }\n return;\n }\n\n if (!state) {\n mount(el, binding);\n return;\n }\n\n state.popoverEl.textContent = newText;\n },\n\n unmounted(el: HTMLElement, binding: DirectiveBinding) {\n unmount(el, binding);\n },\n};\n\n/** @internal Reset module-level state for tests */\nexport function _resetVisibleCount() {\n visibleCount = 0;\n currentVisible = null;\n}\n","import {\n type DefineComponent,\n type Ref,\n type ShallowRef,\n markRaw,\n readonly,\n shallowRef,\n watch,\n} from \"vue\";\n\nimport type { KdsIconStatus } from \"./types\";\n\n// Module-scoped caches shared across all `KdsIcon` instances.\nconst iconCache = new Map<string, DefineComponent>();\nconst iconLoadPromises = new Map<string, Promise<DefineComponent>>();\n\n/**\n * Test-only helper to reset the module-scoped icon caches between tests.\n * Not part of the public API.\n */\nexport function __resetIconCacheForTesting() {\n iconCache.clear();\n iconLoadPromises.clear();\n}\n\nfunction useIcon({\n name,\n folder,\n}: {\n name: Ref<string>;\n folder: \"icons\" | \"type-icons\";\n}): {\n iconComponent: Readonly<ShallowRef<DefineComponent | null>>;\n status: Readonly<ShallowRef<KdsIconStatus>>;\n} {\n const iconComponent = shallowRef<DefineComponent | null>(null);\n const status = shallowRef<KdsIconStatus>(\"loading\");\n\n watch(\n () => name.value,\n (newName) => {\n const cacheKey = `${folder}/${newName}`;\n\n if (iconCache.has(cacheKey)) {\n iconComponent.value = iconCache.get(cacheKey)!;\n status.value = \"loaded\";\n return;\n }\n\n status.value = \"loading\";\n\n // Deduplicate concurrent imports for the same icon so that rendering\n // many instances of the same icon at once only triggers a single\n // network request.\n let loadPromise = iconLoadPromises.get(cacheKey);\n if (!loadPromise) {\n // Do *not* change this code to use try/catch blocks:\n // try/catch relies on the async frame being intact when the rejection resumes.\n // Which might be gone due to vue teardown.\n // `.catch()` registers a reaction on the Promise's internal [[PromiseRejectReactions]]\n // slot directly, so it doesn't depend on a live call frame.\n loadPromise = import(\n `../../../../node_modules/@knime/kds-styles/dist/img/${folder}/${newName}.svg`\n )\n .then((module) => {\n const component = markRaw(module.default);\n iconCache.set(cacheKey, component);\n iconLoadPromises.delete(cacheKey);\n return component;\n })\n .catch((error) => {\n iconLoadPromises.delete(cacheKey);\n throw error;\n });\n iconLoadPromises.set(cacheKey, loadPromise);\n }\n\n loadPromise\n .then((component) => {\n // ignore stale resolutions if the name has changed in the meantime\n if (name.value !== newName) {\n return;\n }\n iconComponent.value = component;\n status.value = \"loaded\";\n })\n .catch((error) => {\n // do not log an abort, might happen due to teardown\n if (error.name === \"AbortError\") {\n return;\n }\n\n // ignore stale rejections if the name has changed in the meantime,\n // so we don't spam the console with errors for icons that are no\n // longer requested\n if (name.value !== newName) {\n return;\n }\n\n // eslint-disable-next-line no-console\n console.error(\n `Failed to load icon \"${newName}\" from folder \"${folder}\":`,\n error,\n );\n\n iconComponent.value = null;\n status.value = \"error\";\n });\n },\n { immediate: true },\n );\n\n return {\n iconComponent: readonly(iconComponent) as Readonly<\n ShallowRef<DefineComponent | null>\n >,\n status: readonly(status) as Readonly<ShallowRef<KdsIconStatus>>,\n };\n}\n\nexport default useIcon;\n","<script setup lang=\"ts\">\nimport { toRef } from \"vue\";\n\nimport type { KdsIconProps } from \"./types\";\nimport useIcon from \"./useIcon\";\n\n/**\n * Displays an icon from the KDS icon catalog. The icon color inherits the text\n * color of the parent element by default. When the `disabled` prop is set,\n * the color is overridden with the `kds.color.text-and-icon.disabled` token.\n */\nconst {\n size = \"medium\",\n disabled = false,\n ...props\n} = defineProps<KdsIconProps>();\n\nconst { iconComponent, status } = useIcon({\n name: toRef(() => props.name),\n folder: \"icons\",\n});\n\n/**\n * Reactive loading status of the icon module. Whenever `name` changes,\n * `status` becomes `\"loading\"` until it resolves to `\"loaded\"` or `\"error\"`\n * — so it can cycle through these states multiple times over the component's\n * lifetime (cached icons resolve synchronously to `\"loaded\"`). Useful for\n * consumers that need to coordinate rendering timing (e.g. wait for the icon\n * before measuring layout).\n */\ndefineExpose({ status });\n</script>\n\n<template>\n <component\n :is=\"iconComponent\"\n v-if=\"iconComponent\"\n :class=\"['kds-icon', size, { disabled }]\"\n :data-kds-icon-name=\"props.name\"\n aria-hidden=\"true\"\n focusable=\"false\"\n />\n <span\n v-else\n :class=\"['kds-icon', size, { disabled }]\"\n :data-kds-icon-name=\"props.name\"\n aria-hidden=\"true\"\n focusable=\"false\"\n />\n</template>\n\n<style scoped>\n@import url(\"./styles.css\");\n\n.kds-icon.disabled {\n color: var(--kds-color-text-and-icon-disabled);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { toRef } from \"vue\";\n\nimport type { KdsIconProps } from \"./types\";\nimport useIcon from \"./useIcon\";\n\n/**\n * Displays an icon from the KDS icon catalog. The icon color inherits the text\n * color of the parent element by default. When the `disabled` prop is set,\n * the color is overridden with the `kds.color.text-and-icon.disabled` token.\n */\nconst {\n size = \"medium\",\n disabled = false,\n ...props\n} = defineProps<KdsIconProps>();\n\nconst { iconComponent, status } = useIcon({\n name: toRef(() => props.name),\n folder: \"icons\",\n});\n\n/**\n * Reactive loading status of the icon module. Whenever `name` changes,\n * `status` becomes `\"loading\"` until it resolves to `\"loaded\"` or `\"error\"`\n * — so it can cycle through these states multiple times over the component's\n * lifetime (cached icons resolve synchronously to `\"loaded\"`). Useful for\n * consumers that need to coordinate rendering timing (e.g. wait for the icon\n * before measuring layout).\n */\ndefineExpose({ status });\n</script>\n\n<template>\n <component\n :is=\"iconComponent\"\n v-if=\"iconComponent\"\n :class=\"['kds-icon', size, { disabled }]\"\n :data-kds-icon-name=\"props.name\"\n aria-hidden=\"true\"\n focusable=\"false\"\n />\n <span\n v-else\n :class=\"['kds-icon', size, { disabled }]\"\n :data-kds-icon-name=\"props.name\"\n aria-hidden=\"true\"\n focusable=\"false\"\n />\n</template>\n\n<style scoped>\n@import url(\"./styles.css\");\n\n.kds-icon.disabled {\n color: var(--kds-color-text-and-icon-disabled);\n}\n</style>\n"],"mappings":";;;;AAGA,SAAgB,6BACd,SACS;CACT,IAAI,CAAC,SACH,OAAO;CAET,OAAO,QAAQ,cAAc,QAAQ;AACvC;AAEA,SAAgB,2BACd,SACS;CACT,IAAI,CAAC,SACH,OAAO;CAET,OAAO,QAAQ,eAAe,QAAQ;AACxC;;;;;;;;;;;;;AAcA,SAAgB,kBAAkB,YAAqC;CACrE,MAAM,cAAc,IAAI,KAAK;CAE7B,MAAM,wBAAwB;EAC5B,YAAY,QACV,6BAA6B,W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A,GAFR,YAOE,wBANK,MAAA,aAAA,CAAa,GAAA;;IAEjB,OAAK,eAAA;KAAA;KAAe,QAAA;KAAI,EAAA,UAAI,QAAA,SAAQ;IAAA,CAAA;IACpC,sBAAoB,MAAM;IAC3B,eAAY;IACZ,WAAU;iEAEZ,mBAME,QAAA;;IAJC,OAAK,eAAA;KAAA;KAAe,QAAA;KAAI,EAAA,UAAI,QAAA,SAAQ;IAAA,CAAA;IACpC,sBAAoB,MAAM;IAC3B,eAAY;IACZ,WAAU"}
1
+ {"version":3,"file":"KdsIcon-Ci69AVx1.js","names":[],"sources":["../src/util/useKdsIsTruncated.ts","../src/layouts/overlays/Tooltip/vKdsTooltip.ts","../src/components/accessories/Icon/useIcon.ts","../src/components/accessories/Icon/KdsIcon.vue","../src/components/accessories/Icon/KdsIcon.vue"],"sourcesContent":["import { type Ref, ref } from \"vue\";\nimport { useMutationObserver, useResizeObserver } from \"@vueuse/core\";\n\nexport function elementOverflowsHorizontally(\n element: HTMLElement | null,\n): boolean {\n if (!element) {\n return false;\n }\n return element.scrollWidth > element.clientWidth;\n}\n\nexport function elementOverflowsVertically(\n element: HTMLElement | null,\n): boolean {\n if (!element) {\n return false;\n }\n return element.scrollHeight > element.clientHeight;\n}\n\n/**\n * Tracks whether the content of an element is visually truncated.\n *\n * Detects both horizontal truncation (e.g. `text-overflow: ellipsis`)\n * and vertical truncation (e.g. `-webkit-line-clamp`).\n *\n * This can be used to set tooltips or other UI affordances when text is cut off.\n * Changing the size of the provided element based on this composable may result in an infinite loop!\n *\n * @param elementRef - A ref pointing to the element that might be truncated.\n * @returns An object containing a reactive `isTruncated` ref.\n */\nexport function useKdsIsTruncated(elementRef: Ref<HTMLElement | null>) {\n const isTruncated = ref(false);\n\n const checkTruncation = () => {\n isTruncated.value =\n elementOverflowsHorizontally(elementRef.value) ||\n elementOverflowsVertically(elementRef.value);\n };\n\n useResizeObserver(elementRef, checkTruncation);\n\n // Observe changes to the element's subtree, including text-node updates,\n // so content changes without size changes still re-check truncation.\n useMutationObserver(elementRef, checkTruncation, {\n childList: true,\n characterData: true,\n subtree: true,\n // Also observe attribute changes (especially class/style) that can affect\n // truncation without necessarily triggering a resize event.\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n\n return { isTruncated };\n}\n","import { type Directive, type DirectiveBinding, effectScope } from \"vue\";\nimport { useEventListener } from \"@vueuse/core\";\n\nimport {\n elementOverflowsHorizontally,\n elementOverflowsVertically,\n} from \"../../../util/useKdsIsTruncated\";\nimport \"./vKdsTooltip.css\";\n\ntype TooltipState = {\n popoverEl: HTMLDivElement;\n anchorName: string;\n showTimer: ReturnType<typeof setTimeout> | null;\n hideTimer: ReturnType<typeof setTimeout> | null;\n dismissed: boolean;\n visible: boolean;\n attached: boolean;\n scope: ReturnType<typeof effectScope>;\n};\n\nconst SHOW_DELAY = 450;\nconst HIDE_DELAY = 150;\n\nconst stateMap = new WeakMap<HTMLElement, TooltipState>();\n\nlet visibleCount = 0;\nlet currentVisible: TooltipState | null = null;\n\nexport function generateTooltipDiv(text: string): HTMLDivElement {\n const div = document.createElement(\"div\");\n div.classList.add(\"kds-tooltip\");\n div.textContent = text;\n return div;\n}\n\nfunction getText(binding: DirectiveBinding): string | null {\n const value = binding.value;\n if (value === null || value === undefined || value === \"\") {\n return null;\n }\n return String(value);\n}\n\nfunction isTruncatedMod(binding: DirectiveBinding): boolean {\n return binding.arg === \"truncated\";\n}\n\nfunction elementIsTruncated(el: HTMLElement | null): boolean {\n return elementOverflowsHorizontally(el) || elementOverflowsVertically(el);\n}\n\nfunction appendAnchorName(el: HTMLElement, anchorName: string) {\n const existing = el.style.getPropertyValue(\"anchor-name\");\n const names = existing\n ? existing\n .split(\",\")\n .map((n) => n.trim())\n .filter(Boolean)\n : [];\n if (!names.includes(anchorName)) {\n names.push(anchorName);\n }\n el.style.setProperty(\"anchor-name\", names.join(\", \"));\n}\n\nfunction removeAnchorName(el: HTMLElement, anchorName: string) {\n const existing = el.style.getPropertyValue(\"anchor-name\");\n const names = existing\n ? existing\n .split(\",\")\n .map((n) => n.trim())\n .filter((n) => n !== anchorName)\n : [];\n if (names.length > 0) {\n el.style.setProperty(\"anchor-name\", names.join(\", \"));\n } else {\n el.style.removeProperty(\"anchor-name\");\n }\n}\n\nfunction createPopover(\n triggerEl: HTMLElement,\n binding: DirectiveBinding,\n): { popover: HTMLDivElement; anchorName: string } {\n const popover = generateTooltipDiv(getText(binding) ?? \"\");\n popover.setAttribute(\"popover\", \"manual\");\n popover.setAttribute(\"role\", \"tooltip\");\n popover.setAttribute(\"aria-hidden\", \"true\");\n\n const id = `kds-tooltip-${crypto.randomUUID()}`;\n popover.id = id;\n\n if (!isTruncatedMod(binding)) {\n triggerEl.setAttribute(\"aria-describedby\", id);\n }\n\n const anchorName = `--kds-tooltip-anchor-${id}`;\n appendAnchorName(triggerEl, anchorName);\n\n popover.style.setProperty(\"position-anchor\", anchorName);\n\n return { popover, anchorName };\n}\n\nfunction attachPopover(triggerEl: Element, state: TooltipState) {\n if (state.attached) {\n return;\n }\n\n state.attached = true;\n // Appended to `document.body` (or shadow dom root node) to ensure element is decoupled from the Vue render\n // tree for the component using this directive. Otherwise, if inserted inside the render tree this can cause errors during\n // VDOM mutations (e.g v-if) because this element would have been inserted outside of Vue's internal updates\n const root = triggerEl.getRootNode();\n const appendBase = root === document ? document.body : root;\n appendBase.appendChild(state.popoverEl);\n}\n\nfunction detachPopover(state: TooltipState) {\n if (!state.attached) {\n return;\n }\n state.attached = false;\n state.popoverEl.remove();\n}\n\nfunction cancelTimers(state: TooltipState) {\n if (state.showTimer !== null) {\n clearTimeout(state.showTimer);\n state.showTimer = null;\n }\n if (state.hideTimer !== null) {\n clearTimeout(state.hideTimer);\n state.hideTimer = null;\n }\n}\n\nfunction hidePopover(state: TooltipState) {\n if (!state.visible) {\n return;\n }\n state.visible = false;\n visibleCount--;\n if (currentVisible === state) {\n currentVisible = null;\n }\n try {\n state.popoverEl.hidePopover();\n } catch {\n // ignore if already hidden or not connected\n }\n detachPopover(state);\n}\n\nfunction showPopover(triggerEl: HTMLElement, state: TooltipState) {\n if (state.visible) {\n return;\n }\n if (currentVisible && currentVisible !== state) {\n cancelTimers(currentVisible);\n hidePopover(currentVisible);\n }\n appendAnchorName(triggerEl, state.anchorName);\n attachPopover(triggerEl, state);\n try {\n state.popoverEl.showPopover();\n } catch {\n // ignore if already showing or not connected\n }\n state.visible = true;\n visibleCount++;\n currentVisible = state;\n}\n\nfunction scheduleShow(\n triggerEl: HTMLElement,\n state: TooltipState,\n delay: number,\n) {\n cancelTimers(state);\n if (state.dismissed) {\n return;\n }\n state.showTimer = setTimeout(() => {\n state.showTimer = null;\n showPopover(triggerEl, state);\n }, delay);\n}\n\nfunction scheduleHide(state: TooltipState) {\n cancelTimers(state);\n state.hideTimer = setTimeout(() => {\n state.hideTimer = null;\n hidePopover(state);\n }, HIDE_DELAY);\n}\n\nfunction mount(triggerEl: HTMLElement, binding: DirectiveBinding) {\n if (getText(binding) === null) {\n return;\n }\n\n const { popover: popoverEl, anchorName } = createPopover(triggerEl, binding);\n\n const state: TooltipState = {\n popoverEl,\n anchorName,\n showTimer: null,\n hideTimer: null,\n dismissed: false,\n visible: false,\n attached: false,\n scope: effectScope(),\n };\n\n stateMap.set(triggerEl, state);\n\n const onMouseEnter = () => {\n state.dismissed = false;\n if (isTruncatedMod(binding) && !elementIsTruncated(triggerEl)) {\n return;\n }\n const delay = visibleCount > 0 ? 0 : SHOW_DELAY;\n scheduleShow(triggerEl, state, delay);\n };\n\n const onMouseLeave = () => {\n scheduleHide(state);\n };\n\n const onFocusIn = () => {\n state.dismissed = false;\n if (isTruncatedMod(binding) && !elementIsTruncated(triggerEl)) {\n return;\n }\n if (triggerEl.matches(\":focus-visible\")) {\n scheduleShow(triggerEl, state, 0);\n }\n };\n\n const onFocusOut = () => {\n cancelTimers(state);\n hidePopover(state);\n };\n\n const onDocumentKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\" && state.visible) {\n cancelTimers(state);\n hidePopover(state);\n state.dismissed = true;\n }\n };\n\n const onPopoverMouseEnter = () => {\n cancelTimers(state);\n };\n\n const onPopoverMouseLeave = () => {\n scheduleHide(state);\n };\n\n const onScroll = () => {\n cancelTimers(state);\n if (state.visible) {\n hidePopover(state);\n }\n };\n\n state.scope.run(() => {\n useEventListener(triggerEl, \"mouseenter\", onMouseEnter);\n useEventListener(triggerEl, \"mouseleave\", onMouseLeave);\n useEventListener(triggerEl, \"focusin\", onFocusIn);\n useEventListener(triggerEl, \"focusout\", onFocusOut);\n useEventListener(document, \"keydown\", onDocumentKeyDown, true);\n useEventListener(document, \"scroll\", onScroll, true);\n\n useEventListener(popoverEl, \"mouseenter\", onPopoverMouseEnter);\n useEventListener(popoverEl, \"mouseleave\", onPopoverMouseLeave);\n });\n}\n\nfunction unmount(triggerEl: HTMLElement, binding?: DirectiveBinding) {\n const state = stateMap.get(triggerEl);\n if (state) {\n state.scope.stop();\n cancelTimers(state);\n hidePopover(state);\n removeAnchorName(triggerEl, state.anchorName);\n stateMap.delete(triggerEl);\n }\n\n if (!binding || !isTruncatedMod(binding)) {\n triggerEl.removeAttribute(\"aria-describedby\");\n }\n}\n\nexport const vKdsTooltip: Directive<HTMLElement> = {\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n mount(el, binding);\n },\n\n updated(el: HTMLElement, binding: DirectiveBinding) {\n const state = stateMap.get(el);\n const newText = getText(binding);\n\n if (newText === null) {\n if (state) {\n unmount(el, binding);\n }\n return;\n }\n\n if (!state) {\n mount(el, binding);\n return;\n }\n\n state.popoverEl.textContent = newText;\n },\n\n unmounted(el: HTMLElement, binding: DirectiveBinding) {\n unmount(el, binding);\n },\n};\n\n/** @internal Reset module-level state for tests */\nexport function _resetVisibleCount() {\n visibleCount = 0;\n currentVisible = null;\n}\n","import {\n type DefineComponent,\n type Ref,\n type ShallowRef,\n markRaw,\n readonly,\n shallowRef,\n watch,\n} from \"vue\";\n\nimport type { KdsIconStatus } from \"./types\";\n\n// Module-scoped caches shared across all `KdsIcon` instances.\nconst iconCache = new Map<string, DefineComponent>();\nconst iconLoadPromises = new Map<string, Promise<DefineComponent>>();\n\n/**\n * Test-only helper to reset the module-scoped icon caches between tests.\n * Not part of the public API.\n */\nexport function __resetIconCacheForTesting() {\n iconCache.clear();\n iconLoadPromises.clear();\n}\n\nfunction useIcon({\n name,\n folder,\n}: {\n name: Ref<string>;\n folder: \"icons\" | \"type-icons\";\n}): {\n iconComponent: Readonly<ShallowRef<DefineComponent | null>>;\n status: Readonly<ShallowRef<KdsIconStatus>>;\n} {\n const iconComponent = shallowRef<DefineComponent | null>(null);\n const status = shallowRef<KdsIconStatus>(\"loading\");\n\n watch(\n () => name.value,\n (newName) => {\n const cacheKey = `${folder}/${newName}`;\n\n if (iconCache.has(cacheKey)) {\n iconComponent.value = iconCache.get(cacheKey)!;\n status.value = \"loaded\";\n return;\n }\n\n status.value = \"loading\";\n\n // Deduplicate concurrent imports for the same icon so that rendering\n // many instances of the same icon at once only triggers a single\n // network request.\n let loadPromise = iconLoadPromises.get(cacheKey);\n if (!loadPromise) {\n // Do *not* change this code to use try/catch blocks:\n // try/catch relies on the async frame being intact when the rejection resumes.\n // Which might be gone due to vue teardown.\n // `.catch()` registers a reaction on the Promise's internal [[PromiseRejectReactions]]\n // slot directly, so it doesn't depend on a live call frame.\n loadPromise = import(\n `../../../../node_modules/@knime/kds-styles/dist/img/${folder}/${newName}.svg`\n )\n .then((module) => {\n const component = markRaw(module.default);\n iconCache.set(cacheKey, component);\n iconLoadPromises.delete(cacheKey);\n return component;\n })\n .catch((error) => {\n iconLoadPromises.delete(cacheKey);\n throw error;\n });\n iconLoadPromises.set(cacheKey, loadPromise);\n }\n\n loadPromise\n .then((component) => {\n // ignore stale resolutions if the name has changed in the meantime\n if (name.value !== newName) {\n return;\n }\n iconComponent.value = component;\n status.value = \"loaded\";\n })\n .catch((error) => {\n // do not log an abort, might happen due to teardown\n if (error.name === \"AbortError\") {\n return;\n }\n\n // ignore stale rejections if the name has changed in the meantime,\n // so we don't spam the console with errors for icons that are no\n // longer requested\n if (name.value !== newName) {\n return;\n }\n\n // eslint-disable-next-line no-console\n console.error(\n `Failed to load icon \"${newName}\" from folder \"${folder}\":`,\n error,\n );\n\n iconComponent.value = null;\n status.value = \"error\";\n });\n },\n { immediate: true },\n );\n\n return {\n iconComponent: readonly(iconComponent) as Readonly<\n ShallowRef<DefineComponent | null>\n >,\n status: readonly(status) as Readonly<ShallowRef<KdsIconStatus>>,\n };\n}\n\nexport default useIcon;\n","<script setup lang=\"ts\">\nimport { toRef } from \"vue\";\n\nimport type { KdsIconProps } from \"./types\";\nimport useIcon from \"./useIcon\";\n\n/**\n * Displays an icon from the KDS icon catalog. The icon color inherits the text\n * color of the parent element by default. When the `disabled` prop is set,\n * the color is overridden with the `kds.color.text-and-icon.disabled` token.\n */\nconst {\n size = \"medium\",\n disabled = false,\n ...props\n} = defineProps<KdsIconProps>();\n\nconst { iconComponent, status } = useIcon({\n name: toRef(() => props.name),\n folder: \"icons\",\n});\n\n/**\n * Reactive loading status of the icon module. Whenever `name` changes,\n * `status` becomes `\"loading\"` until it resolves to `\"loaded\"` or `\"error\"`\n * — so it can cycle through these states multiple times over the component's\n * lifetime (cached icons resolve synchronously to `\"loaded\"`). Useful for\n * consumers that need to coordinate rendering timing (e.g. wait for the icon\n * before measuring layout).\n */\ndefineExpose({ status });\n</script>\n\n<template>\n <component\n :is=\"iconComponent\"\n v-if=\"iconComponent\"\n :class=\"['kds-icon', size, { disabled }]\"\n :data-kds-icon-name=\"props.name\"\n aria-hidden=\"true\"\n focusable=\"false\"\n />\n <span\n v-else\n :class=\"['kds-icon', size, { disabled }]\"\n :data-kds-icon-name=\"props.name\"\n aria-hidden=\"true\"\n focusable=\"false\"\n />\n</template>\n\n<style scoped>\n@import url(\"./styles.css\");\n\n.kds-icon.disabled {\n color: var(--kds-color-text-and-icon-disabled);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { toRef } from \"vue\";\n\nimport type { KdsIconProps } from \"./types\";\nimport useIcon from \"./useIcon\";\n\n/**\n * Displays an icon from the KDS icon catalog. The icon color inherits the text\n * color of the parent element by default. When the `disabled` prop is set,\n * the color is overridden with the `kds.color.text-and-icon.disabled` token.\n */\nconst {\n size = \"medium\",\n disabled = false,\n ...props\n} = defineProps<KdsIconProps>();\n\nconst { iconComponent, status } = useIcon({\n name: toRef(() => props.name),\n folder: \"icons\",\n});\n\n/**\n * Reactive loading status of the icon module. Whenever `name` changes,\n * `status` becomes `\"loading\"` until it resolves to `\"loaded\"` or `\"error\"`\n * — so it can cycle through these states multiple times over the component's\n * lifetime (cached icons resolve synchronously to `\"loaded\"`). Useful for\n * consumers that need to coordinate rendering timing (e.g. wait for the icon\n * before measuring layout).\n */\ndefineExpose({ status });\n</script>\n\n<template>\n <component\n :is=\"iconComponent\"\n v-if=\"iconComponent\"\n :class=\"['kds-icon', size, { disabled }]\"\n :data-kds-icon-name=\"props.name\"\n aria-hidden=\"true\"\n focusable=\"false\"\n />\n <span\n v-else\n :class=\"['kds-icon', size, { disabled }]\"\n :data-kds-icon-name=\"props.name\"\n aria-hidden=\"true\"\n focusable=\"false\"\n />\n</template>\n\n<style scoped>\n@import url(\"./styles.css\");\n\n.kds-icon.disabled {\n color: var(--kds-color-text-and-icon-disabled);\n}\n</style>\n"],"mappings":";;;;AAGA,SAAgB,6BACd,SACS;CACT,IAAI,CAAC,SACH,OAAO;CAET,OAAO,QAAQ,cAAc,QAAQ;AACvC;AAEA,SAAgB,2BACd,SACS;CACT,IAAI,CAAC,SACH,OAAO;CAET,OAAO,QAAQ,eAAe,QAAQ;AACxC;;;;;;;;;;;;;AAcA,SAAgB,kBAAkB,YAAqC;CACrE,MAAM,cAAc,IAAI,KAAK;CAE7B,MAAM,wBAAwB;EAC5B,YAAY,QACV,6BAA6B,WAAW,KAAK,KAC7C,2BAA2B,WAAW,KAAK;CAC/C;CAEA,kBAAkB,YAAY,eAAe;CAI7C,oBAAoB,YAAY,iBAAi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,QAAA,SAAQ;IAAA,CAAA;IACpC,sBAAoB,MAAM;IAC3B,eAAY;IACZ,WAAU;iEAEZ,mBAME,QAAA;;IAJC,OAAK,eAAA;KAAA;KAAe,QAAA;KAAI,EAAA,UAAI,QAAA,SAAQ;IAAA,CAAA;IACpC,sBAAoB,MAAM;IAC3B,eAAY;IACZ,WAAU"}
@@ -1,4 +1,3 @@
1
- import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
2
1
  import { computed, createCommentVNode, createElementBlock, createPropsRestProxy, defineComponent, mergeModels, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString, unref, useId, useModel, useTemplateRef, watchEffect } from "vue";
3
2
  import './KdsPopover.css';//#region \0rolldown/runtime.js
4
3
  var __defProp = Object.defineProperty;
@@ -12,6 +11,13 @@ var __exportAll = (all, no_symbols) => {
12
11
  return target;
13
12
  };
14
13
  //#endregion
14
+ //#region \0plugin-vue:export-helper
15
+ var _plugin_vue_export_helper_default = (sfc, props) => {
16
+ const target = sfc.__vccOpts || sfc;
17
+ for (const [key, val] of props) target[key] = val;
18
+ return target;
19
+ };
20
+ //#endregion
15
21
  //#region src/layouts/overlays/Popover/enums.ts
16
22
  var kdsPopoverPlacement = {
17
23
  TOP_LEFT: "top-left",
@@ -133,6 +139,6 @@ var KdsPopover_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
133
139
  var KdsPopover_exports = /* @__PURE__ */ __exportAll({ default: () => KdsPopover_default });
134
140
  var KdsPopover_default = /*#__PURE__*/ _plugin_vue_export_helper_default(KdsPopover_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-0c5f19d1"]]);
135
141
  //#endregion
136
- export { kdsPopoverRole as a, kdsPopoverTypes as c, kdsPopoverPlacements as i, __exportAll as l, KdsPopover_exports as n, kdsPopoverRoles as o, kdsPopoverPlacement as r, kdsPopoverType as s, KdsPopover_default as t };
142
+ export { kdsPopoverRole as a, kdsPopoverTypes as c, kdsPopoverPlacements as i, _plugin_vue_export_helper_default as l, KdsPopover_exports as n, kdsPopoverRoles as o, kdsPopoverPlacement as r, kdsPopoverType as s, KdsPopover_default as t, __exportAll as u };
137
143
 
138
- //# sourceMappingURL=KdsPopover-FOQyEkHj.js.map
144
+ //# sourceMappingURL=KdsPopover-DBU9xVEK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KdsPopover-FOQyEkHj.js","names":[],"sources":["../src/layouts/overlays/Popover/enums.ts","../src/layouts/overlays/Popover/KdsPopover.vue","../src/layouts/overlays/Popover/KdsPopover.vue"],"sourcesContent":["export const kdsPopoverPlacement = {\n TOP_LEFT: \"top-left\",\n TOP_CENTER: \"top-center\",\n TOP_RIGHT: \"top-right\",\n BOTTOM_LEFT: \"bottom-left\",\n BOTTOM_CENTER: \"bottom-center\",\n BOTTOM_RIGHT: \"bottom-right\",\n CUSTOM: \"custom\",\n} as const;\n\nexport const kdsPopoverPlacements = Object.values(kdsPopoverPlacement);\n\nexport const kdsPopoverRole = {\n DIALOG: \"dialog\",\n MENU: \"menu\",\n LISTBOX: \"listbox\",\n} as const;\n\nexport const kdsPopoverRoles = Object.values(kdsPopoverRole);\n\nexport const kdsPopoverType = {\n AUTO: \"auto\",\n MANUAL: \"manual\",\n} as const;\n\nexport const kdsPopoverTypes = Object.values(kdsPopoverType);\n","<script setup lang=\"ts\">\nimport { computed, useId, useTemplateRef, watchEffect } from \"vue\";\n\nimport { kdsPopoverPlacement } from \"./enums\";\nimport type { KdsPopoverExpose, KdsPopoverProps } from \"./types\";\n\nconst {\n placement = \"bottom-left\",\n popoverType = \"auto\",\n fullWidth = false,\n maxInlineSize = undefined,\n stretchInline = false,\n ...props\n} = defineProps<KdsPopoverProps>();\n\n/** Whether the popover is open. */\nconst open = defineModel<boolean>({ default: false });\nconst popoverEl = useTemplateRef(\"popoverEl\");\n\nconst popoverId = useId();\nconst anchorName = `--anchor-${popoverId}`;\n\n// Sync the open state with the native popover element's open state\nwatchEffect(() => {\n if (open.value) {\n popoverEl.value?.showPopover?.();\n } else {\n popoverEl.value?.hidePopover?.();\n }\n});\n\nconst anchorStyle: Record<string, string> =\n placement === kdsPopoverPlacement.CUSTOM ? {} : { \"anchor-name\": anchorName };\n\nconst onToggle = (event: ToggleEvent) => {\n open.value = event.newState === \"open\";\n};\n\ndefineExpose<KdsPopoverExpose>({ anchorStyle, popoverId });\n\ndefineSlots<{\n /**\n * Custom content for the popover. When provided, overrides the `content` prop.\n */\n default(): unknown;\n}>();\n\nconst wrapperStyles = computed(() => {\n if (\n placement === kdsPopoverPlacement.CUSTOM &&\n props.customPlacementPosition\n ) {\n return {\n \"max-inline-size\": maxInlineSize,\n left: `${props.customPlacementPosition.x}px`,\n top: `${props.customPlacementPosition.y}px`,\n };\n }\n\n return {\n \"position-anchor\": anchorName,\n \"max-inline-size\": maxInlineSize,\n ...(stretchInline && { \"inset-inline-end\": \"0\", \"inline-size\": \"auto\" }),\n };\n});\n</script>\n\n<template>\n <div\n :id=\"popoverId\"\n ref=\"popoverEl\"\n class=\"kds-popover\"\n :class=\"['floating', placement, { 'full-width': fullWidth }]\"\n :popover=\"popoverType\"\n :style=\"wrapperStyles\"\n :role=\"props.role\"\n @toggle=\"onToggle\"\n >\n <slot>\n <div\n v-if=\"props.content?.trim().length\"\n class=\"kds-popover-default-content\"\n >\n {{ props.content }}\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.kds-popover {\n padding: 0;\n margin: 0;\n overflow: visible;\n font: inherit;\n color: inherit;\n background-color: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n\n &.full-width {\n min-inline-size: anchor-size(width);\n max-inline-size: anchor-size(width);\n }\n\n &.floating.top-right {\n inset: auto anchor(right) anchor(top) auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-top-left, --kds-popover-try-bottom-right,\n --kds-popover-try-bottom-left, --kds-popover-try-top-right;\n }\n\n &.floating.top-center {\n inset: auto 0 anchor(top);\n justify-self: anchor-center;\n margin: var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-bottom-center, --kds-popover-try-top-center;\n }\n\n &.floating.top-left {\n inset: auto auto anchor(top) anchor(left);\n margin: var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x) 0;\n position-try-fallbacks:\n --kds-popover-try-top-right, --kds-popover-try-bottom-left,\n --kds-popover-try-bottom-right, --kds-popover-try-top-left;\n }\n\n &.floating.bottom-right {\n inset: anchor(bottom) anchor(right) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-bottom-left, --kds-popover-try-top-right,\n --kds-popover-try-top-left, --kds-popover-try-bottom-right;\n }\n\n &.floating.bottom-center {\n inset: anchor(bottom) 0 auto;\n justify-self: anchor-center;\n margin: var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-top-center, --kds-popover-try-bottom-center;\n }\n\n &.floating.bottom-left {\n inset: anchor(bottom) auto auto anchor(left);\n margin: var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x) 0;\n position-try-fallbacks:\n --kds-popover-try-bottom-right, --kds-popover-try-top-left,\n --kds-popover-try-top-right, --kds-popover-try-bottom-left;\n }\n\n /*\n * For custom placement the popover is positioned statically via inline\n * left/top styles. Explicitly clear the UA default `inset: 0` so the\n * popover doesn't stretch to the viewport edges (which would break\n * light-dismiss / click-outside behavior).\n */\n &.floating.custom {\n position: fixed;\n inset: auto;\n margin: 0;\n }\n}\n\n@position-try --kds-popover-try-top-right {\n inset: auto anchor(right) anchor(top) auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n}\n\n@position-try --kds-popover-try-top-center {\n inset: auto auto anchor(top);\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-top-left {\n inset: auto auto anchor(top) anchor(left);\n margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-bottom-right {\n inset: anchor(bottom) anchor(right) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n}\n\n@position-try --kds-popover-try-bottom-center {\n inset: anchor(bottom) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-bottom-left {\n inset: anchor(bottom) auto auto anchor(left);\n margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) 0;\n}\n\n.kds-popover-default-content {\n padding: var(--kds-spacing-container-0-75x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n background-color: var(--kds-color-surface-default);\n border-radius: var(--kds-border-radius-container-0-37x);\n box-shadow: var(--kds-elevation-level-3);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, useId, useTemplateRef, watchEffect } from \"vue\";\n\nimport { kdsPopoverPlacement } from \"./enums\";\nimport type { KdsPopoverExpose, KdsPopoverProps } from \"./types\";\n\nconst {\n placement = \"bottom-left\",\n popoverType = \"auto\",\n fullWidth = false,\n maxInlineSize = undefined,\n stretchInline = false,\n ...props\n} = defineProps<KdsPopoverProps>();\n\n/** Whether the popover is open. */\nconst open = defineModel<boolean>({ default: false });\nconst popoverEl = useTemplateRef(\"popoverEl\");\n\nconst popoverId = useId();\nconst anchorName = `--anchor-${popoverId}`;\n\n// Sync the open state with the native popover element's open state\nwatchEffect(() => {\n if (open.value) {\n popoverEl.value?.showPopover?.();\n } else {\n popoverEl.value?.hidePopover?.();\n }\n});\n\nconst anchorStyle: Record<string, string> =\n placement === kdsPopoverPlacement.CUSTOM ? {} : { \"anchor-name\": anchorName };\n\nconst onToggle = (event: ToggleEvent) => {\n open.value = event.newState === \"open\";\n};\n\ndefineExpose<KdsPopoverExpose>({ anchorStyle, popoverId });\n\ndefineSlots<{\n /**\n * Custom content for the popover. When provided, overrides the `content` prop.\n */\n default(): unknown;\n}>();\n\nconst wrapperStyles = computed(() => {\n if (\n placement === kdsPopoverPlacement.CUSTOM &&\n props.customPlacementPosition\n ) {\n return {\n \"max-inline-size\": maxInlineSize,\n left: `${props.customPlacementPosition.x}px`,\n top: `${props.customPlacementPosition.y}px`,\n };\n }\n\n return {\n \"position-anchor\": anchorName,\n \"max-inline-size\": maxInlineSize,\n ...(stretchInline && { \"inset-inline-end\": \"0\", \"inline-size\": \"auto\" }),\n };\n});\n</script>\n\n<template>\n <div\n :id=\"popoverId\"\n ref=\"popoverEl\"\n class=\"kds-popover\"\n :class=\"['floating', placement, { 'full-width': fullWidth }]\"\n :popover=\"popoverType\"\n :style=\"wrapperStyles\"\n :role=\"props.role\"\n @toggle=\"onToggle\"\n >\n <slot>\n <div\n v-if=\"props.content?.trim().length\"\n class=\"kds-popover-default-content\"\n >\n {{ props.content }}\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.kds-popover {\n padding: 0;\n margin: 0;\n overflow: visible;\n font: inherit;\n color: inherit;\n background-color: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n\n &.full-width {\n min-inline-size: anchor-size(width);\n max-inline-size: anchor-size(width);\n }\n\n &.floating.top-right {\n inset: auto anchor(right) anchor(top) auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-top-left, --kds-popover-try-bottom-right,\n --kds-popover-try-bottom-left, --kds-popover-try-top-right;\n }\n\n &.floating.top-center {\n inset: auto 0 anchor(top);\n justify-self: anchor-center;\n margin: var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-bottom-center, --kds-popover-try-top-center;\n }\n\n &.floating.top-left {\n inset: auto auto anchor(top) anchor(left);\n margin: var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x) 0;\n position-try-fallbacks:\n --kds-popover-try-top-right, --kds-popover-try-bottom-left,\n --kds-popover-try-bottom-right, --kds-popover-try-top-left;\n }\n\n &.floating.bottom-right {\n inset: anchor(bottom) anchor(right) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-bottom-left, --kds-popover-try-top-right,\n --kds-popover-try-top-left, --kds-popover-try-bottom-right;\n }\n\n &.floating.bottom-center {\n inset: anchor(bottom) 0 auto;\n justify-self: anchor-center;\n margin: var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-top-center, --kds-popover-try-bottom-center;\n }\n\n &.floating.bottom-left {\n inset: anchor(bottom) auto auto anchor(left);\n margin: var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x) 0;\n position-try-fallbacks:\n --kds-popover-try-bottom-right, --kds-popover-try-top-left,\n --kds-popover-try-top-right, --kds-popover-try-bottom-left;\n }\n\n /*\n * For custom placement the popover is positioned statically via inline\n * left/top styles. Explicitly clear the UA default `inset: 0` so the\n * popover doesn't stretch to the viewport edges (which would break\n * light-dismiss / click-outside behavior).\n */\n &.floating.custom {\n position: fixed;\n inset: auto;\n margin: 0;\n }\n}\n\n@position-try --kds-popover-try-top-right {\n inset: auto anchor(right) anchor(top) auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n}\n\n@position-try --kds-popover-try-top-center {\n inset: auto auto anchor(top);\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-top-left {\n inset: auto auto anchor(top) anchor(left);\n margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-bottom-right {\n inset: anchor(bottom) anchor(right) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n}\n\n@position-try --kds-popover-try-bottom-center {\n inset: anchor(bottom) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-bottom-left {\n inset: anchor(bottom) auto auto anchor(left);\n margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) 0;\n}\n\n.kds-popover-default-content {\n padding: var(--kds-spacing-container-0-75x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n background-color: var(--kds-color-surface-default);\n border-radius: var(--kds-border-radius-container-0-37x);\n box-shadow: var(--kds-elevation-level-3);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAa,sBAAsB;CACjC,UAAU;CACV,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CACf,cAAc;CACd,QAAQ;AACV;AAEA,IAAa,uBAAuB,OAAO,OAAO,mBAAmB;AAErE,IAAa,iBAAiB;CAC5B,QAAQ;CACR,MAAM;CACN,SAAS;AACX;AAEA,IAAa,kBAAkB,OAAO,OAAO,cAAc;AAE3D,IAAa,iBAAiB;CAC5B,MAAM;CACN,QAAQ;AACV;AAEA,IAAa,kBAAkB,OAAO,OAAO,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECnB3D,MAAM,QAOF,qBAAA,SAAA;GAAA;GAAA;GAAA;GAAA;GAAA;EAAA,CAAA;;EAGJ,MAAM,OAAO,SAAoB,SAAA,YAAmB;EACpD,MAAM,YAAY,eAAe,WAAW;EAE5C,MAAM,YAAY,MAAM;EACxB,MAAM,aAAa,YAAY;EAG/B,kBAAkB;GAChB,IAAI,KAAK,OACP,UAAU,OAAO,cAAc;QAE/B,UAAU,OAAO,cAAc;EAEnC,CAAC;EAED,MAAM,cACJ,QAAA,cAAc,oBAAoB,SAAS,CAAC,IAAI,EAAE,eAAe,WAAW;EAE9E,MAAM,YAAY,UAAuB;GACvC,KAAK,QAAQ,MAAM,aAAa;EAClC;EAEA,SAA+B;GAAE;GAAa;EAAU,CAAC;EASzD,MAAM,gBAAgB,eAAe;GACnC,IACE,QAAA,cAAc,oBAAoB,UAClC,MAAM,yBAEN,OAAO;IACL,mBAAmB,QAAA;IACnB,MAAM,GAAG,MAAM,wBAAwB,EAAE;IACzC,KAAK,GAAG,MAAM,wBAAwB,EAAE;GAC1C;GAGF,OAAO;IACL,mBAAmB;IACnB,mBAAmB,QAAA;IACnB,GAAI,QAAA,iBAAiB;KAAE,oBAAoB;KAAK,eAAe;IAAO;GACxE;EACF,CAAC;;uBAIC,mBAkBM,OAAA;IAjBH,IAAI,MAAA,SAAA;aACD;IAAJ,KAAI;IACJ,OAAK,eAAA,CAAC,eAAa;KAAA;KACE,QAAA;KAAS,EAAA,cAAkB,QAAA,UAAS;IAAA,CAAA,CAAA;IACxD,SAAS,QAAA;IACT,OAAK,eAAE,cAAA,KAAa;IACpB,MAAM,MAAM;IACJ;OAET,WAOO,KAAA,QAAA,WAAA,CAAA,SAAA,CALG,MAAM,SAAS,KAAI,CAAA,CAAG,UAAA,UAAA,GAD9B,mBAKM,OALN,YAKM,gBADD,MAAM,OAAO,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,CAAA,GAAA,IAAA,UAAA"}
1
+ {"version":3,"file":"KdsPopover-DBU9xVEK.js","names":[],"sources":["../src/layouts/overlays/Popover/enums.ts","../src/layouts/overlays/Popover/KdsPopover.vue","../src/layouts/overlays/Popover/KdsPopover.vue"],"sourcesContent":["export const kdsPopoverPlacement = {\n TOP_LEFT: \"top-left\",\n TOP_CENTER: \"top-center\",\n TOP_RIGHT: \"top-right\",\n BOTTOM_LEFT: \"bottom-left\",\n BOTTOM_CENTER: \"bottom-center\",\n BOTTOM_RIGHT: \"bottom-right\",\n CUSTOM: \"custom\",\n} as const;\n\nexport const kdsPopoverPlacements = Object.values(kdsPopoverPlacement);\n\nexport const kdsPopoverRole = {\n DIALOG: \"dialog\",\n MENU: \"menu\",\n LISTBOX: \"listbox\",\n} as const;\n\nexport const kdsPopoverRoles = Object.values(kdsPopoverRole);\n\nexport const kdsPopoverType = {\n AUTO: \"auto\",\n MANUAL: \"manual\",\n} as const;\n\nexport const kdsPopoverTypes = Object.values(kdsPopoverType);\n","<script setup lang=\"ts\">\nimport { computed, useId, useTemplateRef, watchEffect } from \"vue\";\n\nimport { kdsPopoverPlacement } from \"./enums\";\nimport type { KdsPopoverExpose, KdsPopoverProps } from \"./types\";\n\nconst {\n placement = \"bottom-left\",\n popoverType = \"auto\",\n fullWidth = false,\n maxInlineSize = undefined,\n stretchInline = false,\n ...props\n} = defineProps<KdsPopoverProps>();\n\n/** Whether the popover is open. */\nconst open = defineModel<boolean>({ default: false });\nconst popoverEl = useTemplateRef(\"popoverEl\");\n\nconst popoverId = useId();\nconst anchorName = `--anchor-${popoverId}`;\n\n// Sync the open state with the native popover element's open state\nwatchEffect(() => {\n if (open.value) {\n popoverEl.value?.showPopover?.();\n } else {\n popoverEl.value?.hidePopover?.();\n }\n});\n\nconst anchorStyle: Record<string, string> =\n placement === kdsPopoverPlacement.CUSTOM ? {} : { \"anchor-name\": anchorName };\n\nconst onToggle = (event: ToggleEvent) => {\n open.value = event.newState === \"open\";\n};\n\ndefineExpose<KdsPopoverExpose>({ anchorStyle, popoverId });\n\ndefineSlots<{\n /**\n * Custom content for the popover. When provided, overrides the `content` prop.\n */\n default(): unknown;\n}>();\n\nconst wrapperStyles = computed(() => {\n if (\n placement === kdsPopoverPlacement.CUSTOM &&\n props.customPlacementPosition\n ) {\n return {\n \"max-inline-size\": maxInlineSize,\n left: `${props.customPlacementPosition.x}px`,\n top: `${props.customPlacementPosition.y}px`,\n };\n }\n\n return {\n \"position-anchor\": anchorName,\n \"max-inline-size\": maxInlineSize,\n ...(stretchInline && { \"inset-inline-end\": \"0\", \"inline-size\": \"auto\" }),\n };\n});\n</script>\n\n<template>\n <div\n :id=\"popoverId\"\n ref=\"popoverEl\"\n class=\"kds-popover\"\n :class=\"['floating', placement, { 'full-width': fullWidth }]\"\n :popover=\"popoverType\"\n :style=\"wrapperStyles\"\n :role=\"props.role\"\n @toggle=\"onToggle\"\n >\n <slot>\n <div\n v-if=\"props.content?.trim().length\"\n class=\"kds-popover-default-content\"\n >\n {{ props.content }}\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.kds-popover {\n padding: 0;\n margin: 0;\n overflow: visible;\n font: inherit;\n color: inherit;\n background-color: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n\n &.full-width {\n min-inline-size: anchor-size(width);\n max-inline-size: anchor-size(width);\n }\n\n &.floating.top-right {\n inset: auto anchor(right) anchor(top) auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-top-left, --kds-popover-try-bottom-right,\n --kds-popover-try-bottom-left, --kds-popover-try-top-right;\n }\n\n &.floating.top-center {\n inset: auto 0 anchor(top);\n justify-self: anchor-center;\n margin: var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-bottom-center, --kds-popover-try-top-center;\n }\n\n &.floating.top-left {\n inset: auto auto anchor(top) anchor(left);\n margin: var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x) 0;\n position-try-fallbacks:\n --kds-popover-try-top-right, --kds-popover-try-bottom-left,\n --kds-popover-try-bottom-right, --kds-popover-try-top-left;\n }\n\n &.floating.bottom-right {\n inset: anchor(bottom) anchor(right) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-bottom-left, --kds-popover-try-top-right,\n --kds-popover-try-top-left, --kds-popover-try-bottom-right;\n }\n\n &.floating.bottom-center {\n inset: anchor(bottom) 0 auto;\n justify-self: anchor-center;\n margin: var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-top-center, --kds-popover-try-bottom-center;\n }\n\n &.floating.bottom-left {\n inset: anchor(bottom) auto auto anchor(left);\n margin: var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x) 0;\n position-try-fallbacks:\n --kds-popover-try-bottom-right, --kds-popover-try-top-left,\n --kds-popover-try-top-right, --kds-popover-try-bottom-left;\n }\n\n /*\n * For custom placement the popover is positioned statically via inline\n * left/top styles. Explicitly clear the UA default `inset: 0` so the\n * popover doesn't stretch to the viewport edges (which would break\n * light-dismiss / click-outside behavior).\n */\n &.floating.custom {\n position: fixed;\n inset: auto;\n margin: 0;\n }\n}\n\n@position-try --kds-popover-try-top-right {\n inset: auto anchor(right) anchor(top) auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n}\n\n@position-try --kds-popover-try-top-center {\n inset: auto auto anchor(top);\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-top-left {\n inset: auto auto anchor(top) anchor(left);\n margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-bottom-right {\n inset: anchor(bottom) anchor(right) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n}\n\n@position-try --kds-popover-try-bottom-center {\n inset: anchor(bottom) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-bottom-left {\n inset: anchor(bottom) auto auto anchor(left);\n margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) 0;\n}\n\n.kds-popover-default-content {\n padding: var(--kds-spacing-container-0-75x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n background-color: var(--kds-color-surface-default);\n border-radius: var(--kds-border-radius-container-0-37x);\n box-shadow: var(--kds-elevation-level-3);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, useId, useTemplateRef, watchEffect } from \"vue\";\n\nimport { kdsPopoverPlacement } from \"./enums\";\nimport type { KdsPopoverExpose, KdsPopoverProps } from \"./types\";\n\nconst {\n placement = \"bottom-left\",\n popoverType = \"auto\",\n fullWidth = false,\n maxInlineSize = undefined,\n stretchInline = false,\n ...props\n} = defineProps<KdsPopoverProps>();\n\n/** Whether the popover is open. */\nconst open = defineModel<boolean>({ default: false });\nconst popoverEl = useTemplateRef(\"popoverEl\");\n\nconst popoverId = useId();\nconst anchorName = `--anchor-${popoverId}`;\n\n// Sync the open state with the native popover element's open state\nwatchEffect(() => {\n if (open.value) {\n popoverEl.value?.showPopover?.();\n } else {\n popoverEl.value?.hidePopover?.();\n }\n});\n\nconst anchorStyle: Record<string, string> =\n placement === kdsPopoverPlacement.CUSTOM ? {} : { \"anchor-name\": anchorName };\n\nconst onToggle = (event: ToggleEvent) => {\n open.value = event.newState === \"open\";\n};\n\ndefineExpose<KdsPopoverExpose>({ anchorStyle, popoverId });\n\ndefineSlots<{\n /**\n * Custom content for the popover. When provided, overrides the `content` prop.\n */\n default(): unknown;\n}>();\n\nconst wrapperStyles = computed(() => {\n if (\n placement === kdsPopoverPlacement.CUSTOM &&\n props.customPlacementPosition\n ) {\n return {\n \"max-inline-size\": maxInlineSize,\n left: `${props.customPlacementPosition.x}px`,\n top: `${props.customPlacementPosition.y}px`,\n };\n }\n\n return {\n \"position-anchor\": anchorName,\n \"max-inline-size\": maxInlineSize,\n ...(stretchInline && { \"inset-inline-end\": \"0\", \"inline-size\": \"auto\" }),\n };\n});\n</script>\n\n<template>\n <div\n :id=\"popoverId\"\n ref=\"popoverEl\"\n class=\"kds-popover\"\n :class=\"['floating', placement, { 'full-width': fullWidth }]\"\n :popover=\"popoverType\"\n :style=\"wrapperStyles\"\n :role=\"props.role\"\n @toggle=\"onToggle\"\n >\n <slot>\n <div\n v-if=\"props.content?.trim().length\"\n class=\"kds-popover-default-content\"\n >\n {{ props.content }}\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.kds-popover {\n padding: 0;\n margin: 0;\n overflow: visible;\n font: inherit;\n color: inherit;\n background-color: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n\n &.full-width {\n min-inline-size: anchor-size(width);\n max-inline-size: anchor-size(width);\n }\n\n &.floating.top-right {\n inset: auto anchor(right) anchor(top) auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-top-left, --kds-popover-try-bottom-right,\n --kds-popover-try-bottom-left, --kds-popover-try-top-right;\n }\n\n &.floating.top-center {\n inset: auto 0 anchor(top);\n justify-self: anchor-center;\n margin: var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-bottom-center, --kds-popover-try-top-center;\n }\n\n &.floating.top-left {\n inset: auto auto anchor(top) anchor(left);\n margin: var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x) 0;\n position-try-fallbacks:\n --kds-popover-try-top-right, --kds-popover-try-bottom-left,\n --kds-popover-try-bottom-right, --kds-popover-try-top-left;\n }\n\n &.floating.bottom-right {\n inset: anchor(bottom) anchor(right) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-bottom-left, --kds-popover-try-top-right,\n --kds-popover-try-top-left, --kds-popover-try-bottom-right;\n }\n\n &.floating.bottom-center {\n inset: anchor(bottom) 0 auto;\n justify-self: anchor-center;\n margin: var(--kds-spacing-container-0-25x);\n position-try-fallbacks:\n --kds-popover-try-top-center, --kds-popover-try-bottom-center;\n }\n\n &.floating.bottom-left {\n inset: anchor(bottom) auto auto anchor(left);\n margin: var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x) 0;\n position-try-fallbacks:\n --kds-popover-try-bottom-right, --kds-popover-try-top-left,\n --kds-popover-try-top-right, --kds-popover-try-bottom-left;\n }\n\n /*\n * For custom placement the popover is positioned statically via inline\n * left/top styles. Explicitly clear the UA default `inset: 0` so the\n * popover doesn't stretch to the viewport edges (which would break\n * light-dismiss / click-outside behavior).\n */\n &.floating.custom {\n position: fixed;\n inset: auto;\n margin: 0;\n }\n}\n\n@position-try --kds-popover-try-top-right {\n inset: auto anchor(right) anchor(top) auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n}\n\n@position-try --kds-popover-try-top-center {\n inset: auto auto anchor(top);\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-top-left {\n inset: auto auto anchor(top) anchor(left);\n margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-bottom-right {\n inset: anchor(bottom) anchor(right) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);\n}\n\n@position-try --kds-popover-try-bottom-center {\n inset: anchor(bottom) auto auto;\n margin: var(--kds-spacing-container-0-25x) 0\n var(--kds-spacing-container-0-25x) 0;\n}\n\n@position-try --kds-popover-try-bottom-left {\n inset: anchor(bottom) auto auto anchor(left);\n margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)\n var(--kds-spacing-container-0-25x) 0;\n}\n\n.kds-popover-default-content {\n padding: var(--kds-spacing-container-0-75x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n background-color: var(--kds-color-surface-default);\n border-radius: var(--kds-border-radius-container-0-37x);\n box-shadow: var(--kds-elevation-level-3);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAa,sBAAsB;CACjC,UAAU;CACV,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CACf,cAAc;CACd,QAAQ;AACV;AAEA,IAAa,uBAAuB,OAAO,OAAO,mBAAmB;AAErE,IAAa,iBAAiB;CAC5B,QAAQ;CACR,MAAM;CACN,SAAS;AACX;AAEA,IAAa,kBAAkB,OAAO,OAAO,cAAc;AAE3D,IAAa,iBAAiB;CAC5B,MAAM;CACN,QAAQ;AACV;AAEA,IAAa,kBAAkB,OAAO,OAAO,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECnB3D,MAAM,QAOF,qBAAA,SAAA;GAAA;GAAA;GAAA;GAAA;GAAA;EAAA,CAAA;;EAGJ,MAAM,OAAO,SAAoB,SAAA,YAAmB;EACpD,MAAM,YAAY,eAAe,WAAW;EAE5C,MAAM,YAAY,MAAM;EACxB,MAAM,aAAa,YAAY;EAG/B,kBAAkB;GAChB,IAAI,KAAK,OACP,UAAU,OAAO,cAAc;QAE/B,UAAU,OAAO,cAAc;EAEnC,CAAC;EAED,MAAM,cACJ,QAAA,cAAc,oBAAoB,SAAS,CAAC,IAAI,EAAE,eAAe,WAAW;EAE9E,MAAM,YAAY,UAAuB;GACvC,KAAK,QAAQ,MAAM,aAAa;EAClC;EAEA,SAA+B;GAAE;GAAa;EAAU,CAAC;EASzD,MAAM,gBAAgB,eAAe;GACnC,IACE,QAAA,cAAc,oBAAoB,UAClC,MAAM,yBAEN,OAAO;IACL,mBAAmB,QAAA;IACnB,MAAM,GAAG,MAAM,wBAAwB,EAAE;IACzC,KAAK,GAAG,MAAM,wBAAwB,EAAE;GAC1C;GAGF,OAAO;IACL,mBAAmB;IACnB,mBAAmB,QAAA;IACnB,GAAI,QAAA,iBAAiB;KAAE,oBAAoB;KAAK,eAAe;IAAO;GACxE;EACF,CAAC;;uBAIC,mBAkBM,OAAA;IAjBH,IAAI,MAAA,SAAA;aACD;IAAJ,KAAI;IACJ,OAAK,eAAA,CAAC,eAAa;KAAA;KACE,QAAA;KAAS,EAAA,cAAkB,QAAA,UAAS;IAAA,CAAA,CAAA;IACxD,SAAS,QAAA;IACT,OAAK,eAAE,cAAA,KAAa;IACpB,MAAM,MAAM;IACJ;OAET,WAOO,KAAA,QAAA,WAAA,CAAA,SAAA,CALG,MAAM,SAAS,KAAI,CAAA,CAAG,UAAA,UAAA,GAD9B,mBAKM,OALN,YAKM,gBADD,MAAM,OAAO,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,CAAA,GAAA,IAAA,UAAA"}
package/dist/index.css CHANGED
@@ -492,59 +492,6 @@ to {
492
492
  stroke-width: var(--kds-border-width-icon-stroke-s);
493
493
  }
494
494
 
495
- .donut-container {
496
- &[data-v-93590a62] {
497
- display: flex;
498
- gap: var(--kds-spacing-container-0-75x);
499
- align-items: center;
500
- }
501
- & .donut-chart {
502
- &[data-v-93590a62] {
503
- display: block;
504
- flex-shrink: 0;
505
- }
506
- & .background-circle[data-v-93590a62] {
507
- stroke: var(--kds-color-chart-data-track);
508
- }
509
- & .primary-circle[data-v-93590a62] {
510
- stroke: var(--kds-color-chart-data-series-1);
511
- }
512
- & .secondary-circle[data-v-93590a62] {
513
- stroke: var(--kds-color-chart-data-series-6);
514
- }
515
- & .value-wedge {
516
- &.animate[data-v-93590a62] {
517
- transition:
518
- stroke-dashoffset 0.5s,
519
- stroke 0.5s;
520
- }
521
- }
522
- }
523
- & .donut-text {
524
- &[data-v-93590a62] {
525
- display: flex;
526
- flex-direction: column;
527
- gap: var(--kds-spacing-container-0-12x);
528
- overflow: hidden;
529
- color: var(--kds-color-text-and-icon-neutral);
530
- }
531
- & .title[data-v-93590a62] {
532
- overflow: hidden;
533
- text-overflow: ellipsis;
534
- font: var(--kds-font-base-title-medium-strong);
535
- white-space: nowrap;
536
- }
537
- & .sub-text[data-v-93590a62] {
538
- display: -webkit-box;
539
- overflow: hidden;
540
- -webkit-line-clamp: 2;
541
- line-clamp: 2;
542
- font: var(--kds-font-base-subtext-medium);
543
- -webkit-box-orient: vertical;
544
- }
545
- }
546
- }
547
-
548
495
  .kds-highlighted-text[data-v-a2202598] {
549
496
  display: inline;
550
497
  }
@@ -1639,7 +1586,7 @@ li {
1639
1586
  }
1640
1587
  }
1641
1588
 
1642
- .kds-empty-state[data-v-539aaf69] {
1589
+ .kds-empty-state[data-v-e9b806e2] {
1643
1590
  display: flex;
1644
1591
  flex-direction: column;
1645
1592
  gap: var(--kds-spacing-container-0-5x);
@@ -1648,19 +1595,19 @@ li {
1648
1595
  max-width: 280px;
1649
1596
  padding: var(--kds-spacing-container-0-5x);
1650
1597
  }
1651
- .kds-empty-state-headline[data-v-539aaf69] {
1598
+ .kds-empty-state-headline[data-v-e9b806e2] {
1652
1599
  margin: 0;
1653
1600
  font: var(--kds-font-base-title-small);
1654
1601
  color: var(--kds-color-text-and-icon-muted);
1655
1602
  text-align: center;
1656
1603
  }
1657
- .kds-empty-state-description[data-v-539aaf69] {
1604
+ .kds-empty-state-description[data-v-e9b806e2] {
1658
1605
  margin: 0;
1659
1606
  font: var(--kds-font-base-body-small);
1660
1607
  color: var(--kds-color-text-and-icon-muted);
1661
1608
  text-align: center;
1662
1609
  }
1663
- .kds-empty-state-action[data-v-539aaf69] {
1610
+ .kds-empty-state-action[data-v-e9b806e2] {
1664
1611
  display: flex;
1665
1612
  flex-wrap: wrap;
1666
1613
  gap: var(--kds-spacing-container-0-5x);
@@ -1670,8 +1617,8 @@ li {
1670
1617
  margin-top: var(--kds-spacing-container-0-12x);
1671
1618
  }
1672
1619
  .kds-empty-state.disabled {
1673
- & .kds-empty-state-headline[data-v-539aaf69],
1674
- & .kds-empty-state-description[data-v-539aaf69] {
1620
+ & .kds-empty-state-headline[data-v-e9b806e2],
1621
+ & .kds-empty-state-description[data-v-e9b806e2] {
1675
1622
  color: var(--kds-color-text-and-icon-disabled);
1676
1623
  }
1677
1624
  }
@@ -3782,6 +3729,59 @@ td {
3782
3729
  }
3783
3730
  }
3784
3731
 
3732
+ .donut-container {
3733
+ &[data-v-9fb87f23] {
3734
+ display: flex;
3735
+ gap: var(--kds-spacing-container-0-75x);
3736
+ align-items: center;
3737
+ }
3738
+ & .donut-chart {
3739
+ &[data-v-9fb87f23] {
3740
+ display: block;
3741
+ flex-shrink: 0;
3742
+ }
3743
+ & .background-circle[data-v-9fb87f23] {
3744
+ stroke: var(--kds-color-chart-data-track);
3745
+ }
3746
+ & .primary-circle[data-v-9fb87f23] {
3747
+ stroke: var(--kds-color-chart-data-series-1);
3748
+ }
3749
+ & .secondary-circle[data-v-9fb87f23] {
3750
+ stroke: var(--kds-color-chart-data-series-6);
3751
+ }
3752
+ & .value-wedge {
3753
+ &.animate[data-v-9fb87f23] {
3754
+ transition:
3755
+ stroke-dashoffset 0.5s,
3756
+ stroke 0.5s;
3757
+ }
3758
+ }
3759
+ }
3760
+ & .donut-text {
3761
+ &[data-v-9fb87f23] {
3762
+ display: flex;
3763
+ flex-direction: column;
3764
+ gap: var(--kds-spacing-container-0-12x);
3765
+ overflow: hidden;
3766
+ color: var(--kds-color-text-and-icon-neutral);
3767
+ }
3768
+ & .title[data-v-9fb87f23] {
3769
+ overflow: hidden;
3770
+ text-overflow: ellipsis;
3771
+ font: var(--kds-font-base-title-medium-strong);
3772
+ white-space: nowrap;
3773
+ }
3774
+ & .sub-text[data-v-9fb87f23] {
3775
+ display: -webkit-box;
3776
+ overflow: hidden;
3777
+ -webkit-line-clamp: 2;
3778
+ line-clamp: 2;
3779
+ font: var(--kds-font-base-subtext-medium);
3780
+ -webkit-box-orient: vertical;
3781
+ }
3782
+ }
3783
+ }
3784
+
3785
3785
  .kds-card-header {
3786
3786
  &[data-v-d61f7a65] {
3787
3787
  display: flex;