@knime/kds-components 0.6.6 → 0.7.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 (111) hide show
  1. package/dist/accessories/Avatar/KdsAvatar.vue.d.ts +7 -0
  2. package/dist/accessories/Avatar/KdsAvatar.vue.d.ts.map +1 -0
  3. package/dist/accessories/Avatar/demo-logo.d.ts +2 -0
  4. package/dist/accessories/Avatar/demo-logo.d.ts.map +1 -0
  5. package/dist/accessories/Avatar/demo-user.d.ts +2 -0
  6. package/dist/accessories/Avatar/demo-user.d.ts.map +1 -0
  7. package/dist/accessories/Avatar/types.d.ts +9 -0
  8. package/dist/accessories/Avatar/types.d.ts.map +1 -0
  9. package/dist/accessories/ColorSwatch/KdsColorSwatch.vue.d.ts +6 -0
  10. package/dist/accessories/ColorSwatch/KdsColorSwatch.vue.d.ts.map +1 -0
  11. package/dist/accessories/ColorSwatch/types.d.ts +20 -0
  12. package/dist/accessories/ColorSwatch/types.d.ts.map +1 -0
  13. package/dist/accessories/Icon/IdToIconNameMapping.d.ts.map +1 -0
  14. package/dist/accessories/Icon/KdsDataType.vue.d.ts.map +1 -0
  15. package/dist/accessories/Icon/KdsIcon.vue.d.ts.map +1 -0
  16. package/dist/accessories/Icon/constants.d.ts.map +1 -0
  17. package/dist/accessories/Icon/types.d.ts.map +1 -0
  18. package/dist/accessories/Icon/useIcon.d.ts.map +1 -0
  19. package/dist/accessories/LoadingSpinner/KdsLoadingSpinner.vue.d.ts +7 -0
  20. package/dist/accessories/LoadingSpinner/KdsLoadingSpinner.vue.d.ts.map +1 -0
  21. package/dist/accessories/LoadingSpinner/types.d.ts +7 -0
  22. package/dist/accessories/LoadingSpinner/types.d.ts.map +1 -0
  23. package/dist/accessories/index.d.ts +10 -0
  24. package/dist/accessories/index.d.ts.map +1 -0
  25. package/dist/buttons/types.d.ts +1 -1
  26. package/dist/buttons/types.d.ts.map +1 -1
  27. package/dist/cloud-pending-changes-BooMof3w.js +23 -0
  28. package/dist/cloud-pending-changes-BooMof3w.js.map +1 -0
  29. package/dist/{cloud-synced-Cjce2vj8.js → cloud-synced-BLkZpZpi.js} +2 -2
  30. package/dist/cloud-synced-BLkZpZpi.js.map +1 -0
  31. package/dist/deploy-D2iGlU6g.js +24 -0
  32. package/dist/deploy-D2iGlU6g.js.map +1 -0
  33. package/dist/forms/BaseFormFieldWrapper.vue.d.ts +39 -0
  34. package/dist/forms/BaseFormFieldWrapper.vue.d.ts.map +1 -0
  35. package/dist/forms/KdsSubText.vue.d.ts +1 -0
  36. package/dist/forms/KdsSubText.vue.d.ts.map +1 -1
  37. package/dist/forms/RadioButton/types.d.ts +1 -1
  38. package/dist/forms/RadioButton/types.d.ts.map +1 -1
  39. package/dist/forms/index.d.ts +6 -0
  40. package/dist/forms/index.d.ts.map +1 -1
  41. package/dist/forms/inputs/BaseInput.vue.d.ts +180 -0
  42. package/dist/forms/inputs/BaseInput.vue.d.ts.map +1 -0
  43. package/dist/forms/inputs/NumberInput/KdsNumberInput.vue.d.ts +3 -0
  44. package/dist/forms/inputs/NumberInput/KdsNumberInput.vue.d.ts.map +1 -0
  45. package/dist/forms/inputs/NumberInput/numberParser.d.ts +26 -0
  46. package/dist/forms/inputs/NumberInput/numberParser.d.ts.map +1 -0
  47. package/dist/forms/inputs/PatternInput/KdsPatternInput.vue.d.ts +3 -0
  48. package/dist/forms/inputs/PatternInput/KdsPatternInput.vue.d.ts.map +1 -0
  49. package/dist/forms/inputs/PatternInput/patternRegex.d.ts +10 -0
  50. package/dist/forms/inputs/PatternInput/patternRegex.d.ts.map +1 -0
  51. package/dist/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts +3 -0
  52. package/dist/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts.map +1 -0
  53. package/dist/forms/inputs/TextInput/KdsTextInput.vue.d.ts +3 -0
  54. package/dist/forms/inputs/TextInput/KdsTextInput.vue.d.ts.map +1 -0
  55. package/dist/forms/inputs/Textarea/KdsTextarea.vue.d.ts +3 -0
  56. package/dist/forms/inputs/Textarea/KdsTextarea.vue.d.ts.map +1 -0
  57. package/dist/forms/inputs/types.d.ts +60 -0
  58. package/dist/forms/inputs/types.d.ts.map +1 -0
  59. package/dist/forms/types.d.ts +30 -1
  60. package/dist/forms/types.d.ts.map +1 -1
  61. package/dist/index.css +748 -438
  62. package/dist/index.d.ts +4 -9
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +2602 -1510
  65. package/dist/index.js.map +1 -1
  66. package/dist/overlays/Modal/KdsDynamicModalProvider.vue.d.ts.map +1 -0
  67. package/dist/{Modal → overlays/Modal}/KdsModal.vue.d.ts +4 -4
  68. package/dist/overlays/Modal/KdsModal.vue.d.ts.map +1 -0
  69. package/dist/overlays/Modal/KdsModalLayout.vue.d.ts.map +1 -0
  70. package/dist/overlays/Modal/constants.d.ts.map +1 -0
  71. package/dist/{Modal → overlays/Modal}/types.d.ts +1 -1
  72. package/dist/overlays/Modal/types.d.ts.map +1 -0
  73. package/dist/{Modal → overlays/Modal}/useKdsDynamicModal.d.ts +10 -10
  74. package/dist/overlays/Modal/useKdsDynamicModal.d.ts.map +1 -0
  75. package/dist/overlays/Popover/KdsPopover.vue.d.ts +33 -0
  76. package/dist/overlays/Popover/KdsPopover.vue.d.ts.map +1 -0
  77. package/dist/overlays/Popover/constants.d.ts +2 -0
  78. package/dist/overlays/Popover/constants.d.ts.map +1 -0
  79. package/dist/overlays/Popover/types.d.ts +22 -0
  80. package/dist/overlays/Popover/types.d.ts.map +1 -0
  81. package/dist/overlays/index.d.ts +8 -0
  82. package/dist/overlays/index.d.ts.map +1 -0
  83. package/package.json +2 -2
  84. package/dist/Icon/IdToIconNameMapping.d.ts.map +0 -1
  85. package/dist/Icon/KdsDataType.vue.d.ts.map +0 -1
  86. package/dist/Icon/KdsIcon.vue.d.ts.map +0 -1
  87. package/dist/Icon/constants.d.ts.map +0 -1
  88. package/dist/Icon/types.d.ts.map +0 -1
  89. package/dist/Icon/useIcon.d.ts.map +0 -1
  90. package/dist/LoadingSpinner/KdsLoadingSpinner.vue.d.ts +0 -12
  91. package/dist/LoadingSpinner/KdsLoadingSpinner.vue.d.ts.map +0 -1
  92. package/dist/Modal/KdsDynamicModalProvider.vue.d.ts.map +0 -1
  93. package/dist/Modal/KdsModal.vue.d.ts.map +0 -1
  94. package/dist/Modal/KdsModalLayout.vue.d.ts.map +0 -1
  95. package/dist/Modal/constants.d.ts.map +0 -1
  96. package/dist/Modal/types.d.ts.map +0 -1
  97. package/dist/Modal/useKdsDynamicModal.d.ts.map +0 -1
  98. package/dist/cloud-pending-changes-C8wAwPD4.js +0 -24
  99. package/dist/cloud-pending-changes-C8wAwPD4.js.map +0 -1
  100. package/dist/cloud-synced-Cjce2vj8.js.map +0 -1
  101. package/dist/deploy-BHUT6hCi.js +0 -23
  102. package/dist/deploy-BHUT6hCi.js.map +0 -1
  103. /package/dist/{Icon → accessories/Icon}/IdToIconNameMapping.d.ts +0 -0
  104. /package/dist/{Icon → accessories/Icon}/KdsDataType.vue.d.ts +0 -0
  105. /package/dist/{Icon → accessories/Icon}/KdsIcon.vue.d.ts +0 -0
  106. /package/dist/{Icon → accessories/Icon}/constants.d.ts +0 -0
  107. /package/dist/{Icon → accessories/Icon}/types.d.ts +0 -0
  108. /package/dist/{Icon → accessories/Icon}/useIcon.d.ts +0 -0
  109. /package/dist/{Modal → overlays/Modal}/KdsDynamicModalProvider.vue.d.ts +0 -0
  110. /package/dist/{Modal → overlays/Modal}/KdsModalLayout.vue.d.ts +0 -0
  111. /package/dist/{Modal → overlays/Modal}/constants.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { shallowRef, watch, defineComponent, toRef, createBlock, createElementBlock, unref, openBlock, resolveDynamicComponent, normalizeClass, computed, withCtx, renderSlot, createCommentVNode, toDisplayString, mergeProps, h, useSlots, getCurrentInstance, createElementVNode, mergeDefaults, useCssVars, Fragment, createVNode, useTemplateRef, nextTick, ref, withModifiers, mergeModels, useModel, useId, createSlots, renderList, normalizeProps, guardReactiveProps, normalizeStyle, onBeforeUpdate } from 'vue';
1
+ import { shallowRef, watch, defineComponent, toRef, createBlock, createElementBlock, unref, openBlock, resolveDynamicComponent, normalizeClass, computed, withCtx, renderSlot, createCommentVNode, toDisplayString, mergeProps, h, useSlots, getCurrentInstance, createElementVNode, normalizeStyle, ref, mergeModels, useModel, createVNode, useId, Fragment, renderList, onBeforeUpdate, nextTick, withModifiers, normalizeProps, guardReactiveProps, withDirectives, vModelText, mergeDefaults, useCssVars, useTemplateRef, createSlots, onBeforeUnmount } from 'vue';
2
2
  import { isDefined, useLocalStorage, useDark, usePreferredDark, useResizeObserver, useElementSize } from '@vueuse/core';
3
3
 
4
4
  import './index.css';const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
@@ -23,7 +23,7 @@ const useIcon = ({
23
23
  return;
24
24
  }
25
25
  try {
26
- const module = await __variableDynamicImportRuntimeHelper((/* #__PURE__ */ Object.assign({"../../node_modules/@knime/kds-styles/dist/img/icons/add-user.svg": () => import('./add-user-CKh821Ew.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/ai-general.svg": () => import('./ai-general-BLr5A_aB.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/annotation-mode.svg": () => import('./annotation-mode-Bjz8Qppm.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/arrow-down.svg": () => import('./arrow-down-bUAuaj-3.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/arrow-up.svg": () => import('./arrow-up-DijAlYdp.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/arrows-expand.svg": () => import('./arrows-expand-CnIMh7ew.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/arrows-move.svg": () => import('./arrows-move-CffWTJnH.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/arrows-order.svg": () => import('./arrows-order-BqV36RNU.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/back.svg": () => import('./back-Z2SKFWyw.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/bold.svg": () => import('./bold-DpdJk_QB.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/calendar.svg": () => import('./calendar-CXPcZjcq.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/case-sensitive.svg": () => import('./case-sensitive-CuFLLxLY.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/center-aligned.svg": () => import('./center-aligned-DmzJR-NU.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/checkmark.svg": () => import('./checkmark-CZPkBFNO.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/chevron-down.svg": () => import('./chevron-down-DNWYMX6r.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/chevron-left-double.svg": () => import('./chevron-left-double-BXvJmoi2.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/chevron-left.svg": () => import('./chevron-left-o-UW2wMT.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/chevron-right-double.svg": () => import('./chevron-right-double-DfHg2w84.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/chevron-right.svg": () => import('./chevron-right-B24wRG6X.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/chevron-up.svg": () => import('./chevron-up-D1Rj9v1I.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/circle-error.svg": () => import('./circle-error-BKcmt7Jv.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/circle-info.svg": () => import('./circle-info-UvZ8z7Uk.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/circle-question.svg": () => import('./circle-question-C49esbF6.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/circle-success.svg": () => import('./circle-success-Deiv-aEI.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/cloud-download.svg": () => import('./cloud-download-D3Swor59.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/cloud-knime.svg": () => import('./cloud-knime-Ck0CYEpC.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/cloud-pending-changes.svg": () => import('./cloud-pending-changes-C8wAwPD4.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/cloud-synced.svg": () => import('./cloud-synced-Cjce2vj8.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/cloud-upload.svg": () => import('./cloud-upload-1cKBYCE_.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/cloud-workflow.svg": () => import('./cloud-workflow-bbXOzeON.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/code-block.svg": () => import('./code-block-DxROkcSh.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/color-picker.svg": () => import('./color-picker-DKT2VkYj.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/comment.svg": () => import('./comment-_ajO8mxh.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/component.svg": () => import('./component-xJ6doeqN.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/connection.svg": () => import('./connection-CPQhki0y.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/copy.svg": () => import('./copy-D_dQ00WJ.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/cursor.svg": () => import('./cursor-CWY-Sqb_.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/data-app.svg": () => import('./data-app-wBNobXat.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/data-value-view.svg": () => import('./data-value-view-C07X6BM3.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/date-time.svg": () => import('./date-time-D2BP5E5r.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/db-database.svg": () => import('./db-database-DxsIVO4X.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/db-schema.svg": () => import('./db-schema-Bv0_IT9E.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/db-table-view.svg": () => import('./db-table-view-B0xGvbnv.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/db-table.svg": () => import('./db-table-B7h4pOv1.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/deploy.svg": () => import('./deploy-BHUT6hCi.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/detect.svg": () => import('./detect-Bsk4HlM_.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/divider.svg": () => import('./divider-Syv30InM.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/duration.svg": () => import('./duration-DaP7U33c.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/edit.svg": () => import('./edit-Bo5vgzi3.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/education.svg": () => import('./education-B3hKB2rv.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/error-panel.svg": () => import('./error-panel-CTRd3uUe.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/execute-all.svg": () => import('./execute-all-Cd4o8ar9.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/execute.svg": () => import('./execute-CaiPLywW.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/expand-panel.svg": () => import('./expand-panel-DOMlQ0h4.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/extension-community.svg": () => import('./extension-community-Dbck6In6.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/extension.svg": () => import('./extension-0bpmRL2f.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/external-link.svg": () => import('./external-link-Da9nbkS3.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/eye.svg": () => import('./eye-BaEvu1WZ.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/file-export.svg": () => import('./file-export-Cg1pIaBd.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/file-text.svg": () => import('./file-text-C64HMtpY.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/file.svg": () => import('./file-Pkm1PSyQ.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/filter.svg": () => import('./filter-C91sigZW.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/flow-variable-default.svg": () => import('./flow-variable-default-DvWtfW9d.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/flow-variable-in-out.svg": () => import('./flow-variable-in-out-BnxZMi1-.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/flow-variable-in.svg": () => import('./flow-variable-in-C30aVoZ6.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/flow-variable-out.svg": () => import('./flow-variable-out-CSpUvaoJ.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/folder-plus.svg": () => import('./folder-plus-DU8k1EXL.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/folder-workflow.svg": () => import('./folder-workflow-DjPcer5V.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/folder.svg": () => import('./folder-CbSKJZv-.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/forum.svg": () => import('./forum-EjZCrpeY.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/function-catalog.svg": () => import('./function-catalog-BtaFW_Ag.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/home.svg": () => import('./home-iE7RmW5y.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/import.svg": () => import('./import-B57fag-w.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/info.svg": () => import('./info-Ct2oj9rt.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/interval.svg": () => import('./interval-DdbkHCkr.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/italic.svg": () => import('./italic-D-X25dao.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/key.svg": () => import('./key-BVmvoGXA.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/layout-editor.svg": () => import('./layout-editor-CrJYLsDK.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/left-aligned.svg": () => import('./left-aligned-BbOktUi8.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/like.svg": () => import('./like-PH-Btifn.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/limit.svg": () => import('./limit-DhWVMRX6.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/link.svg": () => import('./link-UgkqQsRt.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/linked-metanode.svg": () => import('./linked-metanode-HsMQlCgq.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/list-bulletpoint.svg": () => import('./list-bulletpoint-BVaXqx4f.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/list-number.svg": () => import('./list-number-CNqcTLYo.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/list-thumbs.svg": () => import('./list-thumbs-M7r_75-H.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/list.svg": () => import('./list-Byrs5aZs.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/local-filesystem.svg": () => import('./local-filesystem-hArfE0_N.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/lock.svg": () => import('./lock-C0pCLYaC.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/metanode.svg": () => import('./metanode-Cl_lQPOl.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/mini-map.svg": () => import('./mini-map-ivG9u5W4.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/minimize-dialog.svg": () => import('./minimize-dialog-CWg57-1w.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/minimize-side-panel.svg": () => import('./minimize-side-panel-Brx7aXNg.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/minus.svg": () => import('./minus-Bl_XdZTq.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/more-actions.svg": () => import('./more-actions-CUQHQnhr.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/node-stack.svg": () => import('./node-stack-BIw49e13.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/nodes-align-horiz.svg": () => import('./nodes-align-horiz-Bxl0AKfj.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/nodes-align-vert.svg": () => import('./nodes-align-vert-D8h7LLpV.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/open-in-new-window.svg": () => import('./open-in-new-window-zf7vlHFV.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/pan-mode.svg": () => import('./pan-mode-DqMDNpGh.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/parameter.svg": () => import('./parameter-BwgLWZ40.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/pending-changes.svg": () => import('./pending-changes-CYs0jWRx.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/placeholder.svg": () => import('./placeholder-6jSUL5uH.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/plus.svg": () => import('./plus-Cj7d9fzE.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/quote.svg": () => import('./quote-B_HXPGC-.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/re-execution.svg": () => import('./re-execution-C4Ssn4oh.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/redo.svg": () => import('./redo-DvRm89Y1.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/regex.svg": () => import('./regex-v3KtSGhe.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/reload.svg": () => import('./reload-aBy3xEuk.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/rename.svg": () => import('./rename-CR6_WgYs.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/replace.svg": () => import('./replace-D6ui4Ubg.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/reset-all.svg": () => import('./reset-all-D3A6ORrn.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/resume-execution.svg": () => import('./resume-execution--1RD1SK-.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/right-aligned.svg": () => import('./right-aligned-BQuVIUi8.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/rocket.svg": () => import('./rocket-CcUk0w4I.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/save-as.svg": () => import('./save-as-lIdGETry.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/save.svg": () => import('./save-BTSBDcKz.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/schedule.svg": () => import('./schedule-CuWWu-oZ.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/search.svg": () => import('./search-Bzzp4jaj.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/secret-store.svg": () => import('./secret-store-CtLqpWMg.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/selected-cancel.svg": () => import('./selected-cancel-yt7eew8_.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/selected-execution.svg": () => import('./selected-execution-Dt9jKAcj.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/selected-reset.svg": () => import('./selected-reset-DlGgo4-Y.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/send.svg": () => import('./send-C9YzInMZ.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/server-rack-workflow.svg": () => import('./server-rack-workflow-dCwu7vTW.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/service.svg": () => import('./service-BT3SUkgO.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/settings.svg": () => import('./settings-CGgJkEgj.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/share.svg": () => import('./share-BdSOCq4T.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/shortcuts.svg": () => import('./shortcuts-Bu3KkyH3.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/sort-ascending.svg": () => import('./sort-ascending-wLoBiuk_.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/sort-descending.svg": () => import('./sort-descending-DZiglaz4.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/space-local.svg": () => import('./space-local-Df_W3Vix.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/space-private.svg": () => import('./space-private-BcygS3TM.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/space.svg": () => import('./space-hkXDtlC1.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/stepwise-execution.svg": () => import('./stepwise-execution-DNdkTRdo.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/strikethrough.svg": () => import('./strikethrough-DaE8BLGf.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/team.svg": () => import('./team-D1-xShh0.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/text.svg": () => import('./text-DMmr6LRp.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/textstyles.svg": () => import('./textstyles-DHJzC-et.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/thumbs-down.svg": () => import('./thumbs-down-xRvAE_oG.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/thumbs-up.svg": () => import('./thumbs-up-9YwRlf60.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/time.svg": () => import('./time-Tei7g5mN.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/to-bottom.svg": () => import('./to-bottom-1s_2X-cB.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/to-top.svg": () => import('./to-top-CtkBPtAa.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/trash.svg": () => import('./trash-CXGtMBy1.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/trigger.svg": () => import('./trigger-wL8HC16Y.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/underline.svg": () => import('./underline-B6XEgMkQ.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/undo.svg": () => import('./undo-DaXvDNyj.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/unlink.svg": () => import('./unlink-BY0X0cix.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/user.svg": () => import('./user-df6HsMaZ.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/version.svg": () => import('./version-B-5dHgvX.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/view-cards.svg": () => import('./view-cards-BTGqIH1C.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/warning.svg": () => import('./warning-BEoXGKC2.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/workflow.svg": () => import('./workflow-B6CQgLEB.js'),"../../node_modules/@knime/kds-styles/dist/img/icons/x-close.svg": () => import('./x-close-BU1wJ08h.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/audio-datatype.svg": () => import('./audio-datatype-BqJYr0fU.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/binary-object-datatype.svg": () => import('./binary-object-datatype-Du-zhxKy.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/bit-byte-vector-datatype.svg": () => import('./bit-byte-vector-datatype-DRoDVhzx.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/boolean-datatype.svg": () => import('./boolean-datatype-BLejL9wT.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/collection-list-datatype.svg": () => import('./collection-list-datatype-tv5ebdN1.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/collection-set-datatype.svg": () => import('./collection-set-datatype-BmEIjJCx.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/date-datatype.svg": () => import('./date-datatype-CbrXJIDR.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/date-time-local-datatype.svg": () => import('./date-time-local-datatype-Dn57eC5p.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/date-time-zoned-datatype.svg": () => import('./date-time-zoned-datatype-BC0SFQAD.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/default-extension-datatype.svg": () => import('./default-extension-datatype-EJXM_Ybz.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/document-datatype.svg": () => import('./document-datatype-BSz1qTHq.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/duration-date-based-datatype.svg": () => import('./duration-date-based-datatype-D6prx57n.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/duration-time-based-datatype.svg": () => import('./duration-time-based-datatype-4Ik-Vr8Q.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/geo-datatype.svg": () => import('./geo-datatype-CFu0R3vj.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/helm-datatype.svg": () => import('./helm-datatype-BWAUZ-Tt.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/image-png-datatype.svg": () => import('./image-png-datatype-XLrsdl_K.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/image-svg-datatype.svg": () => import('./image-svg-datatype-Sc-uI6FI.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/json-datatype.svg": () => import('./json-datatype-CK5bFgQy.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/labeling-datatype.svg": () => import('./labeling-datatype-DubVeYXo.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/linear-notation-molecule.svg": () => import('./linear-notation-molecule-B9JUyQef.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/message-datatype.svg": () => import('./message-datatype-BMeR1nv4.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/microscope.svg": () => import('./microscope-Cr49onew.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/model-pmml-datatype.svg": () => import('./model-pmml-datatype-IGnc5zXz.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/molecule.svg": () => import('./molecule-C9PFhX46.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/number-double-datatype.svg": () => import('./number-double-datatype-iI23azce.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/number-double-vector-datatype.svg": () => import('./number-double-vector-datatype-BtktW2zE.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/number-integer-datatype.svg": () => import('./number-integer-datatype-ncI7X7Aw.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/path-datatype.svg": () => import('./path-datatype-UYcAhyjv.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/string-datatype.svg": () => import('./string-datatype-BFdqZnvv.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/string-vector-datatype.svg": () => import('./string-vector-datatype-QXJ-Dq9M.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/subgraph-datatype.svg": () => import('./subgraph-datatype-BHUfkFAl.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/term-datatype.svg": () => import('./term-datatype-fRf65x34.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/test-tube.svg": () => import('./test-tube-dmblmo83.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/time-datatype.svg": () => import('./time-datatype-Dx_gZrr5.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/tool-datatype.svg": () => import('./tool-datatype-CscnJaLg.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/unknown-datatype.svg": () => import('./unknown-datatype-HVRhR0XQ.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/uri-datatype.svg": () => import('./uri-datatype-COo2A9Ig.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-boolean.svg": () => import('./variable-boolean-Del5rqMV.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-collection-boolean.svg": () => import('./variable-collection-boolean-ClvKyQes.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-collection-double.svg": () => import('./variable-collection-double-D9bZO46e.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-collection-integer.svg": () => import('./variable-collection-integer-Bz4v0C4x.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-collection-string.svg": () => import('./variable-collection-string-2mgywfSS.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-conda-environment.svg": () => import('./variable-conda-environment-Hrl_-hfW.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-credential.svg": () => import('./variable-credential-D_kLfXY5.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-integer.svg": () => import('./variable-integer-5fC6qM5I.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-number-double.svg": () => import('./variable-number-double-DwTKGyps.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-path.svg": () => import('./variable-path-DTYcIIg9.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-string.svg": () => import('./variable-string-BVXOfIgy.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-unknown.svg": () => import('./variable-unknown-DLlsEO5w.js'),"../../node_modules/@knime/kds-styles/dist/img/type-icons/xml-datatype.svg": () => import('./xml-datatype-BymvkSrS.js')})), `../../node_modules/@knime/kds-styles/dist/img/${folder}/${newName}.svg`, 9);
26
+ const module = await __variableDynamicImportRuntimeHelper((/* #__PURE__ */ Object.assign({"../../../node_modules/@knime/kds-styles/dist/img/icons/add-user.svg": () => import('./add-user-CKh821Ew.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/ai-general.svg": () => import('./ai-general-BLr5A_aB.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/annotation-mode.svg": () => import('./annotation-mode-Bjz8Qppm.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/arrow-down.svg": () => import('./arrow-down-bUAuaj-3.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/arrow-up.svg": () => import('./arrow-up-DijAlYdp.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/arrows-expand.svg": () => import('./arrows-expand-CnIMh7ew.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/arrows-move.svg": () => import('./arrows-move-CffWTJnH.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/arrows-order.svg": () => import('./arrows-order-BqV36RNU.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/back.svg": () => import('./back-Z2SKFWyw.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/bold.svg": () => import('./bold-DpdJk_QB.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/calendar.svg": () => import('./calendar-CXPcZjcq.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/case-sensitive.svg": () => import('./case-sensitive-CuFLLxLY.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/center-aligned.svg": () => import('./center-aligned-DmzJR-NU.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/checkmark.svg": () => import('./checkmark-CZPkBFNO.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/chevron-down.svg": () => import('./chevron-down-DNWYMX6r.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/chevron-left-double.svg": () => import('./chevron-left-double-BXvJmoi2.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/chevron-left.svg": () => import('./chevron-left-o-UW2wMT.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/chevron-right-double.svg": () => import('./chevron-right-double-DfHg2w84.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/chevron-right.svg": () => import('./chevron-right-B24wRG6X.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/chevron-up.svg": () => import('./chevron-up-D1Rj9v1I.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/circle-error.svg": () => import('./circle-error-BKcmt7Jv.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/circle-info.svg": () => import('./circle-info-UvZ8z7Uk.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/circle-question.svg": () => import('./circle-question-C49esbF6.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/circle-success.svg": () => import('./circle-success-Deiv-aEI.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/cloud-download.svg": () => import('./cloud-download-D3Swor59.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/cloud-knime.svg": () => import('./cloud-knime-Ck0CYEpC.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/cloud-pending-changes.svg": () => import('./cloud-pending-changes-BooMof3w.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/cloud-synced.svg": () => import('./cloud-synced-BLkZpZpi.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/cloud-upload.svg": () => import('./cloud-upload-1cKBYCE_.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/cloud-workflow.svg": () => import('./cloud-workflow-bbXOzeON.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/code-block.svg": () => import('./code-block-DxROkcSh.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/color-picker.svg": () => import('./color-picker-DKT2VkYj.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/comment.svg": () => import('./comment-_ajO8mxh.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/component.svg": () => import('./component-xJ6doeqN.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/connection.svg": () => import('./connection-CPQhki0y.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/copy.svg": () => import('./copy-D_dQ00WJ.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/cursor.svg": () => import('./cursor-CWY-Sqb_.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/data-app.svg": () => import('./data-app-wBNobXat.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/data-value-view.svg": () => import('./data-value-view-C07X6BM3.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/date-time.svg": () => import('./date-time-D2BP5E5r.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/db-database.svg": () => import('./db-database-DxsIVO4X.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/db-schema.svg": () => import('./db-schema-Bv0_IT9E.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/db-table-view.svg": () => import('./db-table-view-B0xGvbnv.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/db-table.svg": () => import('./db-table-B7h4pOv1.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/deploy.svg": () => import('./deploy-D2iGlU6g.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/detect.svg": () => import('./detect-Bsk4HlM_.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/divider.svg": () => import('./divider-Syv30InM.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/duration.svg": () => import('./duration-DaP7U33c.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/edit.svg": () => import('./edit-Bo5vgzi3.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/education.svg": () => import('./education-B3hKB2rv.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/error-panel.svg": () => import('./error-panel-CTRd3uUe.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/execute-all.svg": () => import('./execute-all-Cd4o8ar9.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/execute.svg": () => import('./execute-CaiPLywW.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/expand-panel.svg": () => import('./expand-panel-DOMlQ0h4.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/extension-community.svg": () => import('./extension-community-Dbck6In6.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/extension.svg": () => import('./extension-0bpmRL2f.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/external-link.svg": () => import('./external-link-Da9nbkS3.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/eye.svg": () => import('./eye-BaEvu1WZ.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/file-export.svg": () => import('./file-export-Cg1pIaBd.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/file-text.svg": () => import('./file-text-C64HMtpY.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/file.svg": () => import('./file-Pkm1PSyQ.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/filter.svg": () => import('./filter-C91sigZW.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/flow-variable-default.svg": () => import('./flow-variable-default-DvWtfW9d.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/flow-variable-in-out.svg": () => import('./flow-variable-in-out-BnxZMi1-.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/flow-variable-in.svg": () => import('./flow-variable-in-C30aVoZ6.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/flow-variable-out.svg": () => import('./flow-variable-out-CSpUvaoJ.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/folder-plus.svg": () => import('./folder-plus-DU8k1EXL.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/folder-workflow.svg": () => import('./folder-workflow-DjPcer5V.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/folder.svg": () => import('./folder-CbSKJZv-.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/forum.svg": () => import('./forum-EjZCrpeY.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/function-catalog.svg": () => import('./function-catalog-BtaFW_Ag.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/home.svg": () => import('./home-iE7RmW5y.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/import.svg": () => import('./import-B57fag-w.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/info.svg": () => import('./info-Ct2oj9rt.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/interval.svg": () => import('./interval-DdbkHCkr.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/italic.svg": () => import('./italic-D-X25dao.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/key.svg": () => import('./key-BVmvoGXA.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/layout-editor.svg": () => import('./layout-editor-CrJYLsDK.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/left-aligned.svg": () => import('./left-aligned-BbOktUi8.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/like.svg": () => import('./like-PH-Btifn.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/limit.svg": () => import('./limit-DhWVMRX6.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/link.svg": () => import('./link-UgkqQsRt.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/linked-metanode.svg": () => import('./linked-metanode-HsMQlCgq.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/list-bulletpoint.svg": () => import('./list-bulletpoint-BVaXqx4f.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/list-number.svg": () => import('./list-number-CNqcTLYo.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/list-thumbs.svg": () => import('./list-thumbs-M7r_75-H.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/list.svg": () => import('./list-Byrs5aZs.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/local-filesystem.svg": () => import('./local-filesystem-hArfE0_N.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/lock.svg": () => import('./lock-C0pCLYaC.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/metanode.svg": () => import('./metanode-Cl_lQPOl.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/mini-map.svg": () => import('./mini-map-ivG9u5W4.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/minimize-dialog.svg": () => import('./minimize-dialog-CWg57-1w.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/minimize-side-panel.svg": () => import('./minimize-side-panel-Brx7aXNg.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/minus.svg": () => import('./minus-Bl_XdZTq.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/more-actions.svg": () => import('./more-actions-CUQHQnhr.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/node-stack.svg": () => import('./node-stack-BIw49e13.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/nodes-align-horiz.svg": () => import('./nodes-align-horiz-Bxl0AKfj.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/nodes-align-vert.svg": () => import('./nodes-align-vert-D8h7LLpV.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/open-in-new-window.svg": () => import('./open-in-new-window-zf7vlHFV.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/pan-mode.svg": () => import('./pan-mode-DqMDNpGh.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/parameter.svg": () => import('./parameter-BwgLWZ40.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/pending-changes.svg": () => import('./pending-changes-CYs0jWRx.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/placeholder.svg": () => import('./placeholder-6jSUL5uH.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/plus.svg": () => import('./plus-Cj7d9fzE.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/quote.svg": () => import('./quote-B_HXPGC-.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/re-execution.svg": () => import('./re-execution-C4Ssn4oh.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/redo.svg": () => import('./redo-DvRm89Y1.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/regex.svg": () => import('./regex-v3KtSGhe.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/reload.svg": () => import('./reload-aBy3xEuk.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/rename.svg": () => import('./rename-CR6_WgYs.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/replace.svg": () => import('./replace-D6ui4Ubg.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/reset-all.svg": () => import('./reset-all-D3A6ORrn.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/resume-execution.svg": () => import('./resume-execution--1RD1SK-.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/right-aligned.svg": () => import('./right-aligned-BQuVIUi8.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/rocket.svg": () => import('./rocket-CcUk0w4I.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/save-as.svg": () => import('./save-as-lIdGETry.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/save.svg": () => import('./save-BTSBDcKz.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/schedule.svg": () => import('./schedule-CuWWu-oZ.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/search.svg": () => import('./search-Bzzp4jaj.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/secret-store.svg": () => import('./secret-store-CtLqpWMg.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/selected-cancel.svg": () => import('./selected-cancel-yt7eew8_.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/selected-execution.svg": () => import('./selected-execution-Dt9jKAcj.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/selected-reset.svg": () => import('./selected-reset-DlGgo4-Y.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/send.svg": () => import('./send-C9YzInMZ.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/server-rack-workflow.svg": () => import('./server-rack-workflow-dCwu7vTW.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/service.svg": () => import('./service-BT3SUkgO.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/settings.svg": () => import('./settings-CGgJkEgj.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/share.svg": () => import('./share-BdSOCq4T.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/shortcuts.svg": () => import('./shortcuts-Bu3KkyH3.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/sort-ascending.svg": () => import('./sort-ascending-wLoBiuk_.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/sort-descending.svg": () => import('./sort-descending-DZiglaz4.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/space-local.svg": () => import('./space-local-Df_W3Vix.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/space-private.svg": () => import('./space-private-BcygS3TM.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/space.svg": () => import('./space-hkXDtlC1.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/stepwise-execution.svg": () => import('./stepwise-execution-DNdkTRdo.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/strikethrough.svg": () => import('./strikethrough-DaE8BLGf.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/team.svg": () => import('./team-D1-xShh0.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/text.svg": () => import('./text-DMmr6LRp.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/textstyles.svg": () => import('./textstyles-DHJzC-et.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/thumbs-down.svg": () => import('./thumbs-down-xRvAE_oG.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/thumbs-up.svg": () => import('./thumbs-up-9YwRlf60.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/time.svg": () => import('./time-Tei7g5mN.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/to-bottom.svg": () => import('./to-bottom-1s_2X-cB.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/to-top.svg": () => import('./to-top-CtkBPtAa.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/trash.svg": () => import('./trash-CXGtMBy1.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/trigger.svg": () => import('./trigger-wL8HC16Y.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/underline.svg": () => import('./underline-B6XEgMkQ.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/undo.svg": () => import('./undo-DaXvDNyj.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/unlink.svg": () => import('./unlink-BY0X0cix.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/user.svg": () => import('./user-df6HsMaZ.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/version.svg": () => import('./version-B-5dHgvX.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/view-cards.svg": () => import('./view-cards-BTGqIH1C.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/warning.svg": () => import('./warning-BEoXGKC2.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/workflow.svg": () => import('./workflow-B6CQgLEB.js'),"../../../node_modules/@knime/kds-styles/dist/img/icons/x-close.svg": () => import('./x-close-BU1wJ08h.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/audio-datatype.svg": () => import('./audio-datatype-BqJYr0fU.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/binary-object-datatype.svg": () => import('./binary-object-datatype-Du-zhxKy.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/bit-byte-vector-datatype.svg": () => import('./bit-byte-vector-datatype-DRoDVhzx.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/boolean-datatype.svg": () => import('./boolean-datatype-BLejL9wT.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/collection-list-datatype.svg": () => import('./collection-list-datatype-tv5ebdN1.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/collection-set-datatype.svg": () => import('./collection-set-datatype-BmEIjJCx.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/date-datatype.svg": () => import('./date-datatype-CbrXJIDR.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/date-time-local-datatype.svg": () => import('./date-time-local-datatype-Dn57eC5p.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/date-time-zoned-datatype.svg": () => import('./date-time-zoned-datatype-BC0SFQAD.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/default-extension-datatype.svg": () => import('./default-extension-datatype-EJXM_Ybz.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/document-datatype.svg": () => import('./document-datatype-BSz1qTHq.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/duration-date-based-datatype.svg": () => import('./duration-date-based-datatype-D6prx57n.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/duration-time-based-datatype.svg": () => import('./duration-time-based-datatype-4Ik-Vr8Q.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/geo-datatype.svg": () => import('./geo-datatype-CFu0R3vj.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/helm-datatype.svg": () => import('./helm-datatype-BWAUZ-Tt.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/image-png-datatype.svg": () => import('./image-png-datatype-XLrsdl_K.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/image-svg-datatype.svg": () => import('./image-svg-datatype-Sc-uI6FI.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/json-datatype.svg": () => import('./json-datatype-CK5bFgQy.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/labeling-datatype.svg": () => import('./labeling-datatype-DubVeYXo.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/linear-notation-molecule.svg": () => import('./linear-notation-molecule-B9JUyQef.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/message-datatype.svg": () => import('./message-datatype-BMeR1nv4.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/microscope.svg": () => import('./microscope-Cr49onew.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/model-pmml-datatype.svg": () => import('./model-pmml-datatype-IGnc5zXz.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/molecule.svg": () => import('./molecule-C9PFhX46.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/number-double-datatype.svg": () => import('./number-double-datatype-iI23azce.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/number-double-vector-datatype.svg": () => import('./number-double-vector-datatype-BtktW2zE.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/number-integer-datatype.svg": () => import('./number-integer-datatype-ncI7X7Aw.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/path-datatype.svg": () => import('./path-datatype-UYcAhyjv.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/string-datatype.svg": () => import('./string-datatype-BFdqZnvv.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/string-vector-datatype.svg": () => import('./string-vector-datatype-QXJ-Dq9M.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/subgraph-datatype.svg": () => import('./subgraph-datatype-BHUfkFAl.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/term-datatype.svg": () => import('./term-datatype-fRf65x34.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/test-tube.svg": () => import('./test-tube-dmblmo83.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/time-datatype.svg": () => import('./time-datatype-Dx_gZrr5.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/tool-datatype.svg": () => import('./tool-datatype-CscnJaLg.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/unknown-datatype.svg": () => import('./unknown-datatype-HVRhR0XQ.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/uri-datatype.svg": () => import('./uri-datatype-COo2A9Ig.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-boolean.svg": () => import('./variable-boolean-Del5rqMV.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-collection-boolean.svg": () => import('./variable-collection-boolean-ClvKyQes.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-collection-double.svg": () => import('./variable-collection-double-D9bZO46e.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-collection-integer.svg": () => import('./variable-collection-integer-Bz4v0C4x.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-collection-string.svg": () => import('./variable-collection-string-2mgywfSS.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-conda-environment.svg": () => import('./variable-conda-environment-Hrl_-hfW.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-credential.svg": () => import('./variable-credential-D_kLfXY5.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-integer.svg": () => import('./variable-integer-5fC6qM5I.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-number-double.svg": () => import('./variable-number-double-DwTKGyps.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-path.svg": () => import('./variable-path-DTYcIIg9.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-string.svg": () => import('./variable-string-BVXOfIgy.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/variable-unknown.svg": () => import('./variable-unknown-DLlsEO5w.js'),"../../../node_modules/@knime/kds-styles/dist/img/type-icons/xml-datatype.svg": () => import('./xml-datatype-BymvkSrS.js')})), `../../../node_modules/@knime/kds-styles/dist/img/${folder}/${newName}.svg`, 10);
27
27
  iconCache.set(newName, module.default);
28
28
  iconComponent.value = module.default;
29
29
  } catch (_error) {
@@ -35,7 +35,7 @@ const useIcon = ({
35
35
  return iconComponent;
36
36
  };
37
37
 
38
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
38
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
39
39
  __name: "KdsIcon",
40
40
  props: {
41
41
  name: {},
@@ -68,205 +68,13 @@ const _export_sfc = (sfc, props) => {
68
68
  return target;
69
69
  };
70
70
 
71
- const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-d965b88c"]]);
72
-
73
- const ID_TO_ICON_MAP = {
74
- // Flow Variables
75
- STRING: "variable-string",
76
- LONG: "variable-integer",
77
- DOUBLE: "variable-number-double",
78
- BOOLEAN: "variable-boolean",
79
- INTEGER: "variable-integer",
80
- FSLocation: "variable-path",
81
- FSLocationSpec: "variable-path",
82
- STRINGARRAY: "variable-collection-string",
83
- LONGARRAY: "variable-collection-integer",
84
- DOUBLEARRAY: "variable-collection-double",
85
- BOOLEANARRAY: "variable-collection-boolean",
86
- INTARRAY: "variable-collection-integer",
87
- CREDENTIALS: "variable-credential",
88
- CONDAENVIRONMENT: "variable-conda-environment",
89
- UNKNOWN: "variable-unknown",
90
- // General
91
- "org.knime.core.data.BooleanValue": "boolean-datatype",
92
- "org.knime.core.data.DataValue": "unknown-datatype",
93
- "org.knime.core.data.DoubleValue": "number-double-datatype",
94
- "org.knime.core.data.IntValue": "number-integer-datatype",
95
- "org.knime.core.data.LongValue": "number-integer-datatype",
96
- "org.knime.core.data.MissingValue": "unknown-datatype",
97
- "org.knime.core.data.StringValue": "string-datatype",
98
- "org.knime.core.data.collection.ListDataValue": "collection-list-datatype",
99
- "org.knime.core.data.collection.SetDataValue": "collection-set-datatype",
100
- "org.knime.core.data.vector.doublevector.DoubleVectorValue": "number-double-vector-datatype",
101
- "org.knime.core.data.vector.stringvector.StringVectorValue": "string-vector-datatype",
102
- "org.knime.filehandling.core.data.location.FSLocationValue": "path-datatype",
103
- // Image, Audio & Video
104
- "org.knime.audio.data.cell.AudioValue": "audio-datatype",
105
- "org.knime.base.data.xml.SvgValue": "image-svg-datatype",
106
- "org.knime.core.data.image.png.PNGImageValue": "image-png-datatype",
107
- // Date & Time
108
- "org.knime.core.data.time.localdate.LocalDateValue": "date-datatype",
109
- "org.knime.core.data.time.localdatetime.LocalDateTimeValue": "date-time-local-datatype",
110
- "org.knime.core.data.time.localtime.LocalTimeValue": "time-datatype",
111
- "org.knime.core.data.time.zoneddatetime.ZonedDateTimeValue": "date-time-zoned-datatype",
112
- "org.knime.core.data.time.duration.DurationValue": "duration-time-based-datatype",
113
- "org.knime.core.data.time.period.PeriodValue": "duration-date-based-datatype",
114
- // Geospatial
115
- "org.knime.geospatial.core.data.GeoValue": "geo-datatype",
116
- "org.knime.geospatial.core.data.GeoLineValue": "geo-datatype",
117
- "org.knime.geospatial.core.data.GeoPointValue": "geo-datatype",
118
- "org.knime.geospatial.core.data.GeoPolygonValue": "geo-datatype",
119
- "org.knime.geospatial.core.data.GeoCollectionValue": "geo-datatype",
120
- "org.knime.geospatial.core.data.GeoMultiLineValue": "geo-datatype",
121
- "org.knime.geospatial.core.data.GeoMultiPointValue": "geo-datatype",
122
- "org.knime.geospatial.core.data.GeoMultiPolygonValue": "geo-datatype",
123
- // Code
124
- "org.knime.core.data.blob.BinaryObjectDataValue": "binary-object-datatype",
125
- "org.knime.core.data.html.HTMLValue": "xml-datatype",
126
- "org.knime.core.data.json.JSONValue": "json-datatype",
127
- "org.knime.core.data.uri.URIDataValue": "uri-datatype",
128
- "org.knime.core.data.vector.bitvector.BitVectorValue": "bit-byte-vector-datatype",
129
- "org.knime.core.data.vector.bitvector.SparseBitVectorValue": "bit-byte-vector-datatype",
130
- "org.knime.core.data.vector.bytevector.ByteVectorValue": "bit-byte-vector-datatype",
131
- "org.knime.core.data.xml.PMMLValue": "model-pmml-datatype",
132
- "org.knime.core.data.xml.XMLValue": "xml-datatype",
133
- "org.knime.knip.base.data.labeling.LabelingValue": "labeling-datatype",
134
- // Agentic AI
135
- "org.knime.ai.core.data.message.MessageValue": "message-datatype",
136
- "org.knime.core.node.agentic.tool.WorkflowToolValue": "tool-datatype",
137
- // Textprocessing
138
- "org.knime.ext.textprocessing.data.DocumentValue": "document-datatype",
139
- "org.knime.ext.textprocessing.data.TermValue": "term-datatype",
140
- // Network
141
- "org.knime.network.core.knime.cell.GraphValue": "subgraph-datatype",
142
- // Linear Notations
143
- "org.knime.chem.types.InchiValue": "linear-notation-molecule",
144
- "org.knime.chem.types.SlnValue": "linear-notation-molecule",
145
- "org.knime.chem.types.SmartsValue": "linear-notation-molecule",
146
- "org.knime.chem.types.SmilesValue": "linear-notation-molecule",
147
- // Molecular file formats
148
- "org.knime.chem.types.CtabValue": "molecule",
149
- "org.knime.chem.types.MolValue": "molecule",
150
- "org.knime.chem.types.Mol2Value": "molecule",
151
- "org.knime.chem.types.SdfValue": "molecule",
152
- // Biopolymer & sequence representations
153
- "org.knime.chem.types.helm.HELMValue": "helm-datatype",
154
- // Relation & Process representations
155
- "org.knime.chem.types.CMLValue": "test-tube",
156
- "org.knime.chem.types.RxnValue": "test-tube",
157
- // Visualization & specialized software formats
158
- "org.knime.bio.types.PdbValue": "microscope",
159
- "org.knime.chem.types.cdx.CDXMLValue": "microscope",
160
- "org.rdkit.knime.types.RDKitMolValue": "microscope",
161
- "jp.co.infocom.cheminfo.marvin.type.MrvValue": "microscope"
162
- };
163
-
164
- const typeIconNames = [
165
- "audio-datatype",
166
- "binary-object-datatype",
167
- "bit-byte-vector-datatype",
168
- "boolean-datatype",
169
- "collection-list-datatype",
170
- "collection-set-datatype",
171
- "date-datatype",
172
- "date-time-local-datatype",
173
- "date-time-zoned-datatype",
174
- "default-extension-datatype",
175
- "document-datatype",
176
- "duration-date-based-datatype",
177
- "duration-time-based-datatype",
178
- "geo-datatype",
179
- "helm-datatype",
180
- "image-png-datatype",
181
- "image-svg-datatype",
182
- "json-datatype",
183
- "labeling-datatype",
184
- "linear-notation-molecule",
185
- "message-datatype",
186
- "microscope",
187
- "model-pmml-datatype",
188
- "molecule",
189
- "number-double-datatype",
190
- "number-double-vector-datatype",
191
- "number-integer-datatype",
192
- "path-datatype",
193
- "string-datatype",
194
- "string-vector-datatype",
195
- "subgraph-datatype",
196
- "term-datatype",
197
- "test-tube",
198
- "time-datatype",
199
- "tool-datatype",
200
- "unknown-datatype",
201
- "uri-datatype",
202
- "variable-boolean",
203
- "variable-collection-boolean",
204
- "variable-collection-double",
205
- "variable-collection-integer",
206
- "variable-collection-string",
207
- "variable-conda-environment",
208
- "variable-credential",
209
- "variable-integer",
210
- "variable-number-double",
211
- "variable-path",
212
- "variable-string",
213
- "variable-unknown",
214
- "xml-datatype"
215
- ];
216
-
217
- const _hoisted_1$h = ["title"];
218
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
219
- __name: "KdsDataType",
220
- props: {
221
- iconName: { default: "unknown-datatype" },
222
- iconTitle: { default: "Unknown Data Type" },
223
- size: { default: "medium" }
224
- },
225
- setup(__props) {
226
- const DATA_TYPE_SIZE_TO_ICON_SIZE = {
227
- large: "medium",
228
- medium: "small",
229
- small: "xsmall"
230
- };
231
- const props = __props;
232
- const iconSize = computed(() => DATA_TYPE_SIZE_TO_ICON_SIZE[props.size]);
233
- const isIconName = (value) => typeIconNames.includes(value);
234
- const isTypeId = (value) => Object.keys(ID_TO_ICON_MAP).includes(value);
235
- const iconName = computed(() => {
236
- if (isIconName(props.iconName)) {
237
- return props.iconName;
238
- }
239
- if (isTypeId(props.iconName)) {
240
- return ID_TO_ICON_MAP[props.iconName];
241
- }
242
- return props.iconName.startsWith("org.knime") ? "default-extension-datatype" : "unknown-datatype";
243
- });
244
- const iconComponent = useIcon({
245
- name: iconName,
246
- folder: "type-icons"
247
- });
248
- return (_ctx, _cache) => {
249
- return openBlock(), createElementBlock("div", {
250
- class: normalizeClass(["kds-data-type-icon-container", __props.size]),
251
- title: props.iconTitle
252
- }, [
253
- (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent)), {
254
- class: normalizeClass(["kds-icon", "kds-data-type-icon", iconSize.value]),
255
- "aria-hidden": "true",
256
- focusable: "false"
257
- }, null, 8, ["class"]))
258
- ], 10, _hoisted_1$h);
259
- };
260
- }
261
- });
262
-
263
- const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-f7d93fdf"]]);
71
+ const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-3a57d423"]]);
264
72
 
265
- const _hoisted_1$g = {
73
+ const _hoisted_1$n = {
266
74
  key: 0,
267
75
  class: "label"
268
76
  };
269
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
77
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
270
78
  __name: "BaseButton",
271
79
  props: {
272
80
  size: { default: "medium" },
@@ -325,7 +133,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
325
133
  size: iconSize.value
326
134
  }, null, 8, ["name", "size"])) : createCommentVNode("", true)
327
135
  ], true),
328
- props.label ? (openBlock(), createElementBlock("span", _hoisted_1$g, toDisplayString(props.label), 1)) : createCommentVNode("", true),
136
+ props.label ? (openBlock(), createElementBlock("span", _hoisted_1$n, toDisplayString(props.label), 1)) : createCommentVNode("", true),
329
137
  props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
330
138
  key: 1,
331
139
  name: props.trailingIcon,
@@ -338,9 +146,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
338
146
  }
339
147
  });
340
148
 
341
- const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-ab4824cd"]]);
149
+ const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-b0f9559f"]]);
342
150
 
343
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
151
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
344
152
  __name: "KdsButton",
345
153
  props: {
346
154
  size: {},
@@ -393,7 +201,7 @@ const resolveNuxtLinkComponent = () => {
393
201
  return fallbackComponent;
394
202
  };
395
203
 
396
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
204
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
397
205
  __name: "KdsLinkButton",
398
206
  props: {
399
207
  size: {},
@@ -433,17 +241,17 @@ function isDefinedAndNotEmpty(obj, field) {
433
241
  return isDefined(obj[field]) && obj[field] !== "";
434
242
  }
435
243
 
436
- const _hoisted_1$f = { class: "kds-empty-state" };
437
- const _hoisted_2$6 = { class: "kds-empty-state-headline" };
438
- const _hoisted_3$4 = {
244
+ const _hoisted_1$m = { class: "kds-empty-state" };
245
+ const _hoisted_2$8 = { class: "kds-empty-state-headline" };
246
+ const _hoisted_3$6 = {
439
247
  key: 0,
440
248
  class: "kds-empty-state-description"
441
249
  };
442
- const _hoisted_4$3 = {
250
+ const _hoisted_4$4 = {
443
251
  key: 1,
444
252
  class: "kds-empty-state-action"
445
253
  };
446
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
254
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
447
255
  __name: "KdsEmptyState",
448
256
  props: {
449
257
  headline: {},
@@ -471,9 +279,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
471
279
  });
472
280
  const buttonType = computed(() => {
473
281
  if (isDefinedAndNotEmpty(props, "buttonTo")) {
474
- return _sfc_main$i;
282
+ return _sfc_main$t;
475
283
  }
476
- return _sfc_main$j;
284
+ return _sfc_main$u;
477
285
  });
478
286
  const mapProps = (mappings) => {
479
287
  return Object.fromEntries(
@@ -495,7 +303,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
495
303
  ["destructive", "buttonDestructive"],
496
304
  ["title", "buttonTitle"]
497
305
  ]);
498
- if (buttonType.value !== _sfc_main$i) {
306
+ if (buttonType.value !== _sfc_main$t) {
499
307
  return baseProps;
500
308
  }
501
309
  return {
@@ -509,10 +317,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
509
317
  };
510
318
  });
511
319
  return (_ctx, _cache) => {
512
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
513
- createElementVNode("p", _hoisted_2$6, toDisplayString(props.headline), 1),
514
- props.description ? (openBlock(), createElementBlock("p", _hoisted_3$4, toDisplayString(props.description), 1)) : createCommentVNode("", true),
515
- hasButton.value ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
320
+ return openBlock(), createElementBlock("div", _hoisted_1$m, [
321
+ createElementVNode("p", _hoisted_2$8, toDisplayString(props.headline), 1),
322
+ props.description ? (openBlock(), createElementBlock("p", _hoisted_3$6, toDisplayString(props.description), 1)) : createCommentVNode("", true),
323
+ hasButton.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
516
324
  (openBlock(), createBlock(resolveDynamicComponent(buttonType.value), mergeProps(buttonProps.value, {
517
325
  onClick: _cache[0] || (_cache[0] = ($event) => emit("buttonClick", $event))
518
326
  }), null, 16))
@@ -522,340 +330,430 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
522
330
  }
523
331
  });
524
332
 
525
- const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-34b52d0e"]]);
526
-
527
- const modalLayoutPropsDefault = {
528
- title: "",
529
- variant: "padded",
530
- overflow: "auto",
531
- icon: void 0
532
- };
533
- const modalPropsDefault = {
534
- active: false,
535
- height: "auto",
536
- width: "medium",
537
- closedby: "closerequest",
538
- ...modalLayoutPropsDefault
539
- };
333
+ const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-34b52d0e"]]);
540
334
 
541
- const _hoisted_1$e = { class: "modal-header" };
542
- const _hoisted_2$5 = { class: "modal-header-title" };
543
- const _hoisted_3$3 = ["data-variant"];
544
- const _hoisted_4$2 = {
545
- key: 0,
546
- class: "modal-footer"
547
- };
548
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
549
- ...{ inheritAttrs: false },
550
- __name: "KdsModalLayout",
551
- props: /* @__PURE__ */ mergeDefaults({
552
- title: {},
553
- variant: {},
554
- icon: {},
555
- overflow: {},
556
- onClose: { type: Function }
557
- }, modalLayoutPropsDefault),
335
+ const _hoisted_1$l = ["role", "title", "aria-hidden", "aria-label"];
336
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
337
+ __name: "KdsColorSwatch",
338
+ props: {
339
+ color: {},
340
+ title: { default: void 0 }
341
+ },
558
342
  setup(__props) {
559
- useCssVars((_ctx) => ({
560
- "c5a8c866": _ctx.overflow
561
- }));
562
343
  const props = __props;
344
+ const typeToTokenColor = {
345
+ learner: "var(--kds-color-nodes-and-variables-learner)",
346
+ manipulator: "var(--kds-color-nodes-and-variables-manipulator)",
347
+ predictor: "var(--kds-color-nodes-and-variables-predictor)",
348
+ sink: "var(--kds-color-nodes-and-variables-sink)",
349
+ source: "var(--kds-color-nodes-and-variables-source)",
350
+ visualizer: "var(--kds-color-nodes-and-variables-visualizer)",
351
+ other: "var(--kds-color-nodes-and-variables-other)"
352
+ };
353
+ const isKdsColorSwatchType = (value) => Object.prototype.hasOwnProperty.call(typeToTokenColor, value);
354
+ const backgroundColor = computed(() => {
355
+ if (isKdsColorSwatchType(props.color)) {
356
+ return typeToTokenColor[props.color];
357
+ }
358
+ return props.color;
359
+ });
360
+ const accessibleTitle = computed(() => props.title?.trim() ?? "");
361
+ const hasTitle = computed(() => accessibleTitle.value.length > 0);
563
362
  return (_ctx, _cache) => {
564
- return openBlock(), createElementBlock(Fragment, null, [
565
- createElementVNode("header", _hoisted_1$e, [
566
- props.icon ? (openBlock(), createBlock(KdsIcon, {
567
- key: 0,
568
- name: props.icon,
569
- size: "medium"
570
- }, null, 8, ["name"])) : createCommentVNode("", true),
571
- createElementVNode("div", _hoisted_2$5, toDisplayString(props.title), 1),
572
- createVNode(_sfc_main$j, {
573
- "leading-icon": "x-close",
574
- variant: "transparent",
575
- size: "medium",
576
- title: "Close",
577
- onClick: props.onClose
578
- }, null, 8, ["onClick"])
579
- ]),
580
- createElementVNode("div", {
581
- class: "modal-body",
582
- "data-variant": __props.variant
583
- }, [
584
- renderSlot(_ctx.$slots, "body", {}, void 0, true)
585
- ], 8, _hoisted_3$3),
586
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4$2, [
587
- renderSlot(_ctx.$slots, "footer", {}, void 0, true)
588
- ])) : createCommentVNode("", true)
589
- ], 64);
363
+ return openBlock(), createElementBlock("span", {
364
+ role: hasTitle.value ? "img" : "presentation",
365
+ class: "kds-color-swatch",
366
+ title: hasTitle.value ? accessibleTitle.value : void 0,
367
+ style: normalizeStyle({ backgroundColor: backgroundColor.value }),
368
+ "aria-hidden": hasTitle.value ? void 0 : "true",
369
+ "aria-label": hasTitle.value ? accessibleTitle.value : void 0
370
+ }, null, 12, _hoisted_1$l);
590
371
  };
591
372
  }
592
373
  });
593
374
 
594
- const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-583e34fe"]]);
375
+ const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-c8fc7e8e"]]);
595
376
 
596
- const _hoisted_1$d = ["closedby"];
597
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
598
- __name: "KdsModal",
599
- props: /* @__PURE__ */ mergeDefaults({
600
- icon: {},
601
- title: {},
602
- variant: {},
603
- width: {},
604
- height: {},
605
- active: { type: Boolean },
606
- closedby: {},
607
- overflow: {}
608
- }, modalPropsDefault),
609
- emits: ["close", "closed"],
610
- setup(__props, { emit: __emit }) {
611
- useCssVars((_ctx) => ({
612
- "v22ecc8a4": _ctx.overflow
613
- }));
377
+ const _hoisted_1$k = ["role", "title", "aria-hidden", "aria-label"];
378
+ const _hoisted_2$7 = ["src"];
379
+ const _hoisted_3$5 = {
380
+ key: 1,
381
+ class: "kds-avatar-initials",
382
+ "aria-hidden": "true"
383
+ };
384
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
385
+ __name: "KdsAvatar",
386
+ props: {
387
+ initials: {},
388
+ src: { default: void 0 },
389
+ title: { default: void 0 }
390
+ },
391
+ setup(__props) {
614
392
  const props = __props;
615
- const emit = __emit;
616
- const dialog = useTemplateRef("dialogElement");
617
- const onClose = (event) => {
618
- emit("close", event);
619
- };
393
+ const imageLoadFailed = ref(false);
620
394
  watch(
621
- () => props.active,
622
- async (active) => {
623
- if (active) {
624
- await nextTick();
625
- dialog.value?.showModal();
626
- } else {
627
- dialog.value?.close();
628
- }
629
- },
630
- { immediate: true }
395
+ () => props.src,
396
+ () => {
397
+ imageLoadFailed.value = false;
398
+ }
631
399
  );
632
- const renderDialog = ref(props.active);
633
- const removeDialog = () => {
634
- renderDialog.value = false;
635
- emit("closed");
400
+ const shouldShowImage = computed(
401
+ () => Boolean(props.src) && !imageLoadFailed.value
402
+ );
403
+ const onImageError = () => {
404
+ imageLoadFailed.value = true;
636
405
  };
637
- watch(
638
- () => props.active,
639
- (value, lastValue) => {
640
- if (value === false && lastValue === true) {
641
- if (dialog.value) {
642
- Promise.all(
643
- dialog.value.getAnimations({ subtree: true }).map((animation) => animation.finished)
644
- ).then(removeDialog);
645
- } else {
646
- removeDialog();
647
- }
648
- } else {
649
- renderDialog.value = value;
650
- }
651
- }
406
+ const accessibleTitle = computed(() => props.title?.trim() ?? "");
407
+ const hasTitle = computed(() => accessibleTitle.value.length > 0);
408
+ const displayedInitials = computed(
409
+ () => props.initials.trim().slice(0, 2).toUpperCase()
652
410
  );
653
411
  return (_ctx, _cache) => {
654
- return renderDialog.value ? (openBlock(), createElementBlock("dialog", {
655
- key: 0,
656
- ref: "dialogElement",
657
- class: normalizeClass([
658
- "kds-modal",
659
- `width-${__props.width}`,
660
- `height-${__props.height}`,
661
- `overflow-${__props.overflow}`
662
- ]),
663
- closedby: __props.closedby,
664
- onCancel: withModifiers(onClose, ["prevent"])
412
+ return openBlock(), createElementBlock("div", {
413
+ class: "kds-avatar",
414
+ role: hasTitle.value ? "img" : "presentation",
415
+ title: hasTitle.value ? accessibleTitle.value : void 0,
416
+ "aria-hidden": !hasTitle.value ? "true" : void 0,
417
+ "aria-label": hasTitle.value ? accessibleTitle.value : void 0
665
418
  }, [
666
- renderSlot(_ctx.$slots, "default", {
667
- title: __props.title,
668
- icon: __props.icon,
669
- variant: __props.variant,
670
- overflow: __props.overflow,
671
- onClose
672
- }, () => [
673
- createVNode(KdsModalLayout, {
674
- title: __props.title,
675
- icon: __props.icon,
676
- variant: __props.variant,
677
- overflow: __props.overflow,
678
- onClose
679
- }, {
680
- body: withCtx(() => [
681
- renderSlot(_ctx.$slots, "body", {}, void 0, true)
682
- ]),
683
- footer: withCtx(() => [
684
- renderSlot(_ctx.$slots, "footer", {}, void 0, true)
685
- ]),
686
- _: 3
687
- }, 8, ["title", "icon", "variant", "overflow"])
688
- ], true)
689
- ], 42, _hoisted_1$d)) : createCommentVNode("", true);
419
+ shouldShowImage.value ? (openBlock(), createElementBlock("img", {
420
+ key: 0,
421
+ class: "kds-avatar-image",
422
+ src: props.src,
423
+ alt: "",
424
+ "aria-hidden": "true",
425
+ onError: onImageError
426
+ }, null, 40, _hoisted_2$7)) : (openBlock(), createElementBlock("div", _hoisted_3$5, [
427
+ createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)
428
+ ]))
429
+ ], 8, _hoisted_1$k);
690
430
  };
691
431
  }
692
432
  });
693
433
 
694
- const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-6fc6d7dd"]]);
434
+ const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-4a34a186"]]);
695
435
 
696
- const _hoisted_1$c = ["id"];
697
- const _hoisted_2$4 = { class: "subtext-text" };
698
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
699
- __name: "KdsSubText",
436
+ const ID_TO_ICON_MAP = {
437
+ // Flow Variables
438
+ STRING: "variable-string",
439
+ LONG: "variable-integer",
440
+ DOUBLE: "variable-number-double",
441
+ BOOLEAN: "variable-boolean",
442
+ INTEGER: "variable-integer",
443
+ FSLocation: "variable-path",
444
+ FSLocationSpec: "variable-path",
445
+ STRINGARRAY: "variable-collection-string",
446
+ LONGARRAY: "variable-collection-integer",
447
+ DOUBLEARRAY: "variable-collection-double",
448
+ BOOLEANARRAY: "variable-collection-boolean",
449
+ INTARRAY: "variable-collection-integer",
450
+ CREDENTIALS: "variable-credential",
451
+ CONDAENVIRONMENT: "variable-conda-environment",
452
+ UNKNOWN: "variable-unknown",
453
+ // General
454
+ "org.knime.core.data.BooleanValue": "boolean-datatype",
455
+ "org.knime.core.data.DataValue": "unknown-datatype",
456
+ "org.knime.core.data.DoubleValue": "number-double-datatype",
457
+ "org.knime.core.data.IntValue": "number-integer-datatype",
458
+ "org.knime.core.data.LongValue": "number-integer-datatype",
459
+ "org.knime.core.data.MissingValue": "unknown-datatype",
460
+ "org.knime.core.data.StringValue": "string-datatype",
461
+ "org.knime.core.data.collection.ListDataValue": "collection-list-datatype",
462
+ "org.knime.core.data.collection.SetDataValue": "collection-set-datatype",
463
+ "org.knime.core.data.vector.doublevector.DoubleVectorValue": "number-double-vector-datatype",
464
+ "org.knime.core.data.vector.stringvector.StringVectorValue": "string-vector-datatype",
465
+ "org.knime.filehandling.core.data.location.FSLocationValue": "path-datatype",
466
+ // Image, Audio & Video
467
+ "org.knime.audio.data.cell.AudioValue": "audio-datatype",
468
+ "org.knime.base.data.xml.SvgValue": "image-svg-datatype",
469
+ "org.knime.core.data.image.png.PNGImageValue": "image-png-datatype",
470
+ // Date & Time
471
+ "org.knime.core.data.time.localdate.LocalDateValue": "date-datatype",
472
+ "org.knime.core.data.time.localdatetime.LocalDateTimeValue": "date-time-local-datatype",
473
+ "org.knime.core.data.time.localtime.LocalTimeValue": "time-datatype",
474
+ "org.knime.core.data.time.zoneddatetime.ZonedDateTimeValue": "date-time-zoned-datatype",
475
+ "org.knime.core.data.time.duration.DurationValue": "duration-time-based-datatype",
476
+ "org.knime.core.data.time.period.PeriodValue": "duration-date-based-datatype",
477
+ // Geospatial
478
+ "org.knime.geospatial.core.data.GeoValue": "geo-datatype",
479
+ "org.knime.geospatial.core.data.GeoLineValue": "geo-datatype",
480
+ "org.knime.geospatial.core.data.GeoPointValue": "geo-datatype",
481
+ "org.knime.geospatial.core.data.GeoPolygonValue": "geo-datatype",
482
+ "org.knime.geospatial.core.data.GeoCollectionValue": "geo-datatype",
483
+ "org.knime.geospatial.core.data.GeoMultiLineValue": "geo-datatype",
484
+ "org.knime.geospatial.core.data.GeoMultiPointValue": "geo-datatype",
485
+ "org.knime.geospatial.core.data.GeoMultiPolygonValue": "geo-datatype",
486
+ // Code
487
+ "org.knime.core.data.blob.BinaryObjectDataValue": "binary-object-datatype",
488
+ "org.knime.core.data.html.HTMLValue": "xml-datatype",
489
+ "org.knime.core.data.json.JSONValue": "json-datatype",
490
+ "org.knime.core.data.uri.URIDataValue": "uri-datatype",
491
+ "org.knime.core.data.vector.bitvector.BitVectorValue": "bit-byte-vector-datatype",
492
+ "org.knime.core.data.vector.bitvector.SparseBitVectorValue": "bit-byte-vector-datatype",
493
+ "org.knime.core.data.vector.bytevector.ByteVectorValue": "bit-byte-vector-datatype",
494
+ "org.knime.core.data.xml.PMMLValue": "model-pmml-datatype",
495
+ "org.knime.core.data.xml.XMLValue": "xml-datatype",
496
+ "org.knime.knip.base.data.labeling.LabelingValue": "labeling-datatype",
497
+ // Agentic AI
498
+ "org.knime.ai.core.data.message.MessageValue": "message-datatype",
499
+ "org.knime.core.node.agentic.tool.WorkflowToolValue": "tool-datatype",
500
+ // Textprocessing
501
+ "org.knime.ext.textprocessing.data.DocumentValue": "document-datatype",
502
+ "org.knime.ext.textprocessing.data.TermValue": "term-datatype",
503
+ // Network
504
+ "org.knime.network.core.knime.cell.GraphValue": "subgraph-datatype",
505
+ // Linear Notations
506
+ "org.knime.chem.types.InchiValue": "linear-notation-molecule",
507
+ "org.knime.chem.types.SlnValue": "linear-notation-molecule",
508
+ "org.knime.chem.types.SmartsValue": "linear-notation-molecule",
509
+ "org.knime.chem.types.SmilesValue": "linear-notation-molecule",
510
+ // Molecular file formats
511
+ "org.knime.chem.types.CtabValue": "molecule",
512
+ "org.knime.chem.types.MolValue": "molecule",
513
+ "org.knime.chem.types.Mol2Value": "molecule",
514
+ "org.knime.chem.types.SdfValue": "molecule",
515
+ // Biopolymer & sequence representations
516
+ "org.knime.chem.types.helm.HELMValue": "helm-datatype",
517
+ // Relation & Process representations
518
+ "org.knime.chem.types.CMLValue": "test-tube",
519
+ "org.knime.chem.types.RxnValue": "test-tube",
520
+ // Visualization & specialized software formats
521
+ "org.knime.bio.types.PdbValue": "microscope",
522
+ "org.knime.chem.types.cdx.CDXMLValue": "microscope",
523
+ "org.rdkit.knime.types.RDKitMolValue": "microscope",
524
+ "jp.co.infocom.cheminfo.marvin.type.MrvValue": "microscope"
525
+ };
526
+
527
+ const typeIconNames = [
528
+ "audio-datatype",
529
+ "binary-object-datatype",
530
+ "bit-byte-vector-datatype",
531
+ "boolean-datatype",
532
+ "collection-list-datatype",
533
+ "collection-set-datatype",
534
+ "date-datatype",
535
+ "date-time-local-datatype",
536
+ "date-time-zoned-datatype",
537
+ "default-extension-datatype",
538
+ "document-datatype",
539
+ "duration-date-based-datatype",
540
+ "duration-time-based-datatype",
541
+ "geo-datatype",
542
+ "helm-datatype",
543
+ "image-png-datatype",
544
+ "image-svg-datatype",
545
+ "json-datatype",
546
+ "labeling-datatype",
547
+ "linear-notation-molecule",
548
+ "message-datatype",
549
+ "microscope",
550
+ "model-pmml-datatype",
551
+ "molecule",
552
+ "number-double-datatype",
553
+ "number-double-vector-datatype",
554
+ "number-integer-datatype",
555
+ "path-datatype",
556
+ "string-datatype",
557
+ "string-vector-datatype",
558
+ "subgraph-datatype",
559
+ "term-datatype",
560
+ "test-tube",
561
+ "time-datatype",
562
+ "tool-datatype",
563
+ "unknown-datatype",
564
+ "uri-datatype",
565
+ "variable-boolean",
566
+ "variable-collection-boolean",
567
+ "variable-collection-double",
568
+ "variable-collection-integer",
569
+ "variable-collection-string",
570
+ "variable-conda-environment",
571
+ "variable-credential",
572
+ "variable-integer",
573
+ "variable-number-double",
574
+ "variable-path",
575
+ "variable-string",
576
+ "variable-unknown",
577
+ "xml-datatype"
578
+ ];
579
+
580
+ const _hoisted_1$j = ["title"];
581
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
582
+ __name: "KdsDataType",
700
583
  props: {
701
- id: {},
702
- subText: {},
703
- error: { type: Boolean, default: false },
704
- preserveSubTextSpace: { type: Boolean, default: false }
584
+ iconName: { default: "unknown-datatype" },
585
+ iconTitle: { default: "Unknown Data Type" },
586
+ size: { default: "medium" }
705
587
  },
706
588
  setup(__props) {
589
+ const DATA_TYPE_SIZE_TO_ICON_SIZE = {
590
+ large: "medium",
591
+ medium: "small",
592
+ small: "xsmall"
593
+ };
707
594
  const props = __props;
708
- return (_ctx, _cache) => {
709
- return props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", {
710
- key: 0,
711
- id: props.id,
712
- class: normalizeClass({
713
- subtext: true,
714
- error: props.error
715
- })
595
+ const iconSize = computed(() => DATA_TYPE_SIZE_TO_ICON_SIZE[props.size]);
596
+ const isIconName = (value) => typeIconNames.includes(value);
597
+ const isTypeId = (value) => Object.keys(ID_TO_ICON_MAP).includes(value);
598
+ const iconName = computed(() => {
599
+ if (isIconName(props.iconName)) {
600
+ return props.iconName;
601
+ }
602
+ if (isTypeId(props.iconName)) {
603
+ return ID_TO_ICON_MAP[props.iconName];
604
+ }
605
+ return props.iconName.startsWith("org.knime") ? "default-extension-datatype" : "unknown-datatype";
606
+ });
607
+ const iconComponent = useIcon({
608
+ name: iconName,
609
+ folder: "type-icons"
610
+ });
611
+ return (_ctx, _cache) => {
612
+ return openBlock(), createElementBlock("div", {
613
+ class: normalizeClass(["kds-data-type-icon-container", __props.size]),
614
+ title: props.iconTitle
716
615
  }, [
717
- props.error && props.subText ? (openBlock(), createBlock(KdsIcon, {
718
- key: 0,
719
- name: "circle-error",
720
- size: "small",
721
- "aria-label": "Error"
722
- })) : createCommentVNode("", true),
723
- createElementVNode("span", _hoisted_2$4, toDisplayString(props.subText), 1)
724
- ], 10, _hoisted_1$c)) : createCommentVNode("", true);
616
+ (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent)), {
617
+ class: normalizeClass(["kds-icon", "kds-data-type-icon", iconSize.value]),
618
+ "aria-hidden": "true",
619
+ focusable: "false"
620
+ }, null, 8, ["class"]))
621
+ ], 10, _hoisted_1$j);
725
622
  };
726
623
  }
727
624
  });
728
625
 
729
- const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-78af6eac"]]);
626
+ const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-4239a1e3"]]);
730
627
 
731
- const _hoisted_1$b = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
732
- const _hoisted_2$3 = { class: "control" };
733
- const _hoisted_3$2 = {
734
- key: 0,
735
- class: "content"
736
- };
737
- const _hoisted_4$1 = { class: "label" };
738
- const _hoisted_5$1 = ["id"];
739
- const _hoisted_6$1 = {
740
- key: 0,
741
- class: "subtext-wrapper"
742
- };
743
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
744
- __name: "BaseCheckbox",
628
+ const _hoisted_1$i = ["data-style"];
629
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
630
+ __name: "KdsLoadingSpinner",
631
+ props: {
632
+ size: { default: "medium" },
633
+ variant: { default: "onSurface" }
634
+ },
635
+ setup(__props) {
636
+ return (_ctx, _cache) => {
637
+ return openBlock(), createElementBlock("svg", {
638
+ class: normalizeClass(["kds-loading-spinner", __props.size]),
639
+ "data-style": __props.variant,
640
+ viewBox: "0 0 120 120"
641
+ }, [..._cache[0] || (_cache[0] = [
642
+ createElementVNode("circle", {
643
+ class: "track",
644
+ cx: "60",
645
+ cy: "60",
646
+ r: "50"
647
+ }, null, -1),
648
+ createElementVNode("circle", {
649
+ class: "loader",
650
+ cx: "60",
651
+ cy: "60",
652
+ r: "50"
653
+ }, null, -1)
654
+ ])], 10, _hoisted_1$i);
655
+ };
656
+ }
657
+ });
658
+
659
+ const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-74bb7c3d"]]);
660
+
661
+ const _hoisted_1$h = ["disabled", "title", "aria-label", "aria-pressed"];
662
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
663
+ __name: "KdsVariableToggleButton",
745
664
  props: /* @__PURE__ */ mergeModels({
746
665
  disabled: { type: Boolean, default: false },
747
- error: { type: Boolean, default: false },
748
- subText: {},
749
- preserveSubTextSpace: { type: Boolean },
750
- label: {},
751
- title: {},
752
- helperText: {}
666
+ hidden: { type: Boolean, default: false },
667
+ inSet: { type: Boolean, default: false },
668
+ outSet: { type: Boolean, default: false },
669
+ error: { type: Boolean, default: false }
753
670
  }, {
754
- "modelValue": { type: [Boolean, String], ...{ default: false } },
671
+ "modelValue": { type: Boolean, ...{ default: false } },
755
672
  "modelModifiers": {}
756
673
  }),
757
674
  emits: ["update:modelValue"],
758
675
  setup(__props) {
759
676
  const props = __props;
760
677
  const modelValue = useModel(__props, "modelValue");
761
- const helperId = useId();
762
- const descriptionId = useId();
763
- const isChecked = computed(() => modelValue.value === true);
764
- const isIndeterminate = computed(() => modelValue.value === "indeterminate");
765
- const icon = computed(() => {
766
- if (isChecked.value) {
767
- return "checkmark";
678
+ const iconState = computed(() => {
679
+ if (props.inSet && props.outSet) {
680
+ return "in-out";
768
681
  }
769
- if (isIndeterminate.value) {
770
- return "minus";
682
+ if (props.inSet) {
683
+ return "in";
771
684
  }
772
- return null;
773
- });
774
- const ariaChecked = computed(() => {
775
- if (isIndeterminate.value) {
776
- return "mixed";
685
+ if (props.outSet) {
686
+ return "out";
777
687
  }
778
- return isChecked.value;
688
+ return "none";
779
689
  });
780
- const ariaDescribedBy = computed(() => {
781
- const ids = [];
782
- if (props.helperText) {
783
- ids.push(helperId);
784
- }
785
- if (props.subText) {
786
- ids.push(descriptionId);
690
+ const iconName = computed(() => {
691
+ switch (iconState.value) {
692
+ case "in":
693
+ return "flow-variable-in";
694
+ case "out":
695
+ return "flow-variable-out";
696
+ case "in-out":
697
+ return "flow-variable-in-out";
698
+ case "none":
699
+ default:
700
+ return "flow-variable-default";
787
701
  }
788
- return ids.length > 0 ? ids.join(" ") : void 0;
789
702
  });
790
- const handleClick = () => {
791
- if (props.disabled) {
792
- return;
793
- }
794
- modelValue.value = isIndeterminate.value ? true : !isChecked.value;
703
+ const baseTitleByState = {
704
+ in: "Input Flow Variable",
705
+ out: "Output Flow Variable",
706
+ "in-out": "Input and Output Flow Variable",
707
+ none: "No Flow Variable set"
708
+ };
709
+ const errorTitleByState = {
710
+ in: "Error in input Flow Variable",
711
+ out: "Error in output Flow Variable",
712
+ "in-out": "Error in Flow Variables"
795
713
  };
714
+ const title = computed(() => {
715
+ const baseTitle = baseTitleByState[iconState.value];
716
+ if (!props.error) {
717
+ return baseTitle;
718
+ }
719
+ return errorTitleByState[iconState.value] ?? baseTitle;
720
+ });
796
721
  return (_ctx, _cache) => {
797
- return openBlock(), createElementBlock("div", null, [
798
- createElementVNode("button", {
799
- class: normalizeClass({
800
- checkbox: true,
801
- checked: isChecked.value,
802
- indeterminate: isIndeterminate.value,
803
- disabled: props.disabled,
804
- error: props.error
805
- }),
722
+ return openBlock(), createElementBlock("button", {
723
+ class: normalizeClass({
724
+ "variable-toggle-button": true,
806
725
  disabled: props.disabled,
807
- title: props.title,
808
- "aria-label": props.title,
809
- "aria-checked": ariaChecked.value,
810
- "aria-describedby": ariaDescribedBy.value,
811
- "aria-invalid": props.error,
812
- type: "button",
813
- role: "checkbox",
814
- onClick: handleClick
815
- }, [
816
- createElementVNode("div", _hoisted_2$3, [
817
- icon.value ? (openBlock(), createBlock(KdsIcon, {
818
- key: 0,
819
- name: icon.value,
820
- class: "icon",
821
- size: "xsmall"
822
- }, null, 8, ["name"])) : createCommentVNode("", true)
823
- ]),
824
- props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
825
- createElementVNode("div", _hoisted_4$1, toDisplayString(props.label), 1),
826
- props.helperText ? (openBlock(), createElementBlock("div", {
827
- key: 0,
828
- id: unref(helperId),
829
- class: "helper-text"
830
- }, toDisplayString(props.helperText), 9, _hoisted_5$1)) : createCommentVNode("", true)
831
- ])) : createCommentVNode("", true)
832
- ], 10, _hoisted_1$b),
833
- props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
834
- createVNode(KdsSubText, {
835
- id: unref(descriptionId),
836
- "sub-text": props.subText,
837
- "preserve-sub-text-space": props.preserveSubTextSpace,
838
- error: props.error
839
- }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
840
- ])) : createCommentVNode("", true)
841
- ]);
726
+ error: props.error,
727
+ "pressed-or-set": modelValue.value || props.inSet || props.outSet,
728
+ hidden: props.hidden && !modelValue.value
729
+ }),
730
+ disabled: props.disabled,
731
+ title: title.value,
732
+ "aria-label": title.value,
733
+ "aria-pressed": modelValue.value,
734
+ type: "button",
735
+ onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value)
736
+ }, [
737
+ createVNode(KdsIcon, {
738
+ name: iconName.value,
739
+ size: "xsmall"
740
+ }, null, 8, ["name"])
741
+ ], 10, _hoisted_1$h);
842
742
  };
843
743
  }
844
744
  });
845
745
 
846
- const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-65cb29d7"]]);
746
+ const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-e9ec2634"]]);
847
747
 
848
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
849
- __name: "KdsCheckbox",
748
+ const _hoisted_1$g = ["disabled", "aria-pressed"];
749
+ const TITLE = "Click for more information";
750
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
751
+ __name: "KdsInfoToggleButton",
850
752
  props: /* @__PURE__ */ mergeModels({
851
753
  disabled: { type: Boolean, default: false },
852
- error: { type: Boolean, default: false },
853
- subText: {},
854
- preserveSubTextSpace: { type: Boolean, default: false },
855
- label: {},
856
- title: {}
754
+ hidden: { type: Boolean, default: false }
857
755
  }, {
858
- "modelValue": { type: [Boolean, String], ...{ default: false } },
756
+ "modelValue": { type: Boolean, ...{ default: false } },
859
757
  "modelModifiers": {}
860
758
  }),
861
759
  emits: ["update:modelValue"],
@@ -863,1197 +761,2391 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
863
761
  const props = __props;
864
762
  const modelValue = useModel(__props, "modelValue");
865
763
  return (_ctx, _cache) => {
866
- return openBlock(), createBlock(BaseCheckbox, {
867
- modelValue: modelValue.value,
868
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
764
+ return openBlock(), createElementBlock("button", {
765
+ class: normalizeClass({
766
+ "info-toggle-button": true,
767
+ selected: modelValue.value,
768
+ disabled: props.disabled,
769
+ hidden: props.hidden && !modelValue.value
770
+ }),
869
771
  disabled: props.disabled,
870
- error: props.error,
871
- label: props.label,
872
- title: props.title,
873
- "sub-text": props.subText,
874
- "preserve-sub-text-space": props.preserveSubTextSpace
875
- }, null, 8, ["modelValue", "disabled", "error", "label", "title", "sub-text", "preserve-sub-text-space"]);
772
+ title: TITLE,
773
+ "aria-label": TITLE,
774
+ "aria-pressed": modelValue.value,
775
+ type: "button",
776
+ onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value)
777
+ }, [
778
+ createVNode(KdsIcon, {
779
+ name: "circle-question",
780
+ size: "xsmall"
781
+ })
782
+ ], 10, _hoisted_1$g);
876
783
  };
877
784
  }
878
785
  });
879
786
 
880
- const createUnwrappedPromise = () => {
881
- let resolve = () => {
882
- };
883
- let reject = () => {
884
- };
885
- const promise = new Promise((res, rej) => {
886
- resolve = res;
887
- reject = rej;
888
- });
889
- return { resolve, reject, promise };
890
- };
787
+ const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-4b02c8d7"]]);
891
788
 
892
- const defaultCancelButton = {
893
- type: "cancel",
894
- label: "Cancel"
789
+ const _hoisted_1$f = ["data-visible"];
790
+ const _hoisted_2$6 = ["data-visible"];
791
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
792
+ __name: "KdsProgressButton",
793
+ props: /* @__PURE__ */ mergeModels({
794
+ size: { default: "medium" },
795
+ variant: { default: "filled" },
796
+ disabled: { type: Boolean, default: false },
797
+ label: {},
798
+ leadingIcon: {},
799
+ ariaLabel: {}
800
+ }, {
801
+ "state": {
802
+ default: "default"
803
+ },
804
+ "stateModifiers": {}
805
+ }),
806
+ emits: /* @__PURE__ */ mergeModels(["click"], ["update:state"]),
807
+ setup(__props, { emit: __emit }) {
808
+ const props = __props;
809
+ const emit = __emit;
810
+ const state = useModel(__props, "state");
811
+ const iconSize = computed(() => {
812
+ if (props.size === "xsmall") {
813
+ return "small";
814
+ }
815
+ return props.size;
816
+ });
817
+ function onClick(event) {
818
+ event.preventDefault();
819
+ if (state.value !== "default") {
820
+ return;
821
+ }
822
+ emit("click", event);
823
+ }
824
+ const baseButtonProps = computed(() => ({
825
+ variant: props.variant,
826
+ size: props.size,
827
+ disabled: props.disabled,
828
+ success: state.value === "success",
829
+ error: state.value === "error",
830
+ title: props.ariaLabel,
831
+ label: props.label,
832
+ leadingIcon: props.leadingIcon,
833
+ ariaLabel: props.ariaLabel
834
+ }));
835
+ return (_ctx, _cache) => {
836
+ return openBlock(), createBlock(BaseButton, mergeProps(baseButtonProps.value, {
837
+ class: "kds-progress-button",
838
+ "data-kds-progress-state": state.value,
839
+ onClick
840
+ }), {
841
+ leading: withCtx(() => [
842
+ createElementVNode("span", {
843
+ class: normalizeClass(["leading", iconSize.value])
844
+ }, [
845
+ createElementVNode("span", {
846
+ class: "leading-icon",
847
+ "data-visible": state.value !== "progress"
848
+ }, [
849
+ createVNode(KdsIcon, {
850
+ name: props.leadingIcon,
851
+ size: iconSize.value
852
+ }, null, 8, ["name", "size"])
853
+ ], 8, _hoisted_1$f),
854
+ createElementVNode("span", {
855
+ class: "spinner",
856
+ "data-visible": state.value === "progress"
857
+ }, [
858
+ createVNode(KdsLoadingSpinner, {
859
+ size: iconSize.value,
860
+ variant: props.variant === "filled" ? "onPrimary" : "onSurface"
861
+ }, null, 8, ["size", "variant"])
862
+ ], 8, _hoisted_2$6)
863
+ ], 2)
864
+ ]),
865
+ _: 1
866
+ }, 16, ["data-kds-progress-state"]);
867
+ };
868
+ }
869
+ });
870
+
871
+ const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-209e9133"]]);
872
+
873
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
874
+ __name: "KdsToggleButton",
875
+ props: /* @__PURE__ */ mergeModels({
876
+ size: {},
877
+ disabled: { type: Boolean },
878
+ title: {},
879
+ variant: { default: "outlined" },
880
+ label: {},
881
+ leadingIcon: {},
882
+ trailingIcon: {},
883
+ ariaLabel: {}
884
+ }, {
885
+ "modelValue": { type: Boolean, ...{ default: false } },
886
+ "modelModifiers": {}
887
+ }),
888
+ emits: ["update:modelValue"],
889
+ setup(__props) {
890
+ const props = __props;
891
+ const modelValue = useModel(__props, "modelValue");
892
+ return (_ctx, _cache) => {
893
+ return openBlock(), createBlock(BaseButton, mergeProps(props, {
894
+ toggled: modelValue.value,
895
+ "aria-pressed": modelValue.value,
896
+ onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value)
897
+ }), null, 16, ["toggled", "aria-pressed"]);
898
+ };
899
+ }
900
+ });
901
+
902
+ const _hoisted_1$e = ["id"];
903
+ const _hoisted_2$5 = { class: "subtext-text" };
904
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
905
+ __name: "KdsSubText",
906
+ props: {
907
+ id: {},
908
+ subText: {},
909
+ error: { type: Boolean, default: false },
910
+ validating: { type: Boolean, default: false },
911
+ preserveSubTextSpace: { type: Boolean, default: false }
912
+ },
913
+ setup(__props) {
914
+ const props = __props;
915
+ return (_ctx, _cache) => {
916
+ return props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", {
917
+ key: 0,
918
+ id: props.id,
919
+ class: normalizeClass({
920
+ subtext: true,
921
+ error: props.error
922
+ })
923
+ }, [
924
+ props.error && props.subText ? (openBlock(), createBlock(KdsIcon, {
925
+ key: 0,
926
+ name: "circle-error",
927
+ size: "small",
928
+ "aria-label": "Error"
929
+ })) : props.validating && props.subText ? (openBlock(), createBlock(KdsLoadingSpinner, {
930
+ key: 1,
931
+ size: "small",
932
+ variant: "onSurface",
933
+ "aria-hidden": "true"
934
+ })) : createCommentVNode("", true),
935
+ createElementVNode("span", _hoisted_2$5, toDisplayString(props.subText), 1)
936
+ ], 10, _hoisted_1$e)) : createCommentVNode("", true);
937
+ };
938
+ }
939
+ });
940
+
941
+ const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-58a95aa3"]]);
942
+
943
+ const _hoisted_1$d = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
944
+ const _hoisted_2$4 = { class: "control" };
945
+ const _hoisted_3$4 = {
946
+ key: 0,
947
+ class: "content"
895
948
  };
896
- const defaultConfirmButton = {
897
- type: "confirm",
898
- label: "Confirm"
949
+ const _hoisted_4$3 = { class: "label" };
950
+ const _hoisted_5$1 = ["id"];
951
+ const _hoisted_6$1 = {
952
+ key: 0,
953
+ class: "subtext-wrapper"
899
954
  };
900
- const isActive = ref(false);
901
- const activeModalConfig = ref(null);
902
- const unwrappedPromise = ref(createUnwrappedPromise());
903
- const resetInternalState = () => {
904
- isActive.value = false;
905
- unwrappedPromise.value = createUnwrappedPromise();
955
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
956
+ __name: "BaseCheckbox",
957
+ props: /* @__PURE__ */ mergeModels({
958
+ disabled: { type: Boolean, default: false },
959
+ error: { type: Boolean, default: false },
960
+ subText: {},
961
+ preserveSubTextSpace: { type: Boolean },
962
+ label: {},
963
+ title: {},
964
+ helperText: {}
965
+ }, {
966
+ "modelValue": { type: [Boolean, String], ...{ default: false } },
967
+ "modelModifiers": {}
968
+ }),
969
+ emits: ["update:modelValue"],
970
+ setup(__props) {
971
+ const props = __props;
972
+ const modelValue = useModel(__props, "modelValue");
973
+ const helperId = useId();
974
+ const descriptionId = useId();
975
+ const isChecked = computed(() => modelValue.value === true);
976
+ const isIndeterminate = computed(() => modelValue.value === "indeterminate");
977
+ const icon = computed(() => {
978
+ if (isChecked.value) {
979
+ return "checkmark";
980
+ }
981
+ if (isIndeterminate.value) {
982
+ return "minus";
983
+ }
984
+ return null;
985
+ });
986
+ const ariaChecked = computed(() => {
987
+ if (isIndeterminate.value) {
988
+ return "mixed";
989
+ }
990
+ return isChecked.value;
991
+ });
992
+ const ariaDescribedBy = computed(() => {
993
+ const ids = [];
994
+ if (props.helperText) {
995
+ ids.push(helperId);
996
+ }
997
+ if (props.subText) {
998
+ ids.push(descriptionId);
999
+ }
1000
+ return ids.length > 0 ? ids.join(" ") : void 0;
1001
+ });
1002
+ const handleClick = () => {
1003
+ if (props.disabled) {
1004
+ return;
1005
+ }
1006
+ modelValue.value = isIndeterminate.value ? true : !isChecked.value;
1007
+ };
1008
+ return (_ctx, _cache) => {
1009
+ return openBlock(), createElementBlock("div", null, [
1010
+ createElementVNode("button", {
1011
+ class: normalizeClass({
1012
+ checkbox: true,
1013
+ checked: isChecked.value,
1014
+ indeterminate: isIndeterminate.value,
1015
+ disabled: props.disabled,
1016
+ error: props.error
1017
+ }),
1018
+ disabled: props.disabled,
1019
+ title: props.title,
1020
+ "aria-label": props.title,
1021
+ "aria-checked": ariaChecked.value,
1022
+ "aria-describedby": ariaDescribedBy.value,
1023
+ "aria-invalid": props.error,
1024
+ type: "button",
1025
+ role: "checkbox",
1026
+ onClick: handleClick
1027
+ }, [
1028
+ createElementVNode("div", _hoisted_2$4, [
1029
+ icon.value ? (openBlock(), createBlock(KdsIcon, {
1030
+ key: 0,
1031
+ name: icon.value,
1032
+ class: "icon",
1033
+ size: "xsmall"
1034
+ }, null, 8, ["name"])) : createCommentVNode("", true)
1035
+ ]),
1036
+ props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
1037
+ createElementVNode("div", _hoisted_4$3, toDisplayString(props.label), 1),
1038
+ props.helperText ? (openBlock(), createElementBlock("div", {
1039
+ key: 0,
1040
+ id: unref(helperId),
1041
+ class: "helper-text"
1042
+ }, toDisplayString(props.helperText), 9, _hoisted_5$1)) : createCommentVNode("", true)
1043
+ ])) : createCommentVNode("", true)
1044
+ ], 10, _hoisted_1$d),
1045
+ props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
1046
+ createVNode(KdsSubText, {
1047
+ id: unref(descriptionId),
1048
+ "sub-text": props.subText,
1049
+ "preserve-sub-text-space": props.preserveSubTextSpace,
1050
+ error: props.error
1051
+ }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1052
+ ])) : createCommentVNode("", true)
1053
+ ]);
1054
+ };
1055
+ }
1056
+ });
1057
+
1058
+ const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-3751dc60"]]);
1059
+
1060
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1061
+ __name: "KdsCheckbox",
1062
+ props: /* @__PURE__ */ mergeModels({
1063
+ disabled: { type: Boolean, default: false },
1064
+ error: { type: Boolean, default: false },
1065
+ subText: {},
1066
+ preserveSubTextSpace: { type: Boolean, default: false },
1067
+ label: {},
1068
+ title: {}
1069
+ }, {
1070
+ "modelValue": { type: [Boolean, String], ...{ default: false } },
1071
+ "modelModifiers": {}
1072
+ }),
1073
+ emits: ["update:modelValue"],
1074
+ setup(__props) {
1075
+ const props = __props;
1076
+ const modelValue = useModel(__props, "modelValue");
1077
+ return (_ctx, _cache) => {
1078
+ return openBlock(), createBlock(BaseCheckbox, {
1079
+ modelValue: modelValue.value,
1080
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
1081
+ disabled: props.disabled,
1082
+ error: props.error,
1083
+ label: props.label,
1084
+ title: props.title,
1085
+ "sub-text": props.subText,
1086
+ "preserve-sub-text-space": props.preserveSubTextSpace
1087
+ }, null, 8, ["modelValue", "disabled", "error", "label", "title", "sub-text", "preserve-sub-text-space"]);
1088
+ };
1089
+ }
1090
+ });
1091
+
1092
+ const KDS_DARK_MODE_STORAGE_KEY = "KNIME_DARK_MODE";
1093
+ const defaultMode = "light";
1094
+ const useKdsDarkMode = () => {
1095
+ const userPreference = useLocalStorage(
1096
+ KDS_DARK_MODE_STORAGE_KEY,
1097
+ defaultMode
1098
+ );
1099
+ const isDark = useDark({
1100
+ storageKey: `${KDS_DARK_MODE_STORAGE_KEY}_EFFECTIVE`,
1101
+ initialValue: defaultMode,
1102
+ onChanged: (isDarkValue) => {
1103
+ let cssMode, themeValue;
1104
+ if (userPreference.value === "system") {
1105
+ cssMode = "light dark";
1106
+ themeValue = "system";
1107
+ } else {
1108
+ cssMode = themeValue = isDarkValue ? "dark" : "light";
1109
+ }
1110
+ document.documentElement.style.setProperty("color-scheme", cssMode);
1111
+ document.documentElement.dataset.theme = themeValue;
1112
+ }
1113
+ });
1114
+ const systemPrefersDark = usePreferredDark();
1115
+ watch(
1116
+ [userPreference, systemPrefersDark],
1117
+ ([preference, systemDark]) => {
1118
+ if (preference === "system") {
1119
+ isDark.value = systemDark;
1120
+ } else {
1121
+ isDark.value = preference === "dark";
1122
+ }
1123
+ },
1124
+ { immediate: true }
1125
+ );
1126
+ const currentMode = computed({
1127
+ get() {
1128
+ return userPreference.value;
1129
+ },
1130
+ set(value) {
1131
+ userPreference.value = value;
1132
+ }
1133
+ });
1134
+ const isDarkMode = computed(() => {
1135
+ return userPreference.value === "dark";
1136
+ });
1137
+ const isLightMode = computed(() => {
1138
+ return userPreference.value === "light";
1139
+ });
1140
+ const isSystemMode = computed(() => userPreference.value === "system");
1141
+ return {
1142
+ /** Exposes a writable computed ref to get the current dark mode but also use it in e.g. a v-model to set it */
1143
+ currentMode,
1144
+ /** Whether or not the current user preference is dark. Note, if the preference is set to 'system' it will return false. */
1145
+ isDarkMode,
1146
+ /** Whether or not the current user preference is light. Note, if the preference is set to 'system' it will return false. */
1147
+ isLightMode,
1148
+ /** Whether or not the current user preference is set to 'system'. */
1149
+ isSystemMode
1150
+ };
906
1151
  };
907
- const onClosed = () => {
908
- activeModalConfig.value = null;
1152
+
1153
+ const legacyMode = ref(false);
1154
+ const useKdsLegacyMode = (initialValue = false) => {
1155
+ if (legacyMode.value !== initialValue) {
1156
+ legacyMode.value = initialValue;
1157
+ }
1158
+ watch(
1159
+ () => legacyMode.value,
1160
+ (newValue) => {
1161
+ document.documentElement.classList.toggle("kds-legacy", newValue);
1162
+ },
1163
+ { immediate: true }
1164
+ );
1165
+ return {
1166
+ /** Writable ref to get and/or set the legacy mode; can also be used with v-model */
1167
+ legacyMode
1168
+ };
909
1169
  };
910
- const confirm = (doNotAskAgain = false) => {
911
- unwrappedPromise.value.resolve({
912
- confirmed: true,
913
- doNotAskAgain
1170
+
1171
+ function elementOverflowsHorizontally(element) {
1172
+ if (!element) {
1173
+ return false;
1174
+ }
1175
+ return element.scrollWidth > element.clientWidth;
1176
+ }
1177
+ function useKdsIsTruncated(elementRef) {
1178
+ const isTruncated = ref(false);
1179
+ useResizeObserver(elementRef, () => {
1180
+ isTruncated.value = elementOverflowsHorizontally(elementRef.value);
914
1181
  });
915
- resetInternalState();
916
- };
917
- const close = () => {
918
- const isConfirm = activeModalConfig.value?.type === "confirm";
919
- unwrappedPromise.value.resolve(isConfirm ? { confirmed: false } : void 0);
920
- resetInternalState();
921
- };
922
- const isTemplateBasedConfirm = (config) => {
923
- return "component" in config;
1182
+ return { isTruncated };
1183
+ }
1184
+
1185
+ const _hoisted_1$c = ["id", "for", "title"];
1186
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1187
+ __name: "KdsLabel",
1188
+ props: {
1189
+ label: {},
1190
+ id: {},
1191
+ for: {}
1192
+ },
1193
+ setup(__props) {
1194
+ const props = __props;
1195
+ const labelEl = ref(null);
1196
+ const { isTruncated } = useKdsIsTruncated(labelEl);
1197
+ return (_ctx, _cache) => {
1198
+ return openBlock(), createElementBlock("label", {
1199
+ id: props.id,
1200
+ ref_key: "labelEl",
1201
+ ref: labelEl,
1202
+ for: props.for,
1203
+ class: "label",
1204
+ title: unref(isTruncated) ? props.label : void 0
1205
+ }, toDisplayString(props.label), 9, _hoisted_1$c);
1206
+ };
1207
+ }
1208
+ });
1209
+
1210
+ const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-174d476a"]]);
1211
+
1212
+ const _hoisted_1$b = ["id", "aria-labelledby", "aria-describedby"];
1213
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1214
+ __name: "KdsCheckboxGroup",
1215
+ props: /* @__PURE__ */ mergeModels({
1216
+ id: {},
1217
+ label: {},
1218
+ possibleValues: {},
1219
+ alignment: { default: "vertical" },
1220
+ disabled: { type: Boolean, default: false },
1221
+ error: { type: Boolean, default: false },
1222
+ subText: {},
1223
+ preserveSubTextSpace: { type: Boolean }
1224
+ }, {
1225
+ "modelValue": { default: [] },
1226
+ "modelModifiers": {}
1227
+ }),
1228
+ emits: ["update:modelValue"],
1229
+ setup(__props) {
1230
+ const props = __props;
1231
+ const modelValue = useModel(__props, "modelValue");
1232
+ const possibleValues = computed(
1233
+ () => props.possibleValues.map((o) => {
1234
+ if (typeof o === "string") {
1235
+ return { text: o, id: o };
1236
+ }
1237
+ return o;
1238
+ })
1239
+ );
1240
+ const labelId = useId();
1241
+ const descriptionId = useId();
1242
+ const isOptionDisabled = (index) => props.disabled || possibleValues.value[index]?.disabled === true;
1243
+ const isHorizontal = computed(() => props.alignment === "horizontal");
1244
+ const hasError = computed(
1245
+ () => props.error || possibleValues.value.some((o) => o.error)
1246
+ );
1247
+ const isChecked = (id) => modelValue.value.includes(id);
1248
+ const handleCheckboxChange = (index, checked) => {
1249
+ if (isOptionDisabled(index)) {
1250
+ return;
1251
+ }
1252
+ const option = possibleValues.value[index];
1253
+ if (checked === true) {
1254
+ modelValue.value = [...modelValue.value, option.id];
1255
+ return;
1256
+ }
1257
+ modelValue.value = modelValue.value.filter((v) => v !== option.id);
1258
+ };
1259
+ return (_ctx, _cache) => {
1260
+ return openBlock(), createElementBlock("div", {
1261
+ id: props.id,
1262
+ class: "checkbox-group",
1263
+ role: "group",
1264
+ "aria-labelledby": props.label ? unref(labelId) : void 0,
1265
+ "aria-describedby": props.subText ? unref(descriptionId) : void 0
1266
+ }, [
1267
+ props.label ? (openBlock(), createBlock(KdsLabel, {
1268
+ key: 0,
1269
+ id: unref(labelId),
1270
+ label: props.label
1271
+ }, null, 8, ["id", "label"])) : createCommentVNode("", true),
1272
+ createElementVNode("div", {
1273
+ class: normalizeClass({ options: true, horizontal: isHorizontal.value })
1274
+ }, [
1275
+ (openBlock(true), createElementBlock(Fragment, null, renderList(possibleValues.value, (option, index) => {
1276
+ return openBlock(), createElementBlock("div", {
1277
+ key: option.id,
1278
+ class: "option"
1279
+ }, [
1280
+ createVNode(BaseCheckbox, {
1281
+ disabled: props.disabled || option.disabled,
1282
+ error: option.error,
1283
+ "helper-text": option.helperText,
1284
+ label: option.text,
1285
+ "model-value": isChecked(option.id),
1286
+ "onUpdate:modelValue": (checked) => handleCheckboxChange(index, checked)
1287
+ }, null, 8, ["disabled", "error", "helper-text", "label", "model-value", "onUpdate:modelValue"])
1288
+ ]);
1289
+ }), 128))
1290
+ ], 2),
1291
+ createVNode(KdsSubText, {
1292
+ id: unref(descriptionId),
1293
+ "sub-text": props.subText,
1294
+ "preserve-sub-text-space": props.preserveSubTextSpace,
1295
+ error: hasError.value
1296
+ }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1297
+ ], 8, _hoisted_1$b);
1298
+ };
1299
+ }
1300
+ });
1301
+
1302
+ const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-538e7d4c"]]);
1303
+
1304
+ const _hoisted_1$a = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
1305
+ const _hoisted_2$3 = { class: "control" };
1306
+ const _hoisted_3$3 = {
1307
+ key: 0,
1308
+ class: "dot",
1309
+ viewBox: "0 0 2 2",
1310
+ "aria-hidden": "true",
1311
+ focusable: "false"
924
1312
  };
925
- const updateConfig = (config) => {
926
- if (!isActive.value || !activeModalConfig.value || activeModalConfig.value.type === "confirm") {
927
- consola.warn("useKdsDynamicModal: invalid invocation of updateConfig");
928
- return;
1313
+ const _hoisted_4$2 = { class: "content" };
1314
+ const _hoisted_5 = { class: "label" };
1315
+ const _hoisted_6 = ["id"];
1316
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1317
+ __name: "KdsRadioButton",
1318
+ props: /* @__PURE__ */ mergeModels({
1319
+ text: {},
1320
+ helperText: {},
1321
+ disabled: { type: Boolean, default: false },
1322
+ error: { type: Boolean, default: false }
1323
+ }, {
1324
+ "modelValue": { type: Boolean, ...{ default: false } },
1325
+ "modelModifiers": {}
1326
+ }),
1327
+ emits: ["update:modelValue"],
1328
+ setup(__props) {
1329
+ const props = __props;
1330
+ const modelValue = useModel(__props, "modelValue");
1331
+ const id = useId();
1332
+ const handleClick = () => {
1333
+ if (props.disabled) {
1334
+ return;
1335
+ }
1336
+ if (!modelValue.value) {
1337
+ modelValue.value = true;
1338
+ }
1339
+ };
1340
+ return (_ctx, _cache) => {
1341
+ return openBlock(), createElementBlock("button", {
1342
+ "aria-checked": modelValue.value,
1343
+ "aria-describedby": props.helperText ? `${unref(id)}-helper` : void 0,
1344
+ "aria-invalid": props.error,
1345
+ class: normalizeClass({
1346
+ radio: true,
1347
+ selected: modelValue.value,
1348
+ disabled: props.disabled,
1349
+ error: props.error
1350
+ }),
1351
+ disabled: props.disabled,
1352
+ role: "radio",
1353
+ type: "button",
1354
+ onClick: handleClick
1355
+ }, [
1356
+ createElementVNode("div", _hoisted_2$3, [
1357
+ modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$3, [..._cache[0] || (_cache[0] = [
1358
+ createElementVNode("circle", {
1359
+ cx: "1",
1360
+ cy: "1",
1361
+ r: "1"
1362
+ }, null, -1)
1363
+ ])])) : createCommentVNode("", true)
1364
+ ]),
1365
+ createElementVNode("div", _hoisted_4$2, [
1366
+ createElementVNode("div", _hoisted_5, toDisplayString(props.text), 1),
1367
+ props.helperText ? (openBlock(), createElementBlock("div", {
1368
+ key: 0,
1369
+ id: `${unref(id)}-helper`,
1370
+ class: "helper-text"
1371
+ }, toDisplayString(props.helperText), 9, _hoisted_6)) : createCommentVNode("", true)
1372
+ ])
1373
+ ], 10, _hoisted_1$a);
1374
+ };
929
1375
  }
930
- activeModalConfig.value.value = {
931
- ...activeModalConfig.value.value,
932
- ...config
1376
+ });
1377
+
1378
+ const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-a7490a52"]]);
1379
+
1380
+ const useRadioSelection = ({
1381
+ selectedId,
1382
+ options,
1383
+ globalDisable,
1384
+ globalError,
1385
+ optionContainer
1386
+ }) => {
1387
+ const focusOptionAtIndex = (index) => {
1388
+ const radios = optionContainer?.value?.querySelectorAll(
1389
+ 'button[role="radio"]'
1390
+ );
1391
+ radios?.[index]?.focus();
933
1392
  };
934
- };
935
- const internal = {
936
- confirm,
937
- close,
938
- isTemplateBasedConfirm,
939
- onClosed,
940
- updateConfig
941
- };
942
- const useKdsDynamicModal = () => {
943
- function askConfirmation(config) {
944
- activeModalConfig.value = {
945
- type: "confirm",
946
- value: {
947
- buttons: [defaultCancelButton, defaultConfirmButton],
948
- ...config
1393
+ const isIndexDisabled = (index) => globalDisable?.value || options.value[index]?.disabled === true;
1394
+ const hasError = computed(
1395
+ () => globalError?.value || options.value.some((o) => o.error)
1396
+ );
1397
+ const selectedIndex = computed(
1398
+ () => options.value.findIndex((o) => o.id === selectedId.value)
1399
+ );
1400
+ const firstEnabledIndex = computed(
1401
+ () => options.value.findIndex((_, index) => !isIndexDisabled(index))
1402
+ );
1403
+ const tabIndexForOption = (index) => {
1404
+ if (isIndexDisabled(index)) {
1405
+ return void 0;
1406
+ }
1407
+ if (selectedIndex.value >= 0) {
1408
+ return selectedIndex.value === index ? 0 : -1;
1409
+ }
1410
+ return firstEnabledIndex.value === index ? 0 : -1;
1411
+ };
1412
+ const selectIndex = (index) => {
1413
+ if (isIndexDisabled(index)) {
1414
+ return;
1415
+ }
1416
+ selectedId.value = options.value[index]?.id;
1417
+ };
1418
+ const nextEnabledIndex = (startIndex, direction) => {
1419
+ const total = options.value.length;
1420
+ if (total === 0) {
1421
+ return -1;
1422
+ }
1423
+ let index = startIndex;
1424
+ for (let i = 0; i < total; i++) {
1425
+ index = (index + direction + total) % total;
1426
+ if (!isIndexDisabled(index)) {
1427
+ return index;
949
1428
  }
950
- };
951
- isActive.value = true;
952
- return unwrappedPromise.value.promise;
953
- }
954
- const showByTemplate = (config) => {
955
- activeModalConfig.value = {
956
- type: "dynamic",
957
- value: config
958
- };
959
- isActive.value = true;
960
- return unwrappedPromise.value.promise;
1429
+ }
1430
+ return -1;
961
1431
  };
962
- return {
963
- askConfirmation,
964
- showByTemplate,
965
- config: computed(() => activeModalConfig.value),
966
- isActive: computed(() => isActive.value),
967
- close: () => internal.close()
1432
+ const moveSelection = (currentIndex, direction) => {
1433
+ const nextIndex = nextEnabledIndex(currentIndex, direction);
1434
+ if (nextIndex < 0) {
1435
+ return;
1436
+ }
1437
+ selectIndex(nextIndex);
1438
+ focusOptionAtIndex(nextIndex);
968
1439
  };
969
- };
970
-
971
- const _hoisted_1$a = {
972
- key: 1,
973
- class: "confirmation"
974
- };
975
- const _hoisted_2$2 = { class: "message" };
976
- const _hoisted_3$1 = {
977
- key: 0,
978
- class: "ask-again"
979
- };
980
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
981
- __name: "KdsDynamicModalProvider",
982
- setup(__props) {
983
- const askAgain = ref(false);
984
- const { config, isActive } = useKdsDynamicModal();
985
- const reset = () => {
986
- askAgain.value = false;
987
- };
988
- const onConfirm = () => {
989
- internal.confirm(askAgain.value);
990
- reset();
991
- };
992
- const onClose = () => {
993
- internal.close();
994
- reset();
995
- };
996
- const handleConfirmButton = (button) => {
997
- if (!button.customHandler) {
998
- const handler = button.type === "cancel" ? onClose : onConfirm;
999
- handler();
1440
+ const goToFirstEnabled = () => {
1441
+ const nextIndex = firstEnabledIndex.value;
1442
+ if (nextIndex < 0) {
1443
+ return;
1444
+ }
1445
+ selectIndex(nextIndex);
1446
+ focusOptionAtIndex(nextIndex);
1447
+ };
1448
+ const goToLastEnabled = () => {
1449
+ for (let i = options.value.length - 1; i >= 0; i--) {
1450
+ if (!isIndexDisabled(i)) {
1451
+ selectIndex(i);
1452
+ focusOptionAtIndex(i);
1453
+ break;
1454
+ }
1455
+ }
1456
+ };
1457
+ const handleKeyDown = (event, currentIndex) => {
1458
+ if (globalDisable?.value) {
1459
+ return;
1460
+ }
1461
+ switch (event.key) {
1462
+ case "ArrowDown":
1463
+ case "ArrowRight": {
1464
+ event.preventDefault();
1465
+ moveSelection(currentIndex, 1);
1000
1466
  return;
1001
1467
  }
1002
- if (button.type === "cancel") {
1003
- button.customHandler({ cancel: onClose });
1468
+ case "ArrowUp":
1469
+ case "ArrowLeft": {
1470
+ event.preventDefault();
1471
+ moveSelection(currentIndex, -1);
1472
+ return;
1004
1473
  }
1005
- if (button.type === "confirm") {
1006
- button.customHandler({ confirm: onConfirm });
1474
+ case "Home": {
1475
+ event.preventDefault();
1476
+ goToFirstEnabled();
1477
+ return;
1007
1478
  }
1008
- };
1009
- const defaultVariant = (type) => type === "cancel" ? "transparent" : "filled";
1010
- const kdsModalProps = computed(() => {
1011
- if (!config.value) {
1012
- return {};
1479
+ case "End": {
1480
+ event.preventDefault();
1481
+ goToLastEnabled();
1482
+ return;
1013
1483
  }
1014
- const { icon, title, height, width, variant, overflow, closedby } = config.value.value;
1015
- return {
1016
- icon,
1017
- title,
1018
- height,
1019
- width,
1020
- variant,
1021
- overflow,
1022
- closedby,
1023
- onClose,
1024
- onClosed: internal.onClosed,
1025
- active: isActive.value
1026
- };
1484
+ case " ":
1485
+ case "Enter": {
1486
+ event.preventDefault();
1487
+ selectIndex(currentIndex);
1488
+ }
1489
+ }
1490
+ };
1491
+ return {
1492
+ hasError,
1493
+ selectedIndex,
1494
+ tabIndexForOption,
1495
+ handleClick: selectIndex,
1496
+ handleKeyDown
1497
+ };
1498
+ };
1499
+
1500
+ const _hoisted_1$9 = ["id", "aria-labelledby", "aria-describedby"];
1501
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1502
+ __name: "KdsRadioButtonGroup",
1503
+ props: /* @__PURE__ */ mergeModels({
1504
+ id: {},
1505
+ label: {},
1506
+ possibleValues: {},
1507
+ alignment: { default: "vertical" },
1508
+ disabled: { type: Boolean, default: false },
1509
+ subText: {},
1510
+ preserveSubTextSpace: { type: Boolean }
1511
+ }, {
1512
+ "modelValue": {},
1513
+ "modelModifiers": {}
1514
+ }),
1515
+ emits: ["update:modelValue"],
1516
+ setup(__props) {
1517
+ const props = __props;
1518
+ const modelValue = useModel(__props, "modelValue");
1519
+ const options = computed(
1520
+ () => props.possibleValues.map((o) => {
1521
+ if (typeof o === "string") {
1522
+ return { text: o, id: o };
1523
+ }
1524
+ return o;
1525
+ })
1526
+ );
1527
+ const labelId = useId();
1528
+ const descriptionId = useId();
1529
+ const groupName = useId();
1530
+ const optionContainer = ref(null);
1531
+ const { tabIndexForOption, handleClick, handleKeyDown, hasError } = useRadioSelection({
1532
+ selectedId: modelValue,
1533
+ options,
1534
+ globalDisable: computed(() => props.disabled),
1535
+ optionContainer
1027
1536
  });
1028
1537
  return (_ctx, _cache) => {
1029
- return openBlock(), createBlock(KdsModal, mergeProps({ class: "confirm-modal" }, kdsModalProps.value), createSlots({ _: 2 }, [
1030
- unref(config)?.type === "confirm" ? {
1031
- name: "body",
1032
- fn: withCtx(() => [
1033
- unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$a, [
1034
- createElementVNode("div", _hoisted_2$2, toDisplayString(unref(config).value.message), 1),
1035
- unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1036
- createVNode(_sfc_main$c, {
1037
- modelValue: askAgain.value,
1038
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
1039
- label: unref(config).value.doNotAskAgain.label,
1040
- "sub-text": unref(config).value.doNotAskAgain.subText
1041
- }, null, 8, ["modelValue", "label", "sub-text"])
1042
- ])) : createCommentVNode("", true)
1043
- ]))
1044
- ]),
1045
- key: "0"
1046
- } : void 0,
1047
- unref(config)?.type === "confirm" ? {
1048
- name: "footer",
1049
- fn: withCtx(() => [
1050
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
1051
- return openBlock(), createBlock(_sfc_main$j, {
1052
- key: index,
1053
- destructive: button.destructive,
1054
- autofocus: button.autofocus,
1055
- label: button.label,
1056
- variant: button.variant ?? defaultVariant(button.type),
1057
- class: normalizeClass({ "flush-left": button.flushLeft }),
1058
- "data-test-id": `${button.type}-button`,
1059
- onClick: ($event) => handleConfirmButton(button)
1060
- }, null, 8, ["destructive", "autofocus", "label", "variant", "class", "data-test-id", "onClick"]);
1061
- }), 128))
1062
- ]),
1063
- key: "1"
1064
- } : void 0,
1065
- unref(config)?.type === "dynamic" ? {
1066
- name: "default",
1067
- fn: withCtx((slotProps) => [
1068
- (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), normalizeProps(guardReactiveProps({
1069
- ...slotProps,
1070
- context: unref(config).value.context,
1071
- updateConfig: unref(internal).updateConfig
1072
- })), null, 16))
1073
- ]),
1074
- key: "2"
1075
- } : void 0
1076
- ]), 1040);
1538
+ return openBlock(), createElementBlock("div", {
1539
+ id: props.id,
1540
+ class: "radio-button-group",
1541
+ role: "radiogroup",
1542
+ "aria-labelledby": props.label ? unref(labelId) : void 0,
1543
+ "aria-describedby": props.subText ? unref(descriptionId) : void 0
1544
+ }, [
1545
+ props.label ? (openBlock(), createBlock(KdsLabel, {
1546
+ key: 0,
1547
+ id: unref(labelId),
1548
+ label: props.label
1549
+ }, null, 8, ["id", "label"])) : createCommentVNode("", true),
1550
+ createElementVNode("div", {
1551
+ ref_key: "optionContainer",
1552
+ ref: optionContainer,
1553
+ class: normalizeClass({ options: true, horizontal: props.alignment === "horizontal" })
1554
+ }, [
1555
+ (openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option, index) => {
1556
+ return openBlock(), createElementBlock("div", {
1557
+ key: option.id,
1558
+ class: "option"
1559
+ }, [
1560
+ createVNode(KdsRadioButton, {
1561
+ disabled: props.disabled || option.disabled,
1562
+ error: option.error,
1563
+ "helper-text": option.helperText,
1564
+ text: option.text,
1565
+ "model-value": modelValue.value === option.id,
1566
+ tabindex: unref(tabIndexForOption)(index),
1567
+ name: unref(groupName),
1568
+ onKeydown: (e) => unref(handleKeyDown)(e, index),
1569
+ "onUpdate:modelValue": () => unref(handleClick)(index)
1570
+ }, null, 8, ["disabled", "error", "helper-text", "text", "model-value", "tabindex", "name", "onKeydown", "onUpdate:modelValue"])
1571
+ ]);
1572
+ }), 128))
1573
+ ], 2),
1574
+ createVNode(KdsSubText, {
1575
+ id: unref(descriptionId),
1576
+ "sub-text": props.subText,
1577
+ "preserve-sub-text-space": props.preserveSubTextSpace,
1578
+ error: unref(hasError)
1579
+ }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1580
+ ], 8, _hoisted_1$9);
1077
1581
  };
1078
1582
  }
1079
1583
  });
1080
1584
 
1081
- const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-c0769cfd"]]);
1585
+ const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-b0e27ba1"]]);
1082
1586
 
1083
- const _hoisted_1$9 = ["data-style"];
1084
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
1085
- __name: "KdsLoadingSpinner",
1587
+ const _hoisted_1$8 = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
1588
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1589
+ __name: "ValueSwitchItem",
1086
1590
  props: {
1591
+ selected: { type: Boolean },
1592
+ disabled: { type: Boolean, default: false },
1087
1593
  size: { default: "medium" },
1088
- style: { default: "onSurface" }
1594
+ variant: { default: "default" },
1595
+ tabIndex: { default: void 0 },
1596
+ hideIcons: { type: Boolean },
1597
+ text: {},
1598
+ leadingIcon: {},
1599
+ trailingIcon: {},
1600
+ title: {}
1089
1601
  },
1090
- setup(__props) {
1091
- return (_ctx, _cache) => {
1092
- return openBlock(), createElementBlock("svg", {
1093
- class: normalizeClass(["kds-loading-spinner", __props.size]),
1094
- "data-style": __props.style,
1095
- viewBox: "0 0 120 120"
1096
- }, [..._cache[0] || (_cache[0] = [
1097
- createElementVNode("circle", {
1098
- class: "track",
1099
- cx: "60",
1100
- cy: "60",
1101
- r: "50"
1102
- }, null, -1),
1103
- createElementVNode("circle", {
1104
- class: "loader",
1105
- cx: "60",
1106
- cy: "60",
1107
- r: "50"
1108
- }, null, -1)
1109
- ])], 10, _hoisted_1$9);
1110
- };
1111
- }
1112
- });
1113
-
1114
- const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-13c830ad"]]);
1115
-
1116
- const _hoisted_1$8 = ["disabled", "title", "aria-label", "aria-pressed"];
1117
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1118
- __name: "KdsVariableToggleButton",
1119
- props: /* @__PURE__ */ mergeModels({
1120
- disabled: { type: Boolean, default: false },
1121
- hidden: { type: Boolean, default: false },
1122
- inSet: { type: Boolean, default: false },
1123
- outSet: { type: Boolean, default: false },
1124
- error: { type: Boolean, default: false }
1125
- }, {
1126
- "modelValue": { type: Boolean, ...{ default: false } },
1127
- "modelModifiers": {}
1128
- }),
1129
- emits: ["update:modelValue"],
1130
1602
  setup(__props) {
1131
1603
  const props = __props;
1132
- const modelValue = useModel(__props, "modelValue");
1133
- const iconState = computed(() => {
1134
- if (props.inSet && props.outSet) {
1135
- return "in-out";
1136
- }
1137
- if (props.inSet) {
1138
- return "in";
1139
- }
1140
- if (props.outSet) {
1141
- return "out";
1142
- }
1143
- return "none";
1144
- });
1145
- const iconName = computed(() => {
1146
- switch (iconState.value) {
1147
- case "in":
1148
- return "flow-variable-in";
1149
- case "out":
1150
- return "flow-variable-out";
1151
- case "in-out":
1152
- return "flow-variable-in-out";
1153
- case "none":
1154
- default:
1155
- return "flow-variable-default";
1156
- }
1157
- });
1158
- const baseTitleByState = {
1159
- in: "Input Flow Variable",
1160
- out: "Output Flow Variable",
1161
- "in-out": "Input and Output Flow Variable",
1162
- none: "No Flow Variable set"
1163
- };
1164
- const errorTitleByState = {
1165
- in: "Error in input Flow Variable",
1166
- out: "Error in output Flow Variable",
1167
- "in-out": "Error in Flow Variables"
1168
- };
1169
- const title = computed(() => {
1170
- const baseTitle = baseTitleByState[iconState.value];
1171
- if (!props.error) {
1172
- return baseTitle;
1173
- }
1174
- return errorTitleByState[iconState.value] ?? baseTitle;
1175
- });
1604
+ const optionTextEl = ref(null);
1605
+ const { isTruncated } = useKdsIsTruncated(optionTextEl);
1176
1606
  return (_ctx, _cache) => {
1177
1607
  return openBlock(), createElementBlock("button", {
1608
+ role: "radio",
1609
+ "aria-checked": props.selected,
1610
+ "aria-label": props.text ? void 0 : props.title,
1178
1611
  class: normalizeClass({
1179
- "variable-toggle-button": true,
1612
+ option: true,
1613
+ selected: props.selected,
1180
1614
  disabled: props.disabled,
1181
- error: props.error,
1182
- "pressed-or-set": modelValue.value || props.inSet || props.outSet,
1183
- hidden: props.hidden && !modelValue.value
1615
+ "variant-muted": props.variant === "muted",
1616
+ "size-small": props.size === "small"
1184
1617
  }),
1185
1618
  disabled: props.disabled,
1186
- title: title.value,
1187
- "aria-label": title.value,
1188
- "aria-pressed": modelValue.value,
1189
- type: "button",
1190
- onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value)
1619
+ tabindex: props.tabIndex,
1620
+ title: props.title ?? (unref(isTruncated) && props.text ? props.text : void 0)
1191
1621
  }, [
1192
- createVNode(KdsIcon, {
1193
- name: iconName.value,
1194
- size: "xsmall"
1195
- }, null, 8, ["name"])
1622
+ props.leadingIcon && (!props.hideIcons || !props.text) ? (openBlock(), createBlock(KdsIcon, {
1623
+ key: 0,
1624
+ name: props.leadingIcon,
1625
+ size: props.size
1626
+ }, null, 8, ["name", "size"])) : createCommentVNode("", true),
1627
+ props.text ? (openBlock(), createElementBlock("span", {
1628
+ key: 1,
1629
+ ref_key: "optionTextEl",
1630
+ ref: optionTextEl,
1631
+ class: "option-label"
1632
+ }, toDisplayString(props.text), 513)) : createCommentVNode("", true),
1633
+ props.trailingIcon && !props.hideIcons ? (openBlock(), createBlock(KdsIcon, {
1634
+ key: 2,
1635
+ name: props.trailingIcon,
1636
+ size: props.size
1637
+ }, null, 8, ["name", "size"])) : createCommentVNode("", true)
1196
1638
  ], 10, _hoisted_1$8);
1197
1639
  };
1198
1640
  }
1199
1641
  });
1200
1642
 
1201
- const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-8b6f8b81"]]);
1643
+ const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-68535333"]]);
1202
1644
 
1203
- const _hoisted_1$7 = ["disabled", "aria-pressed"];
1204
- const TITLE = "Click for more information";
1205
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1206
- __name: "KdsInfoToggleButton",
1645
+ const useValueSwitchIconHiding = ({
1646
+ width,
1647
+ options
1648
+ }) => {
1649
+ const itemEls = ref(/* @__PURE__ */ new Map());
1650
+ onBeforeUpdate(() => {
1651
+ itemEls.value = /* @__PURE__ */ new Map();
1652
+ });
1653
+ const setItemEl = (id, el) => {
1654
+ const elementToRegister = el && typeof el === "object" && "$el" in el ? el.$el : el;
1655
+ if (elementToRegister instanceof HTMLButtonElement) {
1656
+ itemEls.value.set(id, elementToRegister);
1657
+ }
1658
+ };
1659
+ const shouldHideIcons = ref(false);
1660
+ const hasLabelEllipsis = (id) => {
1661
+ const el = itemEls.value.get(id);
1662
+ if (!el) {
1663
+ return false;
1664
+ }
1665
+ const label = el.querySelector(".option-label");
1666
+ return elementOverflowsHorizontally(label);
1667
+ };
1668
+ const anyOptionHasEllipsis = () => options.value.some((option) => {
1669
+ if (!option.text) {
1670
+ return false;
1671
+ }
1672
+ if (!option.leadingIcon && !option.trailingIcon) {
1673
+ return false;
1674
+ }
1675
+ return hasLabelEllipsis(option.id);
1676
+ });
1677
+ watch(
1678
+ () => [width.value, options.value],
1679
+ async () => {
1680
+ shouldHideIcons.value = false;
1681
+ await nextTick();
1682
+ shouldHideIcons.value = anyOptionHasEllipsis();
1683
+ },
1684
+ {
1685
+ immediate: true
1686
+ }
1687
+ );
1688
+ return {
1689
+ shouldHideIcons,
1690
+ setItemEl
1691
+ };
1692
+ };
1693
+
1694
+ const _hoisted_1$7 = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
1695
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1696
+ __name: "KdsValueSwitch",
1207
1697
  props: /* @__PURE__ */ mergeModels({
1698
+ id: {},
1699
+ label: {},
1700
+ possibleValues: {},
1701
+ size: { default: "medium" },
1702
+ variant: { default: "default" },
1208
1703
  disabled: { type: Boolean, default: false },
1209
- hidden: { type: Boolean, default: false }
1704
+ subText: {},
1705
+ error: { type: Boolean },
1706
+ preserveSubTextSpace: { type: Boolean }
1210
1707
  }, {
1211
- "modelValue": { type: Boolean, ...{ default: false } },
1708
+ "modelValue": {},
1212
1709
  "modelModifiers": {}
1213
1710
  }),
1214
1711
  emits: ["update:modelValue"],
1215
1712
  setup(__props) {
1216
1713
  const props = __props;
1217
1714
  const modelValue = useModel(__props, "modelValue");
1715
+ const options = computed(
1716
+ () => props.possibleValues.map((o) => {
1717
+ if (typeof o === "string") {
1718
+ return { text: o, id: o };
1719
+ }
1720
+ return o;
1721
+ })
1722
+ );
1723
+ const labelId = useId();
1724
+ const descriptionId = useId();
1725
+ const availableWidthContainer = ref(null);
1726
+ const { width } = useElementSize(availableWidthContainer);
1727
+ const { shouldHideIcons, setItemEl } = useValueSwitchIconHiding({
1728
+ width,
1729
+ options
1730
+ });
1731
+ const optionContainer = ref(null);
1732
+ const { tabIndexForOption, handleClick, handleKeyDown } = useRadioSelection({
1733
+ selectedId: modelValue,
1734
+ options,
1735
+ globalDisable: computed(() => props.disabled),
1736
+ optionContainer
1737
+ });
1218
1738
  return (_ctx, _cache) => {
1219
- return openBlock(), createElementBlock("button", {
1739
+ return openBlock(), createElementBlock("div", {
1740
+ id: props.id,
1741
+ ref_key: "availableWidthContainer",
1742
+ ref: availableWidthContainer,
1743
+ role: "radiogroup",
1220
1744
  class: normalizeClass({
1221
- "info-toggle-button": true,
1222
- selected: modelValue.value,
1223
- disabled: props.disabled,
1224
- hidden: props.hidden && !modelValue.value
1745
+ "value-switch": true,
1746
+ "size-small": props.size === "small"
1225
1747
  }),
1226
- disabled: props.disabled,
1227
- title: TITLE,
1228
- "aria-label": TITLE,
1229
- "aria-pressed": modelValue.value,
1230
- type: "button",
1231
- onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value)
1748
+ "aria-invalid": props.error || void 0,
1749
+ "aria-labelledby": props.label ? unref(labelId) : void 0,
1750
+ "aria-describedby": props.subText ? unref(descriptionId) : void 0
1232
1751
  }, [
1233
- createVNode(KdsIcon, {
1234
- name: "circle-question",
1235
- size: "xsmall"
1236
- })
1752
+ props.label ? (openBlock(), createBlock(KdsLabel, {
1753
+ key: 0,
1754
+ id: unref(labelId),
1755
+ label: props.label
1756
+ }, null, 8, ["id", "label"])) : createCommentVNode("", true),
1757
+ createElementVNode("div", {
1758
+ ref_key: "optionContainer",
1759
+ ref: optionContainer,
1760
+ class: normalizeClass({ options: true, error: props.error })
1761
+ }, [
1762
+ (openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option, index) => {
1763
+ return openBlock(), createBlock(ValueSwitchItem, mergeProps({
1764
+ key: option.id,
1765
+ ref_for: true,
1766
+ ref: (el) => unref(setItemEl)(option.id, el)
1767
+ }, { ref_for: true }, option, {
1768
+ "hide-icons": unref(shouldHideIcons),
1769
+ selected: modelValue.value === option.id,
1770
+ disabled: props.disabled || option.disabled,
1771
+ size: props.size,
1772
+ variant: props.variant,
1773
+ "tab-index": unref(tabIndexForOption)(index),
1774
+ title: option.title,
1775
+ onClick: () => unref(handleClick)(index),
1776
+ onKeydown: ($event) => unref(handleKeyDown)($event, index)
1777
+ }), null, 16, ["hide-icons", "selected", "disabled", "size", "variant", "tab-index", "title", "onClick", "onKeydown"]);
1778
+ }), 128))
1779
+ ], 2),
1780
+ createVNode(KdsSubText, {
1781
+ id: unref(descriptionId),
1782
+ "sub-text": props.subText,
1783
+ "preserve-sub-text-space": props.preserveSubTextSpace,
1784
+ error: props.error
1785
+ }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1237
1786
  ], 10, _hoisted_1$7);
1238
1787
  };
1239
1788
  }
1240
1789
  });
1241
1790
 
1242
- const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-24b40e36"]]);
1791
+ const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-e5da4485"]]);
1243
1792
 
1244
- const _hoisted_1$6 = ["data-visible"];
1245
- const _hoisted_2$1 = ["data-visible"];
1246
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1247
- __name: "KdsProgressButton",
1248
- props: /* @__PURE__ */ mergeModels({
1249
- size: { default: "medium" },
1250
- variant: { default: "filled" },
1251
- disabled: { type: Boolean, default: false },
1793
+ const _hoisted_1$6 = { class: "kds-form-field" };
1794
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1795
+ __name: "BaseFormFieldWrapper",
1796
+ props: {
1797
+ id: {},
1252
1798
  label: {},
1253
- leadingIcon: {},
1254
- ariaLabel: {}
1255
- }, {
1256
- "state": {
1257
- default: "default"
1258
- },
1259
- "stateModifiers": {}
1260
- }),
1261
- emits: /* @__PURE__ */ mergeModels(["click"], ["update:state"]),
1262
- setup(__props, { emit: __emit }) {
1799
+ ariaLabel: {},
1800
+ subText: {},
1801
+ error: { type: Boolean },
1802
+ validating: { type: Boolean },
1803
+ preserveSubTextSpace: { type: Boolean }
1804
+ },
1805
+ setup(__props) {
1263
1806
  const props = __props;
1264
- const emit = __emit;
1265
- const state = useModel(__props, "state");
1266
- const iconSize = computed(() => {
1267
- if (props.size === "xsmall") {
1268
- return "small";
1269
- }
1270
- return props.size;
1271
- });
1272
- function onClick(event) {
1273
- event.preventDefault();
1274
- if (state.value !== "default") {
1275
- return;
1276
- }
1277
- emit("click", event);
1278
- }
1279
- const baseButtonProps = computed(() => ({
1280
- variant: props.variant,
1281
- size: props.size,
1282
- disabled: props.disabled,
1283
- success: state.value === "success",
1284
- error: state.value === "error",
1285
- title: props.ariaLabel,
1286
- label: props.label,
1287
- leadingIcon: props.leadingIcon,
1288
- ariaLabel: props.ariaLabel
1289
- }));
1807
+ const fallbackId = useId();
1808
+ const inputId = computed(() => props.id ?? fallbackId);
1809
+ const labelId = computed(() => `${inputId.value}-label`);
1810
+ const subTextId = computed(() => `${inputId.value}-subtext`);
1290
1811
  return (_ctx, _cache) => {
1291
- return openBlock(), createBlock(BaseButton, mergeProps(baseButtonProps.value, {
1292
- class: "kds-progress-button",
1293
- "data-kds-progress-state": state.value,
1294
- onClick
1295
- }), {
1296
- leading: withCtx(() => [
1297
- createElementVNode("span", {
1298
- class: normalizeClass(["leading", iconSize.value])
1299
- }, [
1300
- createElementVNode("span", {
1301
- class: "leading-icon",
1302
- "data-visible": state.value !== "progress"
1303
- }, [
1304
- createVNode(KdsIcon, {
1305
- name: props.leadingIcon,
1306
- size: iconSize.value
1307
- }, null, 8, ["name", "size"])
1308
- ], 8, _hoisted_1$6),
1309
- createElementVNode("span", {
1310
- class: "spinner",
1311
- "data-visible": state.value === "progress"
1312
- }, [
1313
- createVNode(KdsLoadingSpinner, {
1314
- size: iconSize.value,
1315
- style: normalizeStyle(props.variant === "filled" ? "onPrimary" : "onSurface")
1316
- }, null, 8, ["size", "style"])
1317
- ], 8, _hoisted_2$1)
1318
- ], 2)
1319
- ]),
1320
- _: 1
1321
- }, 16, ["data-kds-progress-state"]);
1812
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
1813
+ props.label ? (openBlock(), createBlock(KdsLabel, {
1814
+ key: 0,
1815
+ id: labelId.value,
1816
+ for: inputId.value,
1817
+ label: props.label
1818
+ }, null, 8, ["id", "for", "label"])) : createCommentVNode("", true),
1819
+ renderSlot(_ctx.$slots, "default", {
1820
+ id: inputId.value,
1821
+ ariaLabelledby: props.label ? labelId.value : void 0,
1822
+ ariaDescribedby: props.subText ? subTextId.value : void 0,
1823
+ ariaLabel: props.label ? void 0 : props.ariaLabel,
1824
+ ariaInvalid: props.error
1825
+ }, void 0, true),
1826
+ createVNode(KdsSubText, {
1827
+ id: subTextId.value,
1828
+ "sub-text": props.subText,
1829
+ error: props.error,
1830
+ validating: props.validating,
1831
+ "preserve-sub-text-space": props.preserveSubTextSpace
1832
+ }, null, 8, ["id", "sub-text", "error", "validating", "preserve-sub-text-space"])
1833
+ ]);
1322
1834
  };
1323
1835
  }
1324
1836
  });
1325
1837
 
1326
- const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-6648b2f8"]]);
1838
+ const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-016a46e9"]]);
1327
1839
 
1328
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1329
- __name: "KdsToggleButton",
1840
+ const _hoisted_1$5 = {
1841
+ key: 0,
1842
+ class: "icon-wrapper leading"
1843
+ };
1844
+ const _hoisted_2$2 = ["id", "value", "type", "inputmode", "placeholder", "disabled", "readonly", "required", "name", "autocomplete", "min", "max", "step", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "role", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext"];
1845
+ const _hoisted_3$2 = {
1846
+ key: 3,
1847
+ class: "trailing-slot"
1848
+ };
1849
+ const _hoisted_4$1 = {
1850
+ key: 4,
1851
+ class: "icon-wrapper trailing"
1852
+ };
1853
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1854
+ __name: "BaseInput",
1330
1855
  props: /* @__PURE__ */ mergeModels({
1331
- size: {},
1332
- disabled: { type: Boolean },
1333
- title: {},
1334
- variant: { default: "outlined" },
1335
- label: {},
1336
- leadingIcon: {},
1337
- trailingIcon: {},
1338
- ariaLabel: {}
1856
+ id: {},
1857
+ type: { default: "text" },
1858
+ min: { default: void 0 },
1859
+ max: { default: void 0 },
1860
+ step: { default: void 0 },
1861
+ placeholder: { default: void 0 },
1862
+ disabled: { type: Boolean, default: false },
1863
+ readonly: { type: Boolean, default: false },
1864
+ required: { type: Boolean, default: false },
1865
+ leadingIcon: { default: void 0 },
1866
+ trailingIcon: { default: void 0 },
1867
+ error: { type: Boolean, default: false },
1868
+ name: { default: void 0 },
1869
+ autocomplete: { default: void 0 },
1870
+ ariaLabel: { default: void 0 },
1871
+ ariaLabelledby: { default: void 0 },
1872
+ ariaDescribedby: { default: void 0 },
1873
+ ariaInvalid: { type: Boolean, default: void 0 },
1874
+ role: { default: void 0 },
1875
+ ariaValuenow: { default: void 0 },
1876
+ ariaValuemin: { default: void 0 },
1877
+ ariaValuemax: { default: void 0 },
1878
+ ariaValuetext: { default: void 0 },
1879
+ unit: { default: void 0 },
1880
+ inputmode: { default: void 0 },
1881
+ clearable: { type: Boolean, default: false }
1339
1882
  }, {
1340
- "modelValue": { type: Boolean, ...{ default: false } },
1883
+ "modelValue": { default: "" },
1341
1884
  "modelModifiers": {}
1342
1885
  }),
1343
- emits: ["update:modelValue"],
1344
- setup(__props) {
1886
+ emits: /* @__PURE__ */ mergeModels(["focus", "blur", "keydown", "input", "click"], ["update:modelValue"]),
1887
+ setup(__props, { expose: __expose, emit: __emit }) {
1345
1888
  const props = __props;
1889
+ const emit = __emit;
1346
1890
  const modelValue = useModel(__props, "modelValue");
1347
- return (_ctx, _cache) => {
1348
- return openBlock(), createBlock(BaseButton, mergeProps(props, {
1349
- toggled: modelValue.value,
1350
- "aria-pressed": modelValue.value,
1351
- onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value)
1352
- }), null, 16, ["toggled", "aria-pressed"]);
1891
+ const inputRef = ref(null);
1892
+ const hasValue = computed(() => modelValue.value.length > 0);
1893
+ const showUnitPlaceholder = computed(
1894
+ () => Boolean(props.unit) && modelValue.value.trim().length === 0
1895
+ );
1896
+ const handleInput = (event) => {
1897
+ const target = event.target;
1898
+ modelValue.value = target.value;
1899
+ emit("input", event);
1353
1900
  };
1354
- }
1355
- });
1356
-
1357
- const KDS_DARK_MODE_STORAGE_KEY = "KNIME_DARK_MODE";
1358
- const defaultMode = "light";
1359
- const useKdsDarkMode = () => {
1360
- const userPreference = useLocalStorage(
1361
- KDS_DARK_MODE_STORAGE_KEY,
1362
- defaultMode
1363
- );
1364
- const isDark = useDark({
1365
- storageKey: `${KDS_DARK_MODE_STORAGE_KEY}_EFFECTIVE`,
1366
- initialValue: defaultMode,
1367
- onChanged: (isDarkValue) => {
1368
- let cssMode, themeValue;
1369
- if (userPreference.value === "system") {
1370
- cssMode = "light dark";
1371
- themeValue = "system";
1372
- } else {
1373
- cssMode = themeValue = isDarkValue ? "dark" : "light";
1374
- }
1375
- document.documentElement.style.setProperty("color-scheme", cssMode);
1376
- document.documentElement.dataset.theme = themeValue;
1377
- }
1378
- });
1379
- const systemPrefersDark = usePreferredDark();
1380
- watch(
1381
- [userPreference, systemPrefersDark],
1382
- ([preference, systemDark]) => {
1383
- if (preference === "system") {
1384
- isDark.value = systemDark;
1385
- } else {
1386
- isDark.value = preference === "dark";
1901
+ const focusInput = () => {
1902
+ inputRef.value?.focus();
1903
+ };
1904
+ const clearAndFocusInput = () => {
1905
+ modelValue.value = "";
1906
+ focusInput();
1907
+ };
1908
+ const handleContainerClick = (event) => {
1909
+ if (event.clientX === 0 && event.clientY === 0) {
1910
+ return;
1387
1911
  }
1388
- },
1389
- { immediate: true }
1390
- );
1391
- const currentMode = computed({
1392
- get() {
1393
- return userPreference.value;
1394
- },
1395
- set(value) {
1396
- userPreference.value = value;
1397
- }
1398
- });
1399
- const isDarkMode = computed(() => {
1400
- return userPreference.value === "dark";
1401
- });
1402
- const isLightMode = computed(() => {
1403
- return userPreference.value === "light";
1404
- });
1405
- const isSystemMode = computed(() => userPreference.value === "system");
1406
- return {
1407
- /** Exposes a writable computed ref to get the current dark mode but also use it in e.g. a v-model to set it */
1408
- currentMode,
1409
- /** Whether or not the current user preference is dark. Note, if the preference is set to 'system' it will return false. */
1410
- isDarkMode,
1411
- /** Whether or not the current user preference is light. Note, if the preference is set to 'system' it will return false. */
1412
- isLightMode,
1413
- /** Whether or not the current user preference is set to 'system'. */
1414
- isSystemMode
1415
- };
1416
- };
1417
-
1418
- const legacyMode = ref(false);
1419
- const useKdsLegacyMode = (initialValue = false) => {
1420
- if (legacyMode.value !== initialValue) {
1421
- legacyMode.value = initialValue;
1422
- }
1423
- watch(
1424
- () => legacyMode.value,
1425
- (newValue) => {
1426
- document.documentElement.classList.toggle("kds-legacy", newValue);
1427
- },
1428
- { immediate: true }
1429
- );
1430
- return {
1431
- /** Writable ref to get and/or set the legacy mode; can also be used with v-model */
1432
- legacyMode
1433
- };
1434
- };
1435
-
1436
- function elementOverflowsHorizontally(element) {
1437
- if (!element) {
1438
- return false;
1912
+ focusInput();
1913
+ };
1914
+ __expose({
1915
+ /**
1916
+ * Focuses the input element
1917
+ */
1918
+ focus: focusInput
1919
+ });
1920
+ return (_ctx, _cache) => {
1921
+ return openBlock(), createElementBlock("div", {
1922
+ class: normalizeClass({
1923
+ container: true,
1924
+ error: props.error,
1925
+ disabled: props.disabled
1926
+ }),
1927
+ onClick: handleContainerClick
1928
+ }, [
1929
+ props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
1930
+ props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
1931
+ key: 0,
1932
+ name: props.leadingIcon
1933
+ }, null, 8, ["name"])) : createCommentVNode("", true)
1934
+ ])) : createCommentVNode("", true),
1935
+ createElementVNode("input", {
1936
+ id: props.id,
1937
+ ref_key: "inputRef",
1938
+ ref: inputRef,
1939
+ value: modelValue.value,
1940
+ type: props.type,
1941
+ inputmode: props.inputmode,
1942
+ placeholder: props.placeholder,
1943
+ disabled: props.disabled,
1944
+ readonly: props.readonly,
1945
+ required: props.required,
1946
+ name: props.name,
1947
+ autocomplete: props.autocomplete,
1948
+ min: props.min,
1949
+ max: props.max,
1950
+ step: props.step,
1951
+ "aria-label": props.ariaLabel,
1952
+ "aria-labelledby": props.ariaLabelledby,
1953
+ "aria-describedby": props.ariaDescribedby,
1954
+ "aria-invalid": props.ariaInvalid,
1955
+ role: props.role,
1956
+ "aria-valuenow": props.ariaValuenow,
1957
+ "aria-valuemin": props.ariaValuemin,
1958
+ "aria-valuemax": props.ariaValuemax,
1959
+ "aria-valuetext": props.ariaValuetext,
1960
+ class: normalizeClass({ "input-field": true, "has-value": hasValue.value }),
1961
+ onInput: handleInput,
1962
+ onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus", $event)),
1963
+ onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur", $event)),
1964
+ onKeydown: _cache[2] || (_cache[2] = ($event) => emit("keydown", $event)),
1965
+ onClick: _cache[3] || (_cache[3] = ($event) => emit("click", $event))
1966
+ }, null, 42, _hoisted_2$2),
1967
+ props.unit ? (openBlock(), createElementBlock("span", {
1968
+ key: 1,
1969
+ class: normalizeClass({
1970
+ unit: true,
1971
+ placeholder: showUnitPlaceholder.value,
1972
+ disabled: props.disabled
1973
+ })
1974
+ }, toDisplayString(props.unit), 3)) : createCommentVNode("", true),
1975
+ props.clearable && hasValue.value && !props.disabled && !props.readonly ? (openBlock(), createBlock(_sfc_main$u, {
1976
+ key: 2,
1977
+ class: "clear-button",
1978
+ type: "button",
1979
+ size: "xsmall",
1980
+ variant: "transparent",
1981
+ "leading-icon": "x-close",
1982
+ "aria-label": "Clear",
1983
+ title: "Clear",
1984
+ onClick: withModifiers(clearAndFocusInput, ["stop"])
1985
+ })) : createCommentVNode("", true),
1986
+ _ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
1987
+ renderSlot(_ctx.$slots, "trailing", {}, void 0, true)
1988
+ ])) : createCommentVNode("", true),
1989
+ props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
1990
+ createVNode(KdsIcon, {
1991
+ name: props.trailingIcon
1992
+ }, null, 8, ["name"])
1993
+ ])) : createCommentVNode("", true)
1994
+ ], 2);
1995
+ };
1439
1996
  }
1440
- return element.scrollWidth > element.clientWidth;
1441
- }
1442
- function useKdsIsTruncated(elementRef) {
1443
- const isTruncated = ref(false);
1444
- useResizeObserver(elementRef, () => {
1445
- isTruncated.value = elementOverflowsHorizontally(elementRef.value);
1446
- });
1447
- return { isTruncated };
1448
- }
1997
+ });
1449
1998
 
1450
- const _hoisted_1$5 = ["id", "for", "title"];
1451
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1452
- __name: "KdsLabel",
1453
- props: {
1999
+ const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-65b0462f"]]);
2000
+
2001
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2002
+ __name: "KdsTextInput",
2003
+ props: /* @__PURE__ */ mergeModels({
1454
2004
  label: {},
2005
+ ariaLabel: {},
1455
2006
  id: {},
1456
- for: {}
1457
- },
2007
+ subText: {},
2008
+ error: { type: Boolean, default: false },
2009
+ validating: { type: Boolean, default: false },
2010
+ preserveSubTextSpace: { type: Boolean, default: false },
2011
+ placeholder: {},
2012
+ disabled: { type: Boolean, default: false },
2013
+ readonly: { type: Boolean, default: false },
2014
+ required: { type: Boolean, default: false },
2015
+ name: {},
2016
+ autocomplete: {}
2017
+ }, {
2018
+ "modelValue": { default: "" },
2019
+ "modelModifiers": {}
2020
+ }),
2021
+ emits: ["update:modelValue"],
1458
2022
  setup(__props) {
1459
2023
  const props = __props;
1460
- const labelEl = ref(null);
1461
- const { isTruncated } = useKdsIsTruncated(labelEl);
2024
+ const modelValue = useModel(__props, "modelValue");
1462
2025
  return (_ctx, _cache) => {
1463
- return openBlock(), createElementBlock("label", {
1464
- id: props.id,
1465
- ref_key: "labelEl",
1466
- ref: labelEl,
1467
- for: props.for,
1468
- class: "label",
1469
- title: unref(isTruncated) ? props.label : void 0
1470
- }, toDisplayString(props.label), 9, _hoisted_1$5);
2026
+ return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2027
+ default: withCtx((slotProps) => [
2028
+ createVNode(BaseInput, mergeProps(slotProps, {
2029
+ modelValue: modelValue.value,
2030
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2031
+ type: "text",
2032
+ placeholder: props.placeholder,
2033
+ disabled: props.disabled,
2034
+ readonly: props.readonly,
2035
+ required: props.required,
2036
+ error: props.error,
2037
+ name: props.name,
2038
+ autocomplete: props.autocomplete
2039
+ }), null, 16, ["modelValue", "placeholder", "disabled", "readonly", "required", "error", "name", "autocomplete"])
2040
+ ]),
2041
+ _: 1
2042
+ }, 16);
1471
2043
  };
1472
2044
  }
1473
2045
  });
1474
2046
 
1475
- const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-174d476a"]]);
2047
+ const additionalGroupSeparators = [" ", " ", ""];
2048
+ const decimalSeparatorSample = 1.1;
2049
+ const groupSeparatorSample = 1000.1;
2050
+ const countFractionDigits = (value) => {
2051
+ if (!Number.isFinite(value)) {
2052
+ return 0;
2053
+ }
2054
+ const exp = value.toExponential();
2055
+ const match = exp.match(/^[-+]?(\d+)(?:\.(\d+))?e([+-]?\d+)$/i);
2056
+ if (!match) {
2057
+ return 0;
2058
+ }
2059
+ const fractionDigitsInMantissa = match[2]?.length ?? 0;
2060
+ const exponent = Number.parseInt(match[3], 10);
2061
+ if (exponent >= 0) {
2062
+ return Math.max(0, fractionDigitsInMantissa - exponent);
2063
+ }
2064
+ return fractionDigitsInMantissa + Math.abs(exponent);
2065
+ };
2066
+ const createKdsNumberParser = (params) => {
2067
+ const formatter = new Intl.NumberFormat(params.locale);
2068
+ const decimalSeparator = formatter.formatToParts(decimalSeparatorSample).find((part) => part.type === "decimal")?.value ?? ".";
2069
+ const groupSeparator = formatter.formatToParts(groupSeparatorSample).find((part) => part.type === "group")?.value ?? ",";
2070
+ const removeGroupingSeparators = (input) => [groupSeparator, ...additionalGroupSeparators].reduce(
2071
+ (acc, groupSep) => groupSep.length > 0 ? acc.split(groupSep).join("") : acc,
2072
+ input
2073
+ );
2074
+ const formattersByMaxDecimals = /* @__PURE__ */ new Map();
2075
+ const getFormatterForMaxDecimals = (maxDecimals) => {
2076
+ const cached = formattersByMaxDecimals.get(maxDecimals);
2077
+ if (cached) {
2078
+ return cached;
2079
+ }
2080
+ const created = new Intl.NumberFormat(params.locale, {
2081
+ useGrouping: false,
2082
+ minimumFractionDigits: 0,
2083
+ maximumFractionDigits: maxDecimals
2084
+ });
2085
+ formattersByMaxDecimals.set(maxDecimals, created);
2086
+ return created;
2087
+ };
2088
+ const stepFractionDigits = countFractionDigits(params.step);
2089
+ const precisionFactor = Number(`1e${stepFractionDigits}`);
2090
+ const formatForDisplay = (value) => {
2091
+ if (!Number.isFinite(value)) {
2092
+ return "";
2093
+ }
2094
+ const valueDecimals = countFractionDigits(value);
2095
+ const maxDecimals = Math.max(stepFractionDigits, valueDecimals);
2096
+ return getFormatterForMaxDecimals(maxDecimals).format(value);
2097
+ };
2098
+ const roundToStep = (value) => {
2099
+ if (!Number.isFinite(value)) {
2100
+ return NaN;
2101
+ }
2102
+ const step = params.step;
2103
+ if (!Number.isFinite(step) || step <= 0) {
2104
+ return value;
2105
+ }
2106
+ if (!Number.isFinite(precisionFactor) || precisionFactor <= 0) {
2107
+ return value;
2108
+ }
2109
+ const scaledNext = Math.round(value * precisionFactor);
2110
+ const scaledStep = Math.round(step * precisionFactor);
2111
+ if (scaledStep === 0) {
2112
+ return value;
2113
+ }
2114
+ const roundedScaled = Math.round(scaledNext / scaledStep) * scaledStep;
2115
+ return roundedScaled / precisionFactor;
2116
+ };
2117
+ const isValidNormalizedNumber = (normalized) => (
2118
+ // Accept plain decimals as well as scientific notation.
2119
+ // Note: whitespace is removed earlier; we don't accept grouping separators here.
2120
+ /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?$/.test(normalized)
2121
+ );
2122
+ const parseFromInput = (value) => {
2123
+ const trimmed = value.trim();
2124
+ if (trimmed.length === 0) {
2125
+ return NaN;
2126
+ }
2127
+ const localeDecimal = decimalSeparator;
2128
+ const hasLocaleDecimal = localeDecimal.length > 0 && trimmed.includes(localeDecimal);
2129
+ if (hasLocaleDecimal) {
2130
+ const withoutGrouping = removeGroupingSeparators(trimmed);
2131
+ const normalized2 = withoutGrouping.split(localeDecimal).join(".");
2132
+ if (!isValidNormalizedNumber(normalized2)) {
2133
+ return NaN;
2134
+ }
2135
+ const parsed2 = Number.parseFloat(normalized2);
2136
+ return Number.isFinite(parsed2) ? parsed2 : NaN;
2137
+ }
2138
+ if (localeDecimal !== "." && trimmed.includes(".")) {
2139
+ const lastDotIndex = trimmed.lastIndexOf(".");
2140
+ const digitsAfterDot = trimmed.slice(lastDotIndex + 1);
2141
+ const looksLikeDecimal = digitsAfterDot.length > 0 && digitsAfterDot.length <= 2;
2142
+ const normalized2 = looksLikeDecimal ? `${removeGroupingSeparators(trimmed.slice(0, lastDotIndex))}.${removeGroupingSeparators(
2143
+ digitsAfterDot
2144
+ )}` : removeGroupingSeparators(trimmed);
2145
+ if (!isValidNormalizedNumber(normalized2)) {
2146
+ return NaN;
2147
+ }
2148
+ const parsed2 = Number.parseFloat(normalized2);
2149
+ return Number.isFinite(parsed2) ? parsed2 : NaN;
2150
+ }
2151
+ const normalized = removeGroupingSeparators(trimmed);
2152
+ if (!isValidNormalizedNumber(normalized)) {
2153
+ return NaN;
2154
+ }
2155
+ const parsed = Number.parseFloat(normalized);
2156
+ return Number.isFinite(parsed) ? parsed : NaN;
2157
+ };
2158
+ return {
2159
+ locale: params.locale,
2160
+ decimalSeparator,
2161
+ groupSeparator,
2162
+ stepFractionDigits,
2163
+ formatForDisplay,
2164
+ parseFromInput,
2165
+ roundToStep
2166
+ };
2167
+ };
1476
2168
 
1477
- const _hoisted_1$4 = ["id", "aria-labelledby", "aria-describedby"];
1478
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1479
- __name: "KdsCheckboxGroup",
2169
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2170
+ __name: "KdsNumberInput",
1480
2171
  props: /* @__PURE__ */ mergeModels({
1481
- id: {},
1482
2172
  label: {},
1483
- possibleValues: {},
1484
- alignment: { default: "vertical" },
1485
- disabled: { type: Boolean, default: false },
1486
- error: { type: Boolean, default: false },
2173
+ ariaLabel: {},
2174
+ id: {},
1487
2175
  subText: {},
1488
- preserveSubTextSpace: { type: Boolean }
2176
+ error: { type: Boolean, default: false },
2177
+ validating: { type: Boolean, default: false },
2178
+ preserveSubTextSpace: { type: Boolean, default: false },
2179
+ placeholder: {},
2180
+ disabled: { type: Boolean, default: false },
2181
+ readonly: { type: Boolean, default: false },
2182
+ required: { type: Boolean, default: false },
2183
+ name: {},
2184
+ autocomplete: {},
2185
+ unit: { default: "" },
2186
+ min: {},
2187
+ max: {},
2188
+ step: { default: 1 }
1489
2189
  }, {
1490
- "modelValue": { default: [] },
2190
+ "modelValue": { default: NaN },
1491
2191
  "modelModifiers": {}
1492
2192
  }),
1493
2193
  emits: ["update:modelValue"],
1494
2194
  setup(__props) {
1495
2195
  const props = __props;
1496
2196
  const modelValue = useModel(__props, "modelValue");
1497
- const possibleValues = computed(
1498
- () => props.possibleValues.map((o) => {
1499
- if (typeof o === "string") {
1500
- return { text: o, id: o };
1501
- }
1502
- return o;
1503
- })
2197
+ const isFocused = ref(false);
2198
+ const localValue = ref("");
2199
+ const locale = computed(() => globalThis.navigator?.language || "en-US");
2200
+ const numberParser = computed(
2201
+ () => createKdsNumberParser({ locale: locale.value, step: props.step })
1504
2202
  );
1505
- const labelId = useId();
1506
- const descriptionId = useId();
1507
- const isOptionDisabled = (index) => props.disabled || possibleValues.value[index]?.disabled === true;
1508
- const isHorizontal = computed(() => props.alignment === "horizontal");
1509
- const hasError = computed(
1510
- () => props.error || possibleValues.value.some((o) => o.error)
2203
+ const ariaValuenow = computed(
2204
+ () => Number.isFinite(modelValue.value) ? modelValue.value : void 0
1511
2205
  );
1512
- const isChecked = (id) => modelValue.value.includes(id);
1513
- const handleCheckboxChange = (index, checked) => {
1514
- if (isOptionDisabled(index)) {
2206
+ const ariaValuetext = computed(() => {
2207
+ if (!Number.isFinite(modelValue.value)) {
2208
+ return void 0;
2209
+ }
2210
+ return numberParser.value.formatForDisplay(modelValue.value);
2211
+ });
2212
+ const clamp = (value) => {
2213
+ if (!Number.isFinite(value)) {
2214
+ return NaN;
2215
+ }
2216
+ let result = value;
2217
+ if (props.min !== void 0 && !Number.isNaN(props.min)) {
2218
+ result = Math.max(props.min, result);
2219
+ }
2220
+ if (props.max !== void 0 && !Number.isNaN(props.max)) {
2221
+ result = Math.min(props.max, result);
2222
+ }
2223
+ return result;
2224
+ };
2225
+ watch(
2226
+ () => modelValue.value,
2227
+ (next) => {
2228
+ if (isFocused.value) {
2229
+ return;
2230
+ }
2231
+ localValue.value = numberParser.value.formatForDisplay(next);
2232
+ },
2233
+ { immediate: true }
2234
+ );
2235
+ const canDecrease = computed(() => {
2236
+ if (props.disabled || props.readonly) {
2237
+ return false;
2238
+ }
2239
+ if (props.min === void 0 || Number.isNaN(props.min)) {
2240
+ return true;
2241
+ }
2242
+ if (Number.isNaN(modelValue.value)) {
2243
+ return true;
2244
+ }
2245
+ return modelValue.value > props.min;
2246
+ });
2247
+ const canIncrease = computed(() => {
2248
+ if (props.disabled || props.readonly) {
2249
+ return false;
2250
+ }
2251
+ if (props.max === void 0 || Number.isNaN(props.max)) {
2252
+ return true;
2253
+ }
2254
+ if (Number.isNaN(modelValue.value)) {
2255
+ return true;
2256
+ }
2257
+ return modelValue.value < props.max;
2258
+ });
2259
+ const adjustByStep = (direction) => {
2260
+ if (props.step <= 0) {
1515
2261
  return;
1516
2262
  }
1517
- const option = possibleValues.value[index];
1518
- if (checked === true) {
1519
- modelValue.value = [...modelValue.value, option.id];
2263
+ const base = Number.isFinite(modelValue.value) ? modelValue.value : numberParser.value.parseFromInput(localValue.value);
2264
+ const nextRaw = Number.isFinite(base) ? base + direction * props.step : 0;
2265
+ const rounded = numberParser.value.roundToStep(nextRaw);
2266
+ const next = clamp(rounded);
2267
+ modelValue.value = next;
2268
+ localValue.value = numberParser.value.formatForDisplay(next);
2269
+ };
2270
+ const handleKeydown = (event) => {
2271
+ if (props.disabled || props.readonly) {
1520
2272
  return;
1521
2273
  }
1522
- modelValue.value = modelValue.value.filter((v) => v !== option.id);
2274
+ if (event.key === "ArrowUp" && canIncrease.value) {
2275
+ event.preventDefault();
2276
+ adjustByStep(1);
2277
+ return;
2278
+ }
2279
+ if (event.key === "ArrowDown" && canDecrease.value) {
2280
+ event.preventDefault();
2281
+ adjustByStep(-1);
2282
+ }
2283
+ };
2284
+ const handleUpdateModelValue = (value) => {
2285
+ localValue.value = value;
2286
+ modelValue.value = numberParser.value.parseFromInput(value);
2287
+ };
2288
+ const handleBlur = () => {
2289
+ isFocused.value = false;
2290
+ const parsed = numberParser.value.parseFromInput(localValue.value);
2291
+ const normalized = clamp(parsed);
2292
+ modelValue.value = normalized;
2293
+ localValue.value = numberParser.value.formatForDisplay(normalized);
1523
2294
  };
1524
2295
  return (_ctx, _cache) => {
1525
- return openBlock(), createElementBlock("div", {
1526
- id: props.id,
1527
- class: "checkbox-group",
1528
- role: "group",
1529
- "aria-labelledby": props.label ? unref(labelId) : void 0,
1530
- "aria-describedby": props.subText ? unref(descriptionId) : void 0
1531
- }, [
1532
- props.label ? (openBlock(), createBlock(KdsLabel, {
1533
- key: 0,
1534
- id: unref(labelId),
1535
- label: props.label
1536
- }, null, 8, ["id", "label"])) : createCommentVNode("", true),
1537
- createElementVNode("div", {
1538
- class: normalizeClass({ options: true, horizontal: isHorizontal.value })
1539
- }, [
1540
- (openBlock(true), createElementBlock(Fragment, null, renderList(possibleValues.value, (option, index) => {
1541
- return openBlock(), createElementBlock("div", {
1542
- key: option.id,
1543
- class: "option"
1544
- }, [
1545
- createVNode(BaseCheckbox, {
1546
- disabled: props.disabled || option.disabled,
1547
- error: option.error,
1548
- "helper-text": option.helperText,
1549
- label: option.text,
1550
- "model-value": isChecked(option.id),
1551
- "onUpdate:modelValue": (checked) => handleCheckboxChange(index, checked)
1552
- }, null, 8, ["disabled", "error", "helper-text", "label", "model-value", "onUpdate:modelValue"])
1553
- ]);
1554
- }), 128))
1555
- ], 2),
1556
- createVNode(KdsSubText, {
1557
- id: unref(descriptionId),
1558
- "sub-text": props.subText,
1559
- "preserve-sub-text-space": props.preserveSubTextSpace,
1560
- error: hasError.value
1561
- }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1562
- ], 8, _hoisted_1$4);
2296
+ return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2297
+ default: withCtx((slotProps) => [
2298
+ createVNode(BaseInput, mergeProps(slotProps, {
2299
+ "model-value": localValue.value,
2300
+ type: "text",
2301
+ inputmode: props.step >= 1 ? "numeric" : "decimal",
2302
+ placeholder: props.placeholder,
2303
+ disabled: props.disabled,
2304
+ readonly: props.readonly,
2305
+ required: props.required,
2306
+ error: props.error,
2307
+ name: props.name,
2308
+ autocomplete: props.autocomplete,
2309
+ unit: props.unit,
2310
+ role: "spinbutton",
2311
+ "aria-valuenow": ariaValuenow.value,
2312
+ "aria-valuemin": props.min,
2313
+ "aria-valuemax": props.max,
2314
+ "aria-valuetext": ariaValuetext.value,
2315
+ "onUpdate:modelValue": handleUpdateModelValue,
2316
+ onKeydown: handleKeydown,
2317
+ onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
2318
+ onBlur: handleBlur
2319
+ }), {
2320
+ trailing: withCtx(() => [
2321
+ createVNode(_sfc_main$u, {
2322
+ type: "button",
2323
+ size: "xsmall",
2324
+ variant: "outlined",
2325
+ "leading-icon": "minus",
2326
+ "aria-label": `Decrease ${props.label ?? props.ariaLabel}`,
2327
+ disabled: !canDecrease.value,
2328
+ onClick: _cache[0] || (_cache[0] = ($event) => adjustByStep(-1))
2329
+ }, null, 8, ["aria-label", "disabled"]),
2330
+ createVNode(_sfc_main$u, {
2331
+ type: "button",
2332
+ size: "xsmall",
2333
+ variant: "outlined",
2334
+ "leading-icon": "plus",
2335
+ "aria-label": `Increase ${props.label ?? props.ariaLabel}`,
2336
+ disabled: !canIncrease.value,
2337
+ onClick: _cache[1] || (_cache[1] = ($event) => adjustByStep(1))
2338
+ }, null, 8, ["aria-label", "disabled"])
2339
+ ]),
2340
+ _: 1
2341
+ }, 16, ["model-value", "inputmode", "placeholder", "disabled", "readonly", "required", "error", "name", "autocomplete", "unit", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-valuetext"])
2342
+ ]),
2343
+ _: 1
2344
+ }, 16);
1563
2345
  };
1564
2346
  }
1565
2347
  });
1566
2348
 
1567
- const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-538e7d4c"]]);
1568
-
1569
- const _hoisted_1$3 = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
1570
- const _hoisted_2 = { class: "control" };
1571
- const _hoisted_3 = {
1572
- key: 0,
1573
- class: "dot",
1574
- viewBox: "0 0 2 2",
1575
- "aria-hidden": "true",
1576
- focusable: "false"
2349
+ const escapeRegex = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2350
+ const wildcardToRegexBody = (pattern) => {
2351
+ let body = "";
2352
+ for (const char of pattern) {
2353
+ if (char === "*") {
2354
+ body += ".*";
2355
+ continue;
2356
+ }
2357
+ if (char === "?") {
2358
+ body += ".";
2359
+ continue;
2360
+ }
2361
+ body += escapeRegex(char);
2362
+ }
2363
+ return body;
1577
2364
  };
1578
- const _hoisted_4 = { class: "content" };
1579
- const _hoisted_5 = { class: "label" };
1580
- const _hoisted_6 = ["id"];
1581
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1582
- __name: "KdsRadioButton",
2365
+ const regexBodyToWildcard = (regexBody) => {
2366
+ let wildcard = "";
2367
+ for (let i = 0; i < regexBody.length; i += 1) {
2368
+ const char = regexBody[i];
2369
+ if (char === "\\") {
2370
+ const next = regexBody[i + 1];
2371
+ if (next === void 0) {
2372
+ return void 0;
2373
+ }
2374
+ wildcard += next;
2375
+ i += 1;
2376
+ continue;
2377
+ }
2378
+ if (char === ".") {
2379
+ const next = regexBody[i + 1];
2380
+ if (next === "*") {
2381
+ wildcard += "*";
2382
+ i += 1;
2383
+ continue;
2384
+ }
2385
+ wildcard += "?";
2386
+ continue;
2387
+ }
2388
+ if (/[[\]{}()+^$|]/.test(char)) {
2389
+ return void 0;
2390
+ }
2391
+ wildcard += char;
2392
+ }
2393
+ return wildcard;
2394
+ };
2395
+ const CASE_INSENSITIVE_PREFIX = "(?i:";
2396
+ const stripOuterGroup = (pattern, prefix) => {
2397
+ const trimmed = pattern.trim();
2398
+ if (trimmed.startsWith(prefix) && trimmed.endsWith(")")) {
2399
+ return trimmed.slice(prefix.length, -1);
2400
+ }
2401
+ return trimmed;
2402
+ };
2403
+ const buildRegexFromPatternInput = (input, options) => {
2404
+ const body = options.useRegex ? input : wildcardToRegexBody(input);
2405
+ const grouped = `(?:${body})`;
2406
+ const withCase = options.caseSensitive ? grouped : `${CASE_INSENSITIVE_PREFIX}${grouped})`;
2407
+ if (!options.excludeMatches) {
2408
+ return withCase;
2409
+ }
2410
+ return `^(?!.*${withCase}).*$`;
2411
+ };
2412
+ const stripOuterNonCapturingGroup = (pattern) => stripOuterGroup(pattern, "(?:");
2413
+ const stripCaseInsensitiveWrapper = (pattern) => stripOuterGroup(pattern, CASE_INSENSITIVE_PREFIX);
2414
+ const tryParseExcluded = (regex) => {
2415
+ const match = regex.trim().match(/^\^\(\?!\.\*([\s\S]*)\)\.\*\$$/);
2416
+ if (!match) {
2417
+ return {};
2418
+ }
2419
+ return { excludedInner: match[1] };
2420
+ };
2421
+ const parseRegexToPatternInputValue = (regex, options) => {
2422
+ if (regex === "") {
2423
+ return "";
2424
+ }
2425
+ const { excludedInner } = tryParseExcluded(regex);
2426
+ const inner = excludedInner === void 0 ? regex : excludedInner;
2427
+ const withoutCase = options.caseSensitive ? inner : stripCaseInsensitiveWrapper(inner);
2428
+ const body = stripOuterNonCapturingGroup(withoutCase);
2429
+ if (options.useRegex) {
2430
+ return body;
2431
+ }
2432
+ const wildcard = regexBodyToWildcard(body);
2433
+ return wildcard ?? body;
2434
+ };
2435
+
2436
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2437
+ __name: "KdsPatternInput",
2438
+ props: /* @__PURE__ */ mergeModels({
2439
+ label: {},
2440
+ ariaLabel: {},
2441
+ id: {},
2442
+ subText: {},
2443
+ error: { type: Boolean, default: false },
2444
+ validating: { type: Boolean, default: false },
2445
+ preserveSubTextSpace: { type: Boolean, default: false },
2446
+ placeholder: {},
2447
+ disabled: { type: Boolean, default: false },
2448
+ readonly: { type: Boolean, default: false },
2449
+ required: { type: Boolean, default: false },
2450
+ name: {},
2451
+ autocomplete: {}
2452
+ }, {
2453
+ "modelValue": { default: "" },
2454
+ "modelModifiers": {}
2455
+ }),
2456
+ emits: ["update:modelValue"],
2457
+ setup(__props) {
2458
+ const props = __props;
2459
+ const regex = useModel(__props, "modelValue");
2460
+ const uiValue = ref("");
2461
+ const caseSensitive = ref(false);
2462
+ const excludeMatches = ref(false);
2463
+ const useRegex = ref(false);
2464
+ const rebuildRegexFromUi = () => {
2465
+ regex.value = buildRegexFromPatternInput(uiValue.value, {
2466
+ caseSensitive: caseSensitive.value,
2467
+ excludeMatches: excludeMatches.value,
2468
+ useRegex: useRegex.value
2469
+ });
2470
+ };
2471
+ watch(
2472
+ () => regex.value,
2473
+ (newValue) => {
2474
+ uiValue.value = parseRegexToPatternInputValue(newValue, {
2475
+ useRegex: useRegex.value,
2476
+ excludeMatches: excludeMatches.value,
2477
+ caseSensitive: caseSensitive.value
2478
+ });
2479
+ },
2480
+ { immediate: true }
2481
+ );
2482
+ const caseSensitiveAriaLabel = computed(
2483
+ () => caseSensitive.value ? "Match case-sensitive" : "Match case-insensitive"
2484
+ );
2485
+ const excludeMatchesAriaLabel = computed(
2486
+ () => excludeMatches.value ? "Exclude matches" : "Include matches"
2487
+ );
2488
+ const patternModeAriaLabel = computed(
2489
+ () => useRegex.value ? "Use regex pattern" : "Use wildcard pattern"
2490
+ );
2491
+ return (_ctx, _cache) => {
2492
+ return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2493
+ default: withCtx((slotProps) => [
2494
+ createVNode(BaseInput, mergeProps(slotProps, {
2495
+ modelValue: uiValue.value,
2496
+ "onUpdate:modelValue": [
2497
+ _cache[3] || (_cache[3] = ($event) => uiValue.value = $event),
2498
+ rebuildRegexFromUi
2499
+ ],
2500
+ type: "text",
2501
+ placeholder: props.placeholder,
2502
+ disabled: props.disabled,
2503
+ readonly: props.readonly,
2504
+ required: props.required,
2505
+ error: props.error,
2506
+ name: props.name,
2507
+ autocomplete: props.autocomplete,
2508
+ "leading-icon": "filter",
2509
+ clearable: ""
2510
+ }), {
2511
+ trailing: withCtx(() => [
2512
+ createVNode(_sfc_main$k, {
2513
+ modelValue: caseSensitive.value,
2514
+ "onUpdate:modelValue": [
2515
+ _cache[0] || (_cache[0] = ($event) => caseSensitive.value = $event),
2516
+ rebuildRegexFromUi
2517
+ ],
2518
+ size: "xsmall",
2519
+ variant: "outlined",
2520
+ "leading-icon": "case-sensitive",
2521
+ title: caseSensitiveAriaLabel.value,
2522
+ "aria-label": caseSensitiveAriaLabel.value,
2523
+ disabled: props.disabled || props.readonly
2524
+ }, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
2525
+ createVNode(_sfc_main$k, {
2526
+ modelValue: excludeMatches.value,
2527
+ "onUpdate:modelValue": [
2528
+ _cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
2529
+ rebuildRegexFromUi
2530
+ ],
2531
+ size: "xsmall",
2532
+ variant: "outlined",
2533
+ "leading-icon": "arrows-order",
2534
+ title: excludeMatchesAriaLabel.value,
2535
+ "aria-label": excludeMatchesAriaLabel.value,
2536
+ disabled: props.disabled || props.readonly
2537
+ }, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
2538
+ createVNode(_sfc_main$k, {
2539
+ modelValue: useRegex.value,
2540
+ "onUpdate:modelValue": [
2541
+ _cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
2542
+ rebuildRegexFromUi
2543
+ ],
2544
+ size: "xsmall",
2545
+ variant: "outlined",
2546
+ "leading-icon": "regex",
2547
+ title: patternModeAriaLabel.value,
2548
+ "aria-label": patternModeAriaLabel.value,
2549
+ disabled: props.disabled || props.readonly
2550
+ }, null, 8, ["modelValue", "title", "aria-label", "disabled"])
2551
+ ]),
2552
+ _: 1
2553
+ }, 16, ["modelValue", "placeholder", "disabled", "readonly", "required", "error", "name", "autocomplete"])
2554
+ ]),
2555
+ _: 1
2556
+ }, 16);
2557
+ };
2558
+ }
2559
+ });
2560
+
2561
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2562
+ __name: "KdsSearchInput",
2563
+ props: /* @__PURE__ */ mergeModels({
2564
+ label: {},
2565
+ ariaLabel: {},
2566
+ id: {},
2567
+ subText: {},
2568
+ error: { type: Boolean, default: false },
2569
+ validating: { type: Boolean, default: false },
2570
+ preserveSubTextSpace: { type: Boolean, default: false },
2571
+ placeholder: { default: "Search" },
2572
+ disabled: { type: Boolean, default: false },
2573
+ readonly: { type: Boolean, default: false },
2574
+ required: { type: Boolean, default: false },
2575
+ name: {},
2576
+ autocomplete: {}
2577
+ }, {
2578
+ "modelValue": { default: "" },
2579
+ "modelModifiers": {}
2580
+ }),
2581
+ emits: ["update:modelValue"],
2582
+ setup(__props, { expose: __expose }) {
2583
+ const props = __props;
2584
+ const modelValue = useModel(__props, "modelValue");
2585
+ const baseInputRef = ref(null);
2586
+ __expose({
2587
+ /**
2588
+ * Focuses the input element
2589
+ */
2590
+ focus: () => baseInputRef.value?.focus()
2591
+ });
2592
+ return (_ctx, _cache) => {
2593
+ return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2594
+ default: withCtx((slotProps) => [
2595
+ createVNode(BaseInput, mergeProps({
2596
+ ref_key: "baseInputRef",
2597
+ ref: baseInputRef
2598
+ }, slotProps, {
2599
+ modelValue: modelValue.value,
2600
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2601
+ type: "search",
2602
+ placeholder: props.placeholder,
2603
+ disabled: props.disabled,
2604
+ readonly: props.readonly,
2605
+ required: props.required,
2606
+ error: props.error,
2607
+ name: props.name,
2608
+ autocomplete: props.autocomplete,
2609
+ "leading-icon": "search",
2610
+ clearable: true
2611
+ }), null, 16, ["modelValue", "placeholder", "disabled", "readonly", "required", "error", "name", "autocomplete"])
2612
+ ]),
2613
+ _: 1
2614
+ }, 16);
2615
+ };
2616
+ }
2617
+ });
2618
+
2619
+ const _hoisted_1$4 = ["rows", "placeholder", "disabled", "readonly", "required", "name", "autocomplete"];
2620
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2621
+ __name: "KdsTextarea",
1583
2622
  props: /* @__PURE__ */ mergeModels({
1584
- text: {},
1585
- helperText: {},
2623
+ label: {},
2624
+ ariaLabel: {},
2625
+ id: {},
2626
+ subText: {},
2627
+ error: { type: Boolean, default: false },
2628
+ validating: { type: Boolean, default: false },
2629
+ preserveSubTextSpace: { type: Boolean, default: false },
2630
+ placeholder: { default: "" },
1586
2631
  disabled: { type: Boolean, default: false },
1587
- error: { type: Boolean, default: false }
2632
+ readonly: { type: Boolean, default: false },
2633
+ required: { type: Boolean, default: false },
2634
+ name: {},
2635
+ autocomplete: {},
2636
+ rows: { default: 3 }
1588
2637
  }, {
1589
- "modelValue": { type: Boolean, ...{ default: false } },
2638
+ "modelValue": { default: "" },
1590
2639
  "modelModifiers": {}
1591
2640
  }),
1592
2641
  emits: ["update:modelValue"],
1593
2642
  setup(__props) {
1594
2643
  const props = __props;
2644
+ const normalizedRows = computed(() => Math.max(1, props.rows));
1595
2645
  const modelValue = useModel(__props, "modelValue");
1596
- const id = useId();
1597
- const handleClick = () => {
1598
- if (props.disabled) {
2646
+ const textareaElement = ref(null);
2647
+ function resize() {
2648
+ const element = textareaElement.value;
2649
+ if (!element) {
1599
2650
  return;
1600
2651
  }
1601
- if (!modelValue.value) {
1602
- modelValue.value = true;
2652
+ element.style.height = "auto";
2653
+ const scrollHeight = element.scrollHeight;
2654
+ const offsetHeight = element.offsetHeight;
2655
+ if (scrollHeight <= offsetHeight) {
2656
+ return;
1603
2657
  }
1604
- };
2658
+ element.style.height = `${scrollHeight}px`;
2659
+ }
2660
+ useResizeObserver(textareaElement, resize);
2661
+ watch(modelValue, resize, { immediate: true });
1605
2662
  return (_ctx, _cache) => {
1606
- return openBlock(), createElementBlock("button", {
1607
- "aria-checked": modelValue.value,
1608
- "aria-describedby": props.helperText ? `${unref(id)}-helper` : void 0,
1609
- "aria-invalid": props.error,
1610
- class: normalizeClass({
1611
- radio: true,
1612
- selected: modelValue.value,
1613
- disabled: props.disabled,
1614
- error: props.error
1615
- }),
1616
- disabled: props.disabled,
1617
- role: "radio",
1618
- type: "button",
1619
- onClick: handleClick
1620
- }, [
1621
- createElementVNode("div", _hoisted_2, [
1622
- modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [
1623
- createElementVNode("circle", {
1624
- cx: "1",
1625
- cy: "1",
1626
- r: "1"
1627
- }, null, -1)
1628
- ])])) : createCommentVNode("", true)
2663
+ return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2664
+ default: withCtx((slotProps) => [
2665
+ withDirectives(createElementVNode("textarea", mergeProps(slotProps, {
2666
+ ref_key: "textareaElement",
2667
+ ref: textareaElement,
2668
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2669
+ class: { invalid: props.error },
2670
+ rows: normalizedRows.value,
2671
+ placeholder: props.placeholder,
2672
+ disabled: props.disabled,
2673
+ readonly: props.readonly,
2674
+ required: props.required,
2675
+ name: props.name,
2676
+ autocomplete: props.autocomplete
2677
+ }), null, 16, _hoisted_1$4), [
2678
+ [vModelText, modelValue.value]
2679
+ ])
1629
2680
  ]),
1630
- createElementVNode("div", _hoisted_4, [
1631
- createElementVNode("div", _hoisted_5, toDisplayString(props.text), 1),
1632
- props.helperText ? (openBlock(), createElementBlock("div", {
2681
+ _: 1
2682
+ }, 16);
2683
+ };
2684
+ }
2685
+ });
2686
+
2687
+ const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bd6bd85c"]]);
2688
+
2689
+ const modalLayoutPropsDefault = {
2690
+ title: "",
2691
+ variant: "padded",
2692
+ overflow: "auto",
2693
+ icon: void 0
2694
+ };
2695
+ const modalPropsDefault = {
2696
+ active: false,
2697
+ height: "auto",
2698
+ width: "medium",
2699
+ closedby: "closerequest",
2700
+ ...modalLayoutPropsDefault
2701
+ };
2702
+
2703
+ const _hoisted_1$3 = { class: "modal-header" };
2704
+ const _hoisted_2$1 = { class: "modal-header-title" };
2705
+ const _hoisted_3$1 = ["data-variant"];
2706
+ const _hoisted_4 = {
2707
+ key: 0,
2708
+ class: "modal-footer"
2709
+ };
2710
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2711
+ ...{ inheritAttrs: false },
2712
+ __name: "KdsModalLayout",
2713
+ props: /* @__PURE__ */ mergeDefaults({
2714
+ title: {},
2715
+ variant: {},
2716
+ icon: {},
2717
+ overflow: {},
2718
+ onClose: { type: Function }
2719
+ }, modalLayoutPropsDefault),
2720
+ setup(__props) {
2721
+ useCssVars((_ctx) => ({
2722
+ "cd035744": _ctx.overflow
2723
+ }));
2724
+ const props = __props;
2725
+ return (_ctx, _cache) => {
2726
+ return openBlock(), createElementBlock(Fragment, null, [
2727
+ createElementVNode("header", _hoisted_1$3, [
2728
+ props.icon ? (openBlock(), createBlock(KdsIcon, {
1633
2729
  key: 0,
1634
- id: `${unref(id)}-helper`,
1635
- class: "helper-text"
1636
- }, toDisplayString(props.helperText), 9, _hoisted_6)) : createCommentVNode("", true)
1637
- ])
1638
- ], 10, _hoisted_1$3);
2730
+ name: props.icon,
2731
+ size: "medium"
2732
+ }, null, 8, ["name"])) : createCommentVNode("", true),
2733
+ createElementVNode("div", _hoisted_2$1, toDisplayString(props.title), 1),
2734
+ createVNode(_sfc_main$u, {
2735
+ "leading-icon": "x-close",
2736
+ variant: "transparent",
2737
+ size: "medium",
2738
+ title: "Close",
2739
+ onClick: props.onClose
2740
+ }, null, 8, ["onClick"])
2741
+ ]),
2742
+ createElementVNode("div", {
2743
+ class: "modal-body",
2744
+ "data-variant": __props.variant
2745
+ }, [
2746
+ renderSlot(_ctx.$slots, "body", {}, void 0, true)
2747
+ ], 8, _hoisted_3$1),
2748
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4, [
2749
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
2750
+ ])) : createCommentVNode("", true)
2751
+ ], 64);
1639
2752
  };
1640
2753
  }
1641
2754
  });
1642
2755
 
1643
- const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a7490a52"]]);
2756
+ const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b5dcb5bc"]]);
1644
2757
 
1645
- const useRadioSelection = ({
1646
- selectedId,
1647
- options,
1648
- globalDisable,
1649
- globalError,
1650
- optionContainer
1651
- }) => {
1652
- const focusOptionAtIndex = (index) => {
1653
- const radios = optionContainer?.value?.querySelectorAll(
1654
- 'button[role="radio"]'
2758
+ const _hoisted_1$2 = ["closedby"];
2759
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2760
+ __name: "KdsModal",
2761
+ props: /* @__PURE__ */ mergeDefaults({
2762
+ icon: {},
2763
+ title: {},
2764
+ variant: {},
2765
+ width: {},
2766
+ height: {},
2767
+ active: { type: Boolean },
2768
+ closedby: {},
2769
+ overflow: {}
2770
+ }, modalPropsDefault),
2771
+ emits: ["close", "closed"],
2772
+ setup(__props, { emit: __emit }) {
2773
+ useCssVars((_ctx) => ({
2774
+ "v5f7d64ea": _ctx.overflow
2775
+ }));
2776
+ const props = __props;
2777
+ const emit = __emit;
2778
+ const dialog = useTemplateRef("dialogElement");
2779
+ const onClose = (event) => {
2780
+ emit("close", event);
2781
+ };
2782
+ watch(
2783
+ () => props.active,
2784
+ async (active) => {
2785
+ if (active) {
2786
+ await nextTick();
2787
+ dialog.value?.showModal();
2788
+ } else {
2789
+ dialog.value?.close();
2790
+ }
2791
+ },
2792
+ { immediate: true }
1655
2793
  );
1656
- radios?.[index]?.focus();
1657
- };
1658
- const isIndexDisabled = (index) => globalDisable?.value || options.value[index]?.disabled === true;
1659
- const hasError = computed(
1660
- () => globalError?.value || options.value.some((o) => o.error)
1661
- );
1662
- const selectedIndex = computed(
1663
- () => options.value.findIndex((o) => o.id === selectedId.value)
1664
- );
1665
- const firstEnabledIndex = computed(
1666
- () => options.value.findIndex((_, index) => !isIndexDisabled(index))
1667
- );
1668
- const tabIndexForOption = (index) => {
1669
- if (isIndexDisabled(index)) {
1670
- return void 0;
1671
- }
1672
- if (selectedIndex.value >= 0) {
1673
- return selectedIndex.value === index ? 0 : -1;
1674
- }
1675
- return firstEnabledIndex.value === index ? 0 : -1;
1676
- };
1677
- const selectIndex = (index) => {
1678
- if (isIndexDisabled(index)) {
1679
- return;
1680
- }
1681
- selectedId.value = options.value[index]?.id;
1682
- };
1683
- const nextEnabledIndex = (startIndex, direction) => {
1684
- const total = options.value.length;
1685
- if (total === 0) {
1686
- return -1;
1687
- }
1688
- let index = startIndex;
1689
- for (let i = 0; i < total; i++) {
1690
- index = (index + direction + total) % total;
1691
- if (!isIndexDisabled(index)) {
1692
- return index;
2794
+ const renderDialog = ref(props.active);
2795
+ const removeDialog = () => {
2796
+ renderDialog.value = false;
2797
+ emit("closed");
2798
+ };
2799
+ watch(
2800
+ () => props.active,
2801
+ (value, lastValue) => {
2802
+ if (value === false && lastValue === true) {
2803
+ if (dialog.value) {
2804
+ Promise.all(
2805
+ dialog.value.getAnimations({ subtree: true }).map((animation) => animation.finished)
2806
+ ).then(removeDialog);
2807
+ } else {
2808
+ removeDialog();
2809
+ }
2810
+ } else {
2811
+ renderDialog.value = value;
2812
+ }
1693
2813
  }
1694
- }
1695
- return -1;
1696
- };
1697
- const moveSelection = (currentIndex, direction) => {
1698
- const nextIndex = nextEnabledIndex(currentIndex, direction);
1699
- if (nextIndex < 0) {
1700
- return;
1701
- }
1702
- selectIndex(nextIndex);
1703
- focusOptionAtIndex(nextIndex);
2814
+ );
2815
+ return (_ctx, _cache) => {
2816
+ return renderDialog.value ? (openBlock(), createElementBlock("dialog", {
2817
+ key: 0,
2818
+ ref: "dialogElement",
2819
+ class: normalizeClass([
2820
+ "kds-modal",
2821
+ `width-${__props.width}`,
2822
+ `height-${__props.height}`,
2823
+ `overflow-${__props.overflow}`
2824
+ ]),
2825
+ closedby: __props.closedby,
2826
+ onCancel: withModifiers(onClose, ["prevent"])
2827
+ }, [
2828
+ renderSlot(_ctx.$slots, "default", {
2829
+ title: __props.title,
2830
+ icon: __props.icon,
2831
+ variant: __props.variant,
2832
+ overflow: __props.overflow,
2833
+ onClose
2834
+ }, () => [
2835
+ createVNode(KdsModalLayout, {
2836
+ title: __props.title,
2837
+ icon: __props.icon,
2838
+ variant: __props.variant,
2839
+ overflow: __props.overflow,
2840
+ onClose
2841
+ }, {
2842
+ body: withCtx(() => [
2843
+ renderSlot(_ctx.$slots, "body", {}, void 0, true)
2844
+ ]),
2845
+ footer: withCtx(() => [
2846
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
2847
+ ]),
2848
+ _: 3
2849
+ }, 8, ["title", "icon", "variant", "overflow"])
2850
+ ], true)
2851
+ ], 42, _hoisted_1$2)) : createCommentVNode("", true);
2852
+ };
2853
+ }
2854
+ });
2855
+
2856
+ const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-9bd33041"]]);
2857
+
2858
+ const createUnwrappedPromise = () => {
2859
+ let resolve = () => {
1704
2860
  };
1705
- const goToFirstEnabled = () => {
1706
- const nextIndex = firstEnabledIndex.value;
1707
- if (nextIndex < 0) {
1708
- return;
1709
- }
1710
- selectIndex(nextIndex);
1711
- focusOptionAtIndex(nextIndex);
2861
+ let reject = () => {
1712
2862
  };
1713
- const goToLastEnabled = () => {
1714
- for (let i = options.value.length - 1; i >= 0; i--) {
1715
- if (!isIndexDisabled(i)) {
1716
- selectIndex(i);
1717
- focusOptionAtIndex(i);
1718
- break;
1719
- }
1720
- }
2863
+ const promise = new Promise((res, rej) => {
2864
+ resolve = res;
2865
+ reject = rej;
2866
+ });
2867
+ return { resolve, reject, promise };
2868
+ };
2869
+
2870
+ const defaultCancelButton = {
2871
+ type: "cancel",
2872
+ label: "Cancel"
2873
+ };
2874
+ const defaultConfirmButton = {
2875
+ type: "confirm",
2876
+ label: "Confirm"
2877
+ };
2878
+ const isActive = ref(false);
2879
+ const activeModalConfig = ref(null);
2880
+ const unwrappedPromise = ref(createUnwrappedPromise());
2881
+ const resetInternalState = () => {
2882
+ isActive.value = false;
2883
+ unwrappedPromise.value = createUnwrappedPromise();
2884
+ };
2885
+ const onClosed = () => {
2886
+ activeModalConfig.value = null;
2887
+ };
2888
+ const confirm = (doNotAskAgain = false) => {
2889
+ unwrappedPromise.value.resolve({
2890
+ confirmed: true,
2891
+ doNotAskAgain
2892
+ });
2893
+ resetInternalState();
2894
+ };
2895
+ const close = () => {
2896
+ const isConfirm = activeModalConfig.value?.type === "confirm";
2897
+ unwrappedPromise.value.resolve(isConfirm ? { confirmed: false } : void 0);
2898
+ resetInternalState();
2899
+ };
2900
+ const isTemplateBasedConfirm = (config) => {
2901
+ return "component" in config;
2902
+ };
2903
+ const updateConfig = (config) => {
2904
+ if (!isActive.value || !activeModalConfig.value || activeModalConfig.value.type === "confirm") {
2905
+ consola.warn("useKdsDynamicModal: invalid invocation of updateConfig");
2906
+ return;
2907
+ }
2908
+ activeModalConfig.value.value = {
2909
+ ...activeModalConfig.value.value,
2910
+ ...config
1721
2911
  };
1722
- const handleKeyDown = (event, currentIndex) => {
1723
- if (globalDisable?.value) {
1724
- return;
1725
- }
1726
- switch (event.key) {
1727
- case "ArrowDown":
1728
- case "ArrowRight": {
1729
- event.preventDefault();
1730
- moveSelection(currentIndex, 1);
1731
- return;
1732
- }
1733
- case "ArrowUp":
1734
- case "ArrowLeft": {
1735
- event.preventDefault();
1736
- moveSelection(currentIndex, -1);
1737
- return;
1738
- }
1739
- case "Home": {
1740
- event.preventDefault();
1741
- goToFirstEnabled();
1742
- return;
1743
- }
1744
- case "End": {
1745
- event.preventDefault();
1746
- goToLastEnabled();
1747
- return;
1748
- }
1749
- case " ":
1750
- case "Enter": {
1751
- event.preventDefault();
1752
- selectIndex(currentIndex);
2912
+ };
2913
+ const internal = {
2914
+ confirm,
2915
+ close,
2916
+ isTemplateBasedConfirm,
2917
+ onClosed,
2918
+ updateConfig
2919
+ };
2920
+ const useKdsDynamicModal = () => {
2921
+ function askConfirmation(config) {
2922
+ activeModalConfig.value = {
2923
+ type: "confirm",
2924
+ value: {
2925
+ buttons: [defaultCancelButton, defaultConfirmButton],
2926
+ ...config
1753
2927
  }
1754
- }
2928
+ };
2929
+ isActive.value = true;
2930
+ return unwrappedPromise.value.promise;
2931
+ }
2932
+ const showByTemplate = (config) => {
2933
+ activeModalConfig.value = {
2934
+ type: "dynamic",
2935
+ value: config
2936
+ };
2937
+ isActive.value = true;
2938
+ return unwrappedPromise.value.promise;
1755
2939
  };
1756
2940
  return {
1757
- hasError,
1758
- selectedIndex,
1759
- tabIndexForOption,
1760
- handleClick: selectIndex,
1761
- handleKeyDown
2941
+ askConfirmation,
2942
+ showByTemplate,
2943
+ config: computed(() => activeModalConfig.value),
2944
+ isActive: computed(() => isActive.value),
2945
+ close: () => internal.close()
1762
2946
  };
1763
2947
  };
1764
2948
 
1765
- const _hoisted_1$2 = ["id", "aria-labelledby", "aria-describedby"];
1766
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1767
- __name: "KdsRadioButtonGroup",
1768
- props: /* @__PURE__ */ mergeModels({
1769
- id: {},
1770
- label: {},
1771
- possibleValues: {},
1772
- alignment: { default: "vertical" },
1773
- disabled: { type: Boolean, default: false },
1774
- subText: {},
1775
- preserveSubTextSpace: { type: Boolean }
1776
- }, {
1777
- "modelValue": {},
1778
- "modelModifiers": {}
1779
- }),
1780
- emits: ["update:modelValue"],
2949
+ const _hoisted_1$1 = {
2950
+ key: 1,
2951
+ class: "confirmation"
2952
+ };
2953
+ const _hoisted_2 = { class: "message" };
2954
+ const _hoisted_3 = {
2955
+ key: 0,
2956
+ class: "ask-again"
2957
+ };
2958
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2959
+ __name: "KdsDynamicModalProvider",
1781
2960
  setup(__props) {
1782
- const props = __props;
1783
- const modelValue = useModel(__props, "modelValue");
1784
- const options = computed(
1785
- () => props.possibleValues.map((o) => {
1786
- if (typeof o === "string") {
1787
- return { text: o, id: o };
1788
- }
1789
- return o;
1790
- })
1791
- );
1792
- const labelId = useId();
1793
- const descriptionId = useId();
1794
- const groupName = useId();
1795
- const optionContainer = ref(null);
1796
- const { tabIndexForOption, handleClick, handleKeyDown, hasError } = useRadioSelection({
1797
- selectedId: modelValue,
1798
- options,
1799
- globalDisable: computed(() => props.disabled),
1800
- optionContainer
1801
- });
1802
- return (_ctx, _cache) => {
1803
- return openBlock(), createElementBlock("div", {
1804
- id: props.id,
1805
- class: "radio-button-group",
1806
- role: "radiogroup",
1807
- "aria-labelledby": props.label ? unref(labelId) : void 0,
1808
- "aria-describedby": props.subText ? unref(descriptionId) : void 0
1809
- }, [
1810
- props.label ? (openBlock(), createBlock(KdsLabel, {
1811
- key: 0,
1812
- id: unref(labelId),
1813
- label: props.label
1814
- }, null, 8, ["id", "label"])) : createCommentVNode("", true),
1815
- createElementVNode("div", {
1816
- ref_key: "optionContainer",
1817
- ref: optionContainer,
1818
- class: normalizeClass({ options: true, horizontal: props.alignment === "horizontal" })
1819
- }, [
1820
- (openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option, index) => {
1821
- return openBlock(), createElementBlock("div", {
1822
- key: option.id,
1823
- class: "option"
1824
- }, [
1825
- createVNode(KdsRadioButton, {
1826
- disabled: props.disabled || option.disabled,
1827
- error: option.error,
1828
- "helper-text": option.helperText,
1829
- text: option.text,
1830
- "model-value": modelValue.value === option.id,
1831
- tabindex: unref(tabIndexForOption)(index),
1832
- name: unref(groupName),
1833
- onKeydown: (e) => unref(handleKeyDown)(e, index),
1834
- "onUpdate:modelValue": () => unref(handleClick)(index)
1835
- }, null, 8, ["disabled", "error", "helper-text", "text", "model-value", "tabindex", "name", "onKeydown", "onUpdate:modelValue"])
1836
- ]);
1837
- }), 128))
1838
- ], 2),
1839
- createVNode(KdsSubText, {
1840
- id: unref(descriptionId),
1841
- "sub-text": props.subText,
1842
- "preserve-sub-text-space": props.preserveSubTextSpace,
1843
- error: unref(hasError)
1844
- }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1845
- ], 8, _hoisted_1$2);
2961
+ const askAgain = ref(false);
2962
+ const { config, isActive } = useKdsDynamicModal();
2963
+ const reset = () => {
2964
+ askAgain.value = false;
2965
+ };
2966
+ const onConfirm = () => {
2967
+ internal.confirm(askAgain.value);
2968
+ reset();
2969
+ };
2970
+ const onClose = () => {
2971
+ internal.close();
2972
+ reset();
2973
+ };
2974
+ const handleConfirmButton = (button) => {
2975
+ if (!button.customHandler) {
2976
+ const handler = button.type === "cancel" ? onClose : onConfirm;
2977
+ handler();
2978
+ return;
2979
+ }
2980
+ if (button.type === "cancel") {
2981
+ button.customHandler({ cancel: onClose });
2982
+ }
2983
+ if (button.type === "confirm") {
2984
+ button.customHandler({ confirm: onConfirm });
2985
+ }
1846
2986
  };
1847
- }
1848
- });
1849
-
1850
- const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b0e27ba1"]]);
1851
-
1852
- const _hoisted_1$1 = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
1853
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1854
- __name: "ValueSwitchItem",
1855
- props: {
1856
- selected: { type: Boolean },
1857
- disabled: { type: Boolean, default: false },
1858
- size: { default: "medium" },
1859
- variant: { default: "default" },
1860
- tabIndex: { default: void 0 },
1861
- hideIcons: { type: Boolean },
1862
- text: {},
1863
- leadingIcon: {},
1864
- trailingIcon: {},
1865
- title: {}
1866
- },
1867
- setup(__props) {
1868
- const props = __props;
1869
- const optionTextEl = ref(null);
1870
- const { isTruncated } = useKdsIsTruncated(optionTextEl);
2987
+ const defaultVariant = (type) => type === "cancel" ? "transparent" : "filled";
2988
+ const kdsModalProps = computed(() => {
2989
+ if (!config.value) {
2990
+ return {};
2991
+ }
2992
+ const { icon, title, height, width, variant, overflow, closedby } = config.value.value;
2993
+ return {
2994
+ icon,
2995
+ title,
2996
+ height,
2997
+ width,
2998
+ variant,
2999
+ overflow,
3000
+ closedby,
3001
+ onClose,
3002
+ onClosed: internal.onClosed,
3003
+ active: isActive.value
3004
+ };
3005
+ });
1871
3006
  return (_ctx, _cache) => {
1872
- return openBlock(), createElementBlock("button", {
1873
- role: "radio",
1874
- "aria-checked": props.selected,
1875
- "aria-label": props.text ? void 0 : props.title,
1876
- class: normalizeClass({
1877
- option: true,
1878
- selected: props.selected,
1879
- disabled: props.disabled,
1880
- "variant-muted": props.variant === "muted",
1881
- "size-small": props.size === "small"
1882
- }),
1883
- disabled: props.disabled,
1884
- tabindex: props.tabIndex,
1885
- title: props.title ?? (unref(isTruncated) && props.text ? props.text : void 0)
1886
- }, [
1887
- props.leadingIcon && (!props.hideIcons || !props.text) ? (openBlock(), createBlock(KdsIcon, {
1888
- key: 0,
1889
- name: props.leadingIcon,
1890
- size: props.size
1891
- }, null, 8, ["name", "size"])) : createCommentVNode("", true),
1892
- props.text ? (openBlock(), createElementBlock("span", {
1893
- key: 1,
1894
- ref_key: "optionTextEl",
1895
- ref: optionTextEl,
1896
- class: "option-label"
1897
- }, toDisplayString(props.text), 513)) : createCommentVNode("", true),
1898
- props.trailingIcon && !props.hideIcons ? (openBlock(), createBlock(KdsIcon, {
1899
- key: 2,
1900
- name: props.trailingIcon,
1901
- size: props.size
1902
- }, null, 8, ["name", "size"])) : createCommentVNode("", true)
1903
- ], 10, _hoisted_1$1);
3007
+ return openBlock(), createBlock(KdsModal, mergeProps({ class: "confirm-modal" }, kdsModalProps.value), createSlots({ _: 2 }, [
3008
+ unref(config)?.type === "confirm" ? {
3009
+ name: "body",
3010
+ fn: withCtx(() => [
3011
+ unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$1, [
3012
+ createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
3013
+ unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
3014
+ createVNode(_sfc_main$h, {
3015
+ modelValue: askAgain.value,
3016
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
3017
+ label: unref(config).value.doNotAskAgain.label,
3018
+ "sub-text": unref(config).value.doNotAskAgain.subText
3019
+ }, null, 8, ["modelValue", "label", "sub-text"])
3020
+ ])) : createCommentVNode("", true)
3021
+ ]))
3022
+ ]),
3023
+ key: "0"
3024
+ } : void 0,
3025
+ unref(config)?.type === "confirm" ? {
3026
+ name: "footer",
3027
+ fn: withCtx(() => [
3028
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
3029
+ return openBlock(), createBlock(_sfc_main$u, {
3030
+ key: index,
3031
+ destructive: button.destructive,
3032
+ autofocus: button.autofocus,
3033
+ label: button.label,
3034
+ variant: button.variant ?? defaultVariant(button.type),
3035
+ class: normalizeClass({ "flush-left": button.flushLeft }),
3036
+ "data-test-id": `${button.type}-button`,
3037
+ onClick: ($event) => handleConfirmButton(button)
3038
+ }, null, 8, ["destructive", "autofocus", "label", "variant", "class", "data-test-id", "onClick"]);
3039
+ }), 128))
3040
+ ]),
3041
+ key: "1"
3042
+ } : void 0,
3043
+ unref(config)?.type === "dynamic" ? {
3044
+ name: "default",
3045
+ fn: withCtx((slotProps) => [
3046
+ (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), normalizeProps(guardReactiveProps({
3047
+ ...slotProps,
3048
+ context: unref(config).value.context,
3049
+ updateConfig: unref(internal).updateConfig
3050
+ })), null, 16))
3051
+ ]),
3052
+ key: "2"
3053
+ } : void 0
3054
+ ]), 1040);
1904
3055
  };
1905
3056
  }
1906
3057
  });
1907
3058
 
1908
- const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-469c6983"]]);
1909
-
1910
- const useValueSwitchIconHiding = ({
1911
- width,
1912
- options
1913
- }) => {
1914
- const itemEls = ref(/* @__PURE__ */ new Map());
1915
- onBeforeUpdate(() => {
1916
- itemEls.value = /* @__PURE__ */ new Map();
1917
- });
1918
- const setItemEl = (id, el) => {
1919
- const elementToRegister = el && typeof el === "object" && "$el" in el ? el.$el : el;
1920
- if (elementToRegister instanceof HTMLButtonElement) {
1921
- itemEls.value.set(id, elementToRegister);
1922
- }
1923
- };
1924
- const shouldHideIcons = ref(false);
1925
- const hasLabelEllipsis = (id) => {
1926
- const el = itemEls.value.get(id);
1927
- if (!el) {
1928
- return false;
1929
- }
1930
- const label = el.querySelector(".option-label");
1931
- return elementOverflowsHorizontally(label);
1932
- };
1933
- const anyOptionHasEllipsis = () => options.value.some((option) => {
1934
- if (!option.text) {
1935
- return false;
1936
- }
1937
- if (!option.leadingIcon && !option.trailingIcon) {
1938
- return false;
1939
- }
1940
- return hasLabelEllipsis(option.id);
1941
- });
1942
- watch(
1943
- () => [width.value, options.value],
1944
- async () => {
1945
- shouldHideIcons.value = false;
1946
- await nextTick();
1947
- shouldHideIcons.value = anyOptionHasEllipsis();
1948
- },
1949
- {
1950
- immediate: true
1951
- }
1952
- );
1953
- return {
1954
- shouldHideIcons,
1955
- setItemEl
1956
- };
1957
- };
3059
+ const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-1ab7aa8f"]]);
1958
3060
 
1959
- const _hoisted_1 = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
3061
+ const _hoisted_1 = ["id", "popover"];
1960
3062
  const _sfc_main = /* @__PURE__ */ defineComponent({
1961
- __name: "KdsValueSwitch",
3063
+ __name: "KdsPopover",
1962
3064
  props: /* @__PURE__ */ mergeModels({
1963
- id: {},
1964
- label: {},
1965
- possibleValues: {},
1966
- size: { default: "medium" },
1967
- variant: { default: "default" },
1968
- disabled: { type: Boolean, default: false },
1969
- subText: {},
1970
- error: { type: Boolean },
1971
- preserveSubTextSpace: { type: Boolean }
3065
+ activatorEl: {},
3066
+ anchorEl: {},
3067
+ placement: { default: "bottom-right" }
1972
3068
  }, {
1973
- "modelValue": {},
3069
+ "modelValue": { type: Boolean, ...{ default: false } },
1974
3070
  "modelModifiers": {}
1975
3071
  }),
1976
3072
  emits: ["update:modelValue"],
1977
3073
  setup(__props) {
1978
3074
  const props = __props;
1979
- const modelValue = useModel(__props, "modelValue");
1980
- const options = computed(
1981
- () => props.possibleValues.map((o) => {
1982
- if (typeof o === "string") {
1983
- return { text: o, id: o };
1984
- }
1985
- return o;
1986
- })
1987
- );
1988
- const labelId = useId();
1989
- const descriptionId = useId();
1990
- const availableWidthContainer = ref(null);
1991
- const { width } = useElementSize(availableWidthContainer);
1992
- const { shouldHideIcons, setItemEl } = useValueSwitchIconHiding({
1993
- width,
1994
- options
3075
+ const open = useModel(__props, "modelValue");
3076
+ const popoverEl = ref(null);
3077
+ const popoverId = useId();
3078
+ const anchorName = `--anchor-${popoverId}`;
3079
+ const resolveElement = (el) => {
3080
+ if (!el) {
3081
+ return null;
3082
+ }
3083
+ const maybeInstance = el;
3084
+ const candidate = maybeInstance.$el ?? el;
3085
+ return candidate instanceof HTMLElement ? candidate : null;
3086
+ };
3087
+ const setA11yAttributes = (el, options) => {
3088
+ if (!el) {
3089
+ return;
3090
+ }
3091
+ if (options === null) {
3092
+ el.removeAttribute("aria-expanded");
3093
+ el.removeAttribute("aria-controls");
3094
+ el.removeAttribute("aria-haspopup");
3095
+ return;
3096
+ }
3097
+ el.setAttribute("aria-expanded", String(options.expanded));
3098
+ el.setAttribute("aria-controls", options.popoverId);
3099
+ el.setAttribute("aria-haspopup", "dialog");
3100
+ };
3101
+ watch(open, (isOpen) => {
3102
+ if (isOpen) {
3103
+ popoverEl.value?.showPopover?.();
3104
+ } else {
3105
+ popoverEl.value?.hidePopover?.();
3106
+ }
3107
+ const activatorElement = resolveElement(unref(props.activatorEl));
3108
+ activatorElement?.setAttribute("aria-expanded", String(isOpen));
1995
3109
  });
1996
- const optionContainer = ref(null);
1997
- const { tabIndexForOption, handleClick, handleKeyDown } = useRadioSelection({
1998
- selectedId: modelValue,
1999
- options,
2000
- globalDisable: computed(() => props.disabled),
2001
- optionContainer
3110
+ watch(
3111
+ () => [unref(props.anchorEl), unref(props.activatorEl)],
3112
+ ([nextAnchorEl, nextActivatorEl], prev) => {
3113
+ const [prevAnchorEl, prevActivatorEl] = prev ?? [null, null];
3114
+ const prevAnchor = resolveElement(prevAnchorEl ?? null) ?? resolveElement(prevActivatorEl);
3115
+ prevAnchor?.style.removeProperty("anchor-name");
3116
+ const prevActivator = resolveElement(prevActivatorEl);
3117
+ setA11yAttributes(prevActivator, null);
3118
+ const nextAnchor = resolveElement(nextAnchorEl ?? null) ?? resolveElement(nextActivatorEl);
3119
+ nextAnchor?.style.setProperty("anchor-name", anchorName);
3120
+ const nextActivator = resolveElement(nextActivatorEl);
3121
+ setA11yAttributes(nextActivator, { expanded: open.value, popoverId });
3122
+ },
3123
+ { immediate: true }
3124
+ );
3125
+ onBeforeUnmount(() => {
3126
+ const anchor = resolveElement(unref(props.anchorEl) ?? null) ?? resolveElement(unref(props.activatorEl));
3127
+ anchor?.style.removeProperty("anchor-name");
3128
+ const activator = resolveElement(unref(props.activatorEl));
3129
+ setA11yAttributes(activator, null);
2002
3130
  });
2003
3131
  return (_ctx, _cache) => {
2004
3132
  return openBlock(), createElementBlock("div", {
2005
- id: props.id,
2006
- ref_key: "availableWidthContainer",
2007
- ref: availableWidthContainer,
2008
- role: "radiogroup",
2009
- class: normalizeClass({
2010
- "value-switch": true,
2011
- "size-small": props.size === "small"
2012
- }),
2013
- "aria-invalid": props.error || void 0,
2014
- "aria-labelledby": props.label ? unref(labelId) : void 0,
2015
- "aria-describedby": props.subText ? unref(descriptionId) : void 0
3133
+ id: unref(popoverId),
3134
+ ref_key: "popoverEl",
3135
+ ref: popoverEl,
3136
+ class: normalizeClass(["kds-popover", ["floating", props.placement]]),
3137
+ popover: unref(props.activatorEl) ? "auto" : void 0,
3138
+ style: normalizeStyle({ "position-anchor": anchorName }),
3139
+ role: "dialog",
3140
+ onToggle: _cache[0] || (_cache[0] = ($event) => open.value = $event.newState === "open")
2016
3141
  }, [
2017
- props.label ? (openBlock(), createBlock(KdsLabel, {
2018
- key: 0,
2019
- id: unref(labelId),
2020
- label: props.label
2021
- }, null, 8, ["id", "label"])) : createCommentVNode("", true),
2022
- createElementVNode("div", {
2023
- ref_key: "optionContainer",
2024
- ref: optionContainer,
2025
- class: normalizeClass({ options: true, error: props.error })
2026
- }, [
2027
- (openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option, index) => {
2028
- return openBlock(), createBlock(ValueSwitchItem, mergeProps({
2029
- key: option.id,
2030
- ref_for: true,
2031
- ref: (el) => unref(setItemEl)(option.id, el)
2032
- }, { ref_for: true }, option, {
2033
- "hide-icons": unref(shouldHideIcons),
2034
- selected: modelValue.value === option.id,
2035
- disabled: props.disabled || option.disabled,
2036
- size: props.size,
2037
- variant: props.variant,
2038
- "tab-index": unref(tabIndexForOption)(index),
2039
- title: option.title,
2040
- onClick: () => unref(handleClick)(index),
2041
- onKeydown: ($event) => unref(handleKeyDown)($event, index)
2042
- }), null, 16, ["hide-icons", "selected", "disabled", "size", "variant", "tab-index", "title", "onClick", "onKeydown"]);
2043
- }), 128))
2044
- ], 2),
2045
- createVNode(KdsSubText, {
2046
- id: unref(descriptionId),
2047
- "sub-text": props.subText,
2048
- "preserve-sub-text-space": props.preserveSubTextSpace,
2049
- error: props.error
2050
- }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
2051
- ], 10, _hoisted_1);
3142
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
3143
+ ], 46, _hoisted_1);
2052
3144
  };
2053
3145
  }
2054
3146
  });
2055
3147
 
2056
- const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e5da4485"]]);
3148
+ const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c38b0586"]]);
2057
3149
 
2058
- export { _sfc_main$j as KdsButton, _sfc_main$c as KdsCheckbox, KdsCheckboxGroup, KdsDataType, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLabel, _sfc_main$i as KdsLinkButton, KdsLoadingSpinner, KdsModal, KdsModalLayout, KdsProgressButton, KdsRadioButtonGroup, KdsSubText, _sfc_main$6 as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
3150
+ export { KdsAvatar, _sfc_main$u as KdsButton, _sfc_main$h as KdsCheckbox, KdsCheckboxGroup, KdsColorSwatch, KdsDataType, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLabel, _sfc_main$t as KdsLinkButton, KdsLoadingSpinner, KdsModal, KdsModalLayout, _sfc_main$7 as KdsNumberInput, _sfc_main$6 as KdsPatternInput, KdsPopover, KdsProgressButton, KdsRadioButtonGroup, _sfc_main$5 as KdsSearchInput, KdsSubText, _sfc_main$8 as KdsTextInput, KdsTextarea, _sfc_main$k as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
2059
3151
  //# sourceMappingURL=index.js.map