@knime/kds-components 0.8.0 → 0.9.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 (59) hide show
  1. package/dist/buttons/index.d.ts +0 -4
  2. package/dist/buttons/index.d.ts.map +1 -1
  3. package/dist/forms/{BaseFormFieldWrapper.vue.d.ts → _helper/BaseFormFieldWrapper.vue.d.ts} +6 -1
  4. package/dist/forms/_helper/BaseFormFieldWrapper.vue.d.ts.map +1 -0
  5. package/dist/forms/_helper/InfoPopover/InfoPopover.vue.d.ts +27 -0
  6. package/dist/forms/_helper/InfoPopover/InfoPopover.vue.d.ts.map +1 -0
  7. package/dist/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts +36 -0
  8. package/dist/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts.map +1 -0
  9. package/dist/forms/_helper/InfoPopover/index.d.ts.map +1 -0
  10. package/dist/forms/_helper/InfoPopover/types.d.ts +11 -0
  11. package/dist/forms/_helper/InfoPopover/types.d.ts.map +1 -0
  12. package/dist/forms/_helper/KdsLabel.vue.d.ts +9 -0
  13. package/dist/forms/_helper/KdsLabel.vue.d.ts.map +1 -0
  14. package/dist/forms/{KdsSubText.vue.d.ts → _helper/KdsSubText.vue.d.ts} +1 -1
  15. package/dist/forms/_helper/KdsSubText.vue.d.ts.map +1 -0
  16. package/dist/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts +39 -0
  17. package/dist/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts.map +1 -0
  18. package/dist/forms/_helper/VariablePopover/VariablePopover.vue.d.ts +27 -0
  19. package/dist/forms/_helper/VariablePopover/VariablePopover.vue.d.ts.map +1 -0
  20. package/dist/forms/_helper/VariablePopover/index.d.ts.map +1 -0
  21. package/dist/{buttons/KdsVariableToggleButton → forms/_helper/VariablePopover}/types.d.ts +1 -1
  22. package/dist/forms/_helper/VariablePopover/types.d.ts.map +1 -0
  23. package/dist/forms/index.d.ts +7 -3
  24. package/dist/forms/index.d.ts.map +1 -1
  25. package/dist/forms/inputs/NumberInput/KdsNumberInput.vue.d.ts.map +1 -1
  26. package/dist/forms/inputs/PatternInput/KdsPatternInput.vue.d.ts.map +1 -1
  27. package/dist/forms/inputs/SearchInput/KdsSearchInput.vue.d.ts.map +1 -1
  28. package/dist/forms/inputs/TextInput/KdsTextInput.vue.d.ts.map +1 -1
  29. package/dist/forms/inputs/Textarea/KdsTextarea.vue.d.ts.map +1 -1
  30. package/dist/forms/types.d.ts +23 -2
  31. package/dist/forms/types.d.ts.map +1 -1
  32. package/dist/index.css +258 -232
  33. package/dist/index.js +530 -363
  34. package/dist/index.js.map +1 -1
  35. package/dist/overlays/Modal/KdsModal.vue.d.ts +1 -1
  36. package/dist/overlays/Popover/KdsPopover.vue.d.ts +2 -0
  37. package/dist/overlays/Popover/KdsPopover.vue.d.ts.map +1 -1
  38. package/dist/overlays/Popover/enums.d.ts +6 -0
  39. package/dist/overlays/Popover/enums.d.ts.map +1 -1
  40. package/dist/overlays/Popover/index.d.ts +1 -1
  41. package/dist/overlays/Popover/index.d.ts.map +1 -1
  42. package/dist/overlays/Popover/types.d.ts +23 -2
  43. package/dist/overlays/Popover/types.d.ts.map +1 -1
  44. package/package.json +2 -2
  45. package/dist/buttons/KdsInfoToggleButton/KdsInfoToggleButton.vue.d.ts +0 -15
  46. package/dist/buttons/KdsInfoToggleButton/KdsInfoToggleButton.vue.d.ts.map +0 -1
  47. package/dist/buttons/KdsInfoToggleButton/index.d.ts.map +0 -1
  48. package/dist/buttons/KdsInfoToggleButton/types.d.ts +0 -8
  49. package/dist/buttons/KdsInfoToggleButton/types.d.ts.map +0 -1
  50. package/dist/buttons/KdsVariableToggleButton/KdsVariableToggleButton.vue.d.ts +0 -18
  51. package/dist/buttons/KdsVariableToggleButton/KdsVariableToggleButton.vue.d.ts.map +0 -1
  52. package/dist/buttons/KdsVariableToggleButton/index.d.ts.map +0 -1
  53. package/dist/buttons/KdsVariableToggleButton/types.d.ts.map +0 -1
  54. package/dist/forms/BaseFormFieldWrapper.vue.d.ts.map +0 -1
  55. package/dist/forms/KdsLabel.vue.d.ts +0 -6
  56. package/dist/forms/KdsLabel.vue.d.ts.map +0 -1
  57. package/dist/forms/KdsSubText.vue.d.ts.map +0 -1
  58. /package/dist/{buttons/KdsInfoToggleButton → forms/_helper/InfoPopover}/index.d.ts +0 -0
  59. /package/dist/{buttons/KdsVariableToggleButton → forms/_helper/VariablePopover}/index.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { defineComponent, ref, watch, computed, createElementBlock, openBlock, createElementVNode, toDisplayString, normalizeStyle, shallowRef, toRef, createBlock, unref, resolveDynamicComponent, normalizeClass, createCommentVNode, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, mergeModels, useModel, createVNode, useTemplateRef, useId, Fragment, renderList, onBeforeUpdate, nextTick, withModifiers, normalizeProps, guardReactiveProps, withDirectives, vModelText, mergeDefaults, useCssVars, createSlots, onBeforeUnmount, withKeys } from 'vue';
1
+ import { defineComponent, ref, watch, computed, createElementBlock, openBlock, createElementVNode, toDisplayString, normalizeStyle, shallowRef, toRef, createBlock, unref, resolveDynamicComponent, normalizeClass, createCommentVNode, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, mergeModels, useModel, createVNode, defineAsyncComponent, useTemplateRef, useId, Fragment, renderList, onBeforeUpdate, nextTick, withModifiers, normalizeProps, guardReactiveProps, withDirectives, vModelText, onBeforeUnmount, createTextVNode, mergeDefaults, useCssVars, createSlots, withKeys } from 'vue';
2
2
  import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useElementSize, isDefined } from '@vueuse/core';
3
3
 
4
- import './index.css';const _hoisted_1$p = ["role", "title", "aria-hidden", "aria-label"];
5
- const _hoisted_2$9 = ["src"];
4
+ import './index.css';const _hoisted_1$q = ["role", "title", "aria-hidden", "aria-label"];
5
+ const _hoisted_2$b = ["src"];
6
6
  const _hoisted_3$6 = {
7
7
  key: 1,
8
8
  class: "kds-avatar-initials",
9
9
  "aria-hidden": "true"
10
10
  };
11
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
11
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
12
12
  __name: "KdsAvatar",
13
13
  props: {
14
14
  initials: {},
@@ -50,10 +50,10 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
50
50
  alt: "",
51
51
  "aria-hidden": "true",
52
52
  onError: onImageError
53
- }, null, 40, _hoisted_2$9)) : (openBlock(), createElementBlock("div", _hoisted_3$6, [
53
+ }, null, 40, _hoisted_2$b)) : (openBlock(), createElementBlock("div", _hoisted_3$6, [
54
54
  createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)
55
55
  ]))
56
- ], 8, _hoisted_1$p);
56
+ ], 8, _hoisted_1$q);
57
57
  };
58
58
  }
59
59
  });
@@ -66,10 +66,10 @@ const _export_sfc = (sfc, props) => {
66
66
  return target;
67
67
  };
68
68
 
69
- const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-4a34a186"]]);
69
+ const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-4a34a186"]]);
70
70
 
71
- const _hoisted_1$o = ["role", "title", "aria-hidden", "aria-label"];
72
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
71
+ const _hoisted_1$p = ["role", "title", "aria-hidden", "aria-label"];
72
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
73
73
  __name: "KdsColorSwatch",
74
74
  props: {
75
75
  color: {},
@@ -103,12 +103,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
103
103
  style: normalizeStyle({ backgroundColor: backgroundColor.value }),
104
104
  "aria-hidden": hasTitle.value ? void 0 : "true",
105
105
  "aria-label": hasTitle.value ? accessibleTitle.value : void 0
106
- }, null, 12, _hoisted_1$o);
106
+ }, null, 12, _hoisted_1$p);
107
107
  };
108
108
  }
109
109
  });
110
110
 
111
- const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-c8fc7e8e"]]);
111
+ const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-c8fc7e8e"]]);
112
112
 
113
113
  const kdsColorSwatchType = {
114
114
  LEARNER: "learner",
@@ -155,7 +155,7 @@ const useIcon = ({
155
155
  return iconComponent;
156
156
  };
157
157
 
158
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
158
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
159
159
  __name: "KdsIcon",
160
160
  props: {
161
161
  name: {},
@@ -180,7 +180,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
180
180
  }
181
181
  });
182
182
 
183
- const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-3a57d423"]]);
183
+ const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-3a57d423"]]);
184
184
 
185
185
  const ID_TO_ICON_MAP = {
186
186
  // Flow Variables
@@ -505,8 +505,8 @@ const kdsDataTypeSize = {
505
505
  };
506
506
  const kdsDataTypeSizes = Object.values(kdsDataTypeSize);
507
507
 
508
- const _hoisted_1$n = ["title"];
509
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
508
+ const _hoisted_1$o = ["title"];
509
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
510
510
  __name: "KdsDataType",
511
511
  props: {
512
512
  iconName: { default: "unknown-datatype" },
@@ -546,19 +546,19 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
546
546
  "aria-hidden": "true",
547
547
  focusable: "false"
548
548
  }, null, 8, ["class"]))
549
- ], 10, _hoisted_1$n);
549
+ ], 10, _hoisted_1$o);
550
550
  };
551
551
  }
552
552
  });
553
553
 
554
- const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-d7166d18"]]);
554
+ const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-d7166d18"]]);
555
555
 
556
- const _hoisted_1$m = ["title", "aria-label"];
557
- const _hoisted_2$8 = {
556
+ const _hoisted_1$n = ["title", "aria-label"];
557
+ const _hoisted_2$a = {
558
558
  key: 0,
559
559
  class: "label"
560
560
  };
561
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
561
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
562
562
  __name: "KdsLiveStatus",
563
563
  props: {
564
564
  status: { default: "red" },
@@ -579,13 +579,13 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
579
579
  "aria-label": accessibleTitle.value
580
580
  }, [
581
581
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "dot" }, null, -1)),
582
- props.label ? (openBlock(), createElementBlock("span", _hoisted_2$8, toDisplayString(props.label), 1)) : createCommentVNode("", true)
583
- ], 10, _hoisted_1$m);
582
+ props.label ? (openBlock(), createElementBlock("span", _hoisted_2$a, toDisplayString(props.label), 1)) : createCommentVNode("", true)
583
+ ], 10, _hoisted_1$n);
584
584
  };
585
585
  }
586
586
  });
587
587
 
588
- const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-8bf6a94a"]]);
588
+ const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-8bf6a94a"]]);
589
589
 
590
590
  const kdsLiveStatusStatus = {
591
591
  RED: "red",
@@ -601,8 +601,8 @@ const kdsLiveStatusSize = {
601
601
  };
602
602
  const kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
603
603
 
604
- const _hoisted_1$l = ["data-style"];
605
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
604
+ const _hoisted_1$m = ["data-style"];
605
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
606
606
  __name: "KdsLoadingSpinner",
607
607
  props: {
608
608
  size: { default: "medium" },
@@ -627,12 +627,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
627
627
  cy: "60",
628
628
  r: "50"
629
629
  }, null, -1)
630
- ])], 10, _hoisted_1$l);
630
+ ])], 10, _hoisted_1$m);
631
631
  };
632
632
  }
633
633
  });
634
634
 
635
- const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-74bb7c3d"]]);
635
+ const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-74bb7c3d"]]);
636
636
 
637
637
  const kdsLoadingSpinnerVariant = {
638
638
  ON_PRIMARY: "onPrimary",
@@ -642,11 +642,11 @@ const kdsLoadingSpinnerVariants = Object.values(
642
642
  kdsLoadingSpinnerVariant
643
643
  );
644
644
 
645
- const _hoisted_1$k = {
645
+ const _hoisted_1$l = {
646
646
  key: 0,
647
647
  class: "label"
648
648
  };
649
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
649
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
650
650
  __name: "BaseButton",
651
651
  props: {
652
652
  size: { default: "medium" },
@@ -705,7 +705,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
705
705
  size: iconSize.value
706
706
  }, null, 8, ["name", "size"])) : createCommentVNode("", true)
707
707
  ], true),
708
- props.label ? (openBlock(), createElementBlock("span", _hoisted_1$k, toDisplayString(props.label), 1)) : createCommentVNode("", true),
708
+ props.label ? (openBlock(), createElementBlock("span", _hoisted_1$l, toDisplayString(props.label), 1)) : createCommentVNode("", true),
709
709
  props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
710
710
  key: 1,
711
711
  name: props.trailingIcon,
@@ -718,9 +718,9 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
718
718
  }
719
719
  });
720
720
 
721
- const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-b0f9559f"]]);
721
+ const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-b0f9559f"]]);
722
722
 
723
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
723
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
724
724
  __name: "KdsButton",
725
725
  props: {
726
726
  size: {},
@@ -773,7 +773,7 @@ const resolveNuxtLinkComponent = () => {
773
773
  return fallbackComponent;
774
774
  };
775
775
 
776
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
776
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
777
777
  __name: "KdsLinkButton",
778
778
  props: {
779
779
  size: {},
@@ -809,7 +809,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
809
809
  }
810
810
  });
811
811
 
812
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
812
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
813
813
  __name: "KdsToggleButton",
814
814
  props: /* @__PURE__ */ mergeModels({
815
815
  size: {},
@@ -844,9 +844,9 @@ const kdsToggleButtonVariant = {
844
844
  };
845
845
  const kdsToggleButtonVariants = Object.values(kdsToggleButtonVariant);
846
846
 
847
- const _hoisted_1$j = ["data-visible"];
848
- const _hoisted_2$7 = ["data-visible"];
849
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
847
+ const _hoisted_1$k = ["data-visible"];
848
+ const _hoisted_2$9 = ["data-visible"];
849
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
850
850
  __name: "KdsProgressButton",
851
851
  props: /* @__PURE__ */ mergeModels({
852
852
  size: { default: "medium" },
@@ -909,7 +909,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
909
909
  name: props.leadingIcon,
910
910
  size: iconSize.value
911
911
  }, null, 8, ["name", "size"])
912
- ], 8, _hoisted_1$j),
912
+ ], 8, _hoisted_1$k),
913
913
  createElementVNode("span", {
914
914
  class: "spinner",
915
915
  "data-visible": state.value === "progress"
@@ -918,7 +918,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
918
918
  size: iconSize.value,
919
919
  variant: props.variant === "filled" ? "onPrimary" : "onSurface"
920
920
  }, null, 8, ["size", "variant"])
921
- ], 8, _hoisted_2$7)
921
+ ], 8, _hoisted_2$9)
922
922
  ], 2)
923
923
  ]),
924
924
  _: 1
@@ -927,7 +927,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
927
927
  }
928
928
  });
929
929
 
930
- const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-ec08a9ba"]]);
930
+ const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-ec08a9ba"]]);
931
931
 
932
932
  const kdsProgressButtonState = {
933
933
  DEFAULT: "default",
@@ -937,134 +937,6 @@ const kdsProgressButtonState = {
937
937
  };
938
938
  const kdsProgressButtonStates = Object.values(kdsProgressButtonState);
939
939
 
940
- const _hoisted_1$i = ["disabled", "aria-pressed"];
941
- const TITLE = "Click for more information";
942
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
943
- __name: "KdsInfoToggleButton",
944
- props: /* @__PURE__ */ mergeModels({
945
- disabled: { type: Boolean, default: false },
946
- hidden: { type: Boolean, default: false }
947
- }, {
948
- "modelValue": { type: Boolean, ...{ default: false } },
949
- "modelModifiers": {}
950
- }),
951
- emits: ["update:modelValue"],
952
- setup(__props) {
953
- const props = __props;
954
- const modelValue = useModel(__props, "modelValue");
955
- return (_ctx, _cache) => {
956
- return openBlock(), createElementBlock("button", {
957
- class: normalizeClass({
958
- "info-toggle-button": true,
959
- selected: modelValue.value,
960
- disabled: props.disabled,
961
- hidden: props.hidden && !modelValue.value
962
- }),
963
- disabled: props.disabled,
964
- title: TITLE,
965
- "aria-label": TITLE,
966
- "aria-pressed": modelValue.value,
967
- type: "button",
968
- onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value)
969
- }, [
970
- createVNode(KdsIcon, {
971
- name: "circle-question",
972
- size: "xsmall"
973
- })
974
- ], 10, _hoisted_1$i);
975
- };
976
- }
977
- });
978
-
979
- const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-ad020a5d"]]);
980
-
981
- const _hoisted_1$h = ["disabled", "title", "aria-label", "aria-pressed"];
982
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
983
- __name: "KdsVariableToggleButton",
984
- props: /* @__PURE__ */ mergeModels({
985
- disabled: { type: Boolean, default: false },
986
- hidden: { type: Boolean, default: false },
987
- inSet: { type: Boolean, default: false },
988
- outSet: { type: Boolean, default: false },
989
- error: { type: Boolean, default: false }
990
- }, {
991
- "modelValue": { type: Boolean, ...{ default: false } },
992
- "modelModifiers": {}
993
- }),
994
- emits: ["update:modelValue"],
995
- setup(__props) {
996
- const props = __props;
997
- const modelValue = useModel(__props, "modelValue");
998
- const iconState = computed(() => {
999
- if (props.inSet && props.outSet) {
1000
- return "in-out";
1001
- }
1002
- if (props.inSet) {
1003
- return "in";
1004
- }
1005
- if (props.outSet) {
1006
- return "out";
1007
- }
1008
- return "none";
1009
- });
1010
- const iconName = computed(() => {
1011
- switch (iconState.value) {
1012
- case "in":
1013
- return "flow-variable-in";
1014
- case "out":
1015
- return "flow-variable-out";
1016
- case "in-out":
1017
- return "flow-variable-in-out";
1018
- case "none":
1019
- default:
1020
- return "flow-variable-default";
1021
- }
1022
- });
1023
- const baseTitleByState = {
1024
- in: "Input Flow Variable",
1025
- out: "Output Flow Variable",
1026
- "in-out": "Input and Output Flow Variable",
1027
- none: "No Flow Variable set"
1028
- };
1029
- const errorTitleByState = {
1030
- in: "Error in input Flow Variable",
1031
- out: "Error in output Flow Variable",
1032
- "in-out": "Error in Flow Variables"
1033
- };
1034
- const title = computed(() => {
1035
- const baseTitle = baseTitleByState[iconState.value];
1036
- if (!props.error) {
1037
- return baseTitle;
1038
- }
1039
- return errorTitleByState[iconState.value] ?? baseTitle;
1040
- });
1041
- return (_ctx, _cache) => {
1042
- return openBlock(), createElementBlock("button", {
1043
- class: normalizeClass({
1044
- "variable-toggle-button": true,
1045
- disabled: props.disabled,
1046
- error: props.error,
1047
- "pressed-or-set": modelValue.value || props.inSet || props.outSet,
1048
- hidden: props.hidden && !modelValue.value
1049
- }),
1050
- disabled: props.disabled,
1051
- title: title.value,
1052
- "aria-label": title.value,
1053
- "aria-pressed": modelValue.value,
1054
- type: "button",
1055
- onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value)
1056
- }, [
1057
- createVNode(KdsIcon, {
1058
- name: iconName.value,
1059
- size: "xsmall"
1060
- }, null, 8, ["name"])
1061
- ], 10, _hoisted_1$h);
1062
- };
1063
- }
1064
- });
1065
-
1066
- const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-968c795f"]]);
1067
-
1068
940
  const kdsButtonSize = {
1069
941
  XSMALL: "xsmall",
1070
942
  SMALL: "small",
@@ -1181,36 +1053,49 @@ function useKdsIsTruncated(elementRef) {
1181
1053
  return { isTruncated };
1182
1054
  }
1183
1055
 
1184
- const _hoisted_1$g = ["id", "for", "title"];
1185
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
1056
+ const _hoisted_1$j = { class: "kds-label-wrapper" };
1057
+ const _hoisted_2$8 = ["id", "for", "title"];
1058
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1186
1059
  __name: "KdsLabel",
1187
1060
  props: {
1188
1061
  label: {},
1189
1062
  id: {},
1190
- for: {}
1063
+ for: {},
1064
+ description: { default: void 0 },
1065
+ showDescriptionButton: { type: Boolean, default: false }
1191
1066
  },
1192
1067
  setup(__props) {
1193
1068
  const props = __props;
1069
+ const KdsInfoToggleButton = defineAsyncComponent(
1070
+ () => Promise.resolve().then(() => KdsInfoToggleButton$1)
1071
+ );
1194
1072
  const labelEl = useTemplateRef("labelEl");
1195
1073
  const { isTruncated } = useKdsIsTruncated(labelEl);
1196
1074
  return (_ctx, _cache) => {
1197
- return openBlock(), createElementBlock("label", {
1198
- id: props.id,
1199
- ref_key: "labelEl",
1200
- ref: labelEl,
1201
- for: props.for,
1202
- class: "label",
1203
- title: unref(isTruncated) ? props.label : void 0
1204
- }, toDisplayString(props.label), 9, _hoisted_1$g);
1075
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
1076
+ createElementVNode("label", {
1077
+ id: props.id,
1078
+ ref_key: "labelEl",
1079
+ ref: labelEl,
1080
+ for: props.for,
1081
+ class: "label",
1082
+ title: unref(isTruncated) ? props.label : void 0
1083
+ }, toDisplayString(props.label), 9, _hoisted_2$8),
1084
+ props.description ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
1085
+ key: 0,
1086
+ content: props.description,
1087
+ hidden: !props.showDescriptionButton
1088
+ }, null, 8, ["content", "hidden"])) : createCommentVNode("", true)
1089
+ ]);
1205
1090
  };
1206
1091
  }
1207
1092
  });
1208
1093
 
1209
- const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-76bdc306"]]);
1094
+ const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-1a5dc1ba"]]);
1210
1095
 
1211
- const _hoisted_1$f = ["id"];
1212
- const _hoisted_2$6 = { class: "subtext-text" };
1213
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
1096
+ const _hoisted_1$i = ["id"];
1097
+ const _hoisted_2$7 = { class: "subtext-text" };
1098
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1214
1099
  __name: "KdsSubText",
1215
1100
  props: {
1216
1101
  id: {},
@@ -1241,16 +1126,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1241
1126
  variant: "onSurface",
1242
1127
  "aria-hidden": "true"
1243
1128
  })) : createCommentVNode("", true),
1244
- createElementVNode("span", _hoisted_2$6, toDisplayString(props.subText), 1)
1245
- ], 10, _hoisted_1$f)) : createCommentVNode("", true);
1129
+ createElementVNode("span", _hoisted_2$7, toDisplayString(props.subText), 1)
1130
+ ], 10, _hoisted_1$i)) : createCommentVNode("", true);
1246
1131
  };
1247
1132
  }
1248
1133
  });
1249
1134
 
1250
- const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-58a95aa3"]]);
1135
+ const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-df9a85a4"]]);
1251
1136
 
1252
- const _hoisted_1$e = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
1253
- const _hoisted_2$5 = { class: "control" };
1137
+ const _hoisted_1$h = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
1138
+ const _hoisted_2$6 = { class: "control" };
1254
1139
  const _hoisted_3$5 = {
1255
1140
  key: 0,
1256
1141
  class: "content"
@@ -1261,7 +1146,7 @@ const _hoisted_6$1 = {
1261
1146
  key: 0,
1262
1147
  class: "subtext-wrapper"
1263
1148
  };
1264
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1149
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1265
1150
  __name: "BaseCheckbox",
1266
1151
  props: /* @__PURE__ */ mergeModels({
1267
1152
  disabled: { type: Boolean, default: false },
@@ -1334,7 +1219,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1334
1219
  role: "checkbox",
1335
1220
  onClick: handleClick
1336
1221
  }, [
1337
- createElementVNode("div", _hoisted_2$5, [
1222
+ createElementVNode("div", _hoisted_2$6, [
1338
1223
  icon.value ? (openBlock(), createBlock(KdsIcon, {
1339
1224
  key: 0,
1340
1225
  name: icon.value,
@@ -1350,7 +1235,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1350
1235
  class: "helper-text"
1351
1236
  }, toDisplayString(props.helperText), 9, _hoisted_5$1)) : createCommentVNode("", true)
1352
1237
  ])) : createCommentVNode("", true)
1353
- ], 10, _hoisted_1$e),
1238
+ ], 10, _hoisted_1$h),
1354
1239
  props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
1355
1240
  createVNode(KdsSubText, {
1356
1241
  id: unref(descriptionId),
@@ -1364,9 +1249,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1364
1249
  }
1365
1250
  });
1366
1251
 
1367
- const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-3751dc60"]]);
1252
+ const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-428e95ca"]]);
1368
1253
 
1369
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
1254
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1370
1255
  __name: "KdsCheckbox",
1371
1256
  props: /* @__PURE__ */ mergeModels({
1372
1257
  disabled: { type: Boolean, default: false },
@@ -1398,8 +1283,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1398
1283
  }
1399
1284
  });
1400
1285
 
1401
- const _hoisted_1$d = ["id", "aria-labelledby", "aria-describedby"];
1402
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
1286
+ const _hoisted_1$g = ["id", "aria-labelledby", "aria-describedby"];
1287
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1403
1288
  __name: "KdsCheckboxGroup",
1404
1289
  props: /* @__PURE__ */ mergeModels({
1405
1290
  id: {},
@@ -1483,12 +1368,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1483
1368
  "preserve-sub-text-space": props.preserveSubTextSpace,
1484
1369
  error: hasError.value
1485
1370
  }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1486
- ], 8, _hoisted_1$d);
1371
+ ], 8, _hoisted_1$g);
1487
1372
  };
1488
1373
  }
1489
1374
  });
1490
1375
 
1491
- const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-538e7d4c"]]);
1376
+ const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-c38eeda5"]]);
1492
1377
 
1493
1378
  const kdsCheckboxGroupAlignment = {
1494
1379
  VERTICAL: "vertical",
@@ -1504,8 +1389,8 @@ const kdsCheckboxValue = {
1504
1389
  };
1505
1390
  const kdsCheckboxValues = Object.values(kdsCheckboxValue);
1506
1391
 
1507
- const _hoisted_1$c = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
1508
- const _hoisted_2$4 = { class: "control" };
1392
+ const _hoisted_1$f = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
1393
+ const _hoisted_2$5 = { class: "control" };
1509
1394
  const _hoisted_3$4 = {
1510
1395
  key: 0,
1511
1396
  class: "dot",
@@ -1516,7 +1401,7 @@ const _hoisted_3$4 = {
1516
1401
  const _hoisted_4$3 = { class: "content" };
1517
1402
  const _hoisted_5 = { class: "label" };
1518
1403
  const _hoisted_6 = ["id"];
1519
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
1404
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1520
1405
  __name: "KdsRadioButton",
1521
1406
  props: /* @__PURE__ */ mergeModels({
1522
1407
  text: {},
@@ -1556,7 +1441,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1556
1441
  type: "button",
1557
1442
  onClick: handleClick
1558
1443
  }, [
1559
- createElementVNode("div", _hoisted_2$4, [
1444
+ createElementVNode("div", _hoisted_2$5, [
1560
1445
  modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$4, [..._cache[0] || (_cache[0] = [
1561
1446
  createElementVNode("circle", {
1562
1447
  cx: "1",
@@ -1573,12 +1458,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1573
1458
  class: "helper-text"
1574
1459
  }, toDisplayString(props.helperText), 9, _hoisted_6)) : createCommentVNode("", true)
1575
1460
  ])
1576
- ], 10, _hoisted_1$c);
1461
+ ], 10, _hoisted_1$f);
1577
1462
  };
1578
1463
  }
1579
1464
  });
1580
1465
 
1581
- const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-a7490a52"]]);
1466
+ const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-a7490a52"]]);
1582
1467
 
1583
1468
  const useRadioSelection = ({
1584
1469
  selectedId,
@@ -1700,8 +1585,8 @@ const useRadioSelection = ({
1700
1585
  };
1701
1586
  };
1702
1587
 
1703
- const _hoisted_1$b = ["id", "aria-labelledby", "aria-describedby"];
1704
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
1588
+ const _hoisted_1$e = ["id", "aria-labelledby", "aria-describedby"];
1589
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1705
1590
  __name: "KdsRadioButtonGroup",
1706
1591
  props: /* @__PURE__ */ mergeModels({
1707
1592
  id: {},
@@ -1780,15 +1665,15 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1780
1665
  "preserve-sub-text-space": props.preserveSubTextSpace,
1781
1666
  error: unref(hasError)
1782
1667
  }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1783
- ], 8, _hoisted_1$b);
1668
+ ], 8, _hoisted_1$e);
1784
1669
  };
1785
1670
  }
1786
1671
  });
1787
1672
 
1788
- const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-15fb8864"]]);
1673
+ const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-9cc4dcdd"]]);
1789
1674
 
1790
- const _hoisted_1$a = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
1791
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
1675
+ const _hoisted_1$d = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
1676
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1792
1677
  __name: "ValueSwitchItem",
1793
1678
  props: {
1794
1679
  selected: { type: Boolean },
@@ -1838,12 +1723,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1838
1723
  name: props.trailingIcon,
1839
1724
  size: props.size
1840
1725
  }, null, 8, ["name", "size"])) : createCommentVNode("", true)
1841
- ], 10, _hoisted_1$a);
1726
+ ], 10, _hoisted_1$d);
1842
1727
  };
1843
1728
  }
1844
1729
  });
1845
1730
 
1846
- const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-93f3f577"]]);
1731
+ const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-93f3f577"]]);
1847
1732
 
1848
1733
  const useValueSwitchIconHiding = ({
1849
1734
  width,
@@ -1894,8 +1779,8 @@ const useValueSwitchIconHiding = ({
1894
1779
  };
1895
1780
  };
1896
1781
 
1897
- const _hoisted_1$9 = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
1898
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
1782
+ const _hoisted_1$c = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
1783
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1899
1784
  __name: "KdsValueSwitch",
1900
1785
  props: /* @__PURE__ */ mergeModels({
1901
1786
  id: {},
@@ -1988,12 +1873,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1988
1873
  "preserve-sub-text-space": props.preserveSubTextSpace,
1989
1874
  error: props.error
1990
1875
  }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1991
- ], 10, _hoisted_1$9);
1876
+ ], 10, _hoisted_1$c);
1992
1877
  };
1993
1878
  }
1994
1879
  });
1995
1880
 
1996
- const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-56b594ad"]]);
1881
+ const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-666d4c10"]]);
1997
1882
 
1998
1883
  const kdsRadioButtonGroupAlignment = {
1999
1884
  VERTICAL: "vertical",
@@ -2013,13 +1898,13 @@ const kdsValueSwitchVariant = {
2013
1898
  };
2014
1899
  const kdsValueSwitchVariants = Object.values(kdsValueSwitchVariant);
2015
1900
 
2016
- const _hoisted_1$8 = { class: "kds-form-field" };
2017
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
1901
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2018
1902
  __name: "BaseFormFieldWrapper",
2019
1903
  props: {
2020
1904
  id: {},
2021
1905
  label: {},
2022
1906
  ariaLabel: {},
1907
+ description: {},
2023
1908
  subText: {},
2024
1909
  error: { type: Boolean },
2025
1910
  validating: { type: Boolean },
@@ -2031,14 +1916,21 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2031
1916
  const inputId = computed(() => props.id?.trim() || fallbackId);
2032
1917
  const labelId = computed(() => `${inputId.value}-label`);
2033
1918
  const subTextId = computed(() => `${inputId.value}-subtext`);
1919
+ const isHovered = ref(false);
2034
1920
  return (_ctx, _cache) => {
2035
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
1921
+ return openBlock(), createElementBlock("div", {
1922
+ class: "kds-form-field",
1923
+ onMouseenter: _cache[0] || (_cache[0] = ($event) => isHovered.value = true),
1924
+ onMouseleave: _cache[1] || (_cache[1] = ($event) => isHovered.value = false)
1925
+ }, [
2036
1926
  props.label ? (openBlock(), createBlock(KdsLabel, {
2037
1927
  key: 0,
2038
1928
  id: labelId.value,
2039
1929
  for: inputId.value,
2040
- label: props.label
2041
- }, null, 8, ["id", "for", "label"])) : createCommentVNode("", true),
1930
+ label: props.label,
1931
+ description: props.description,
1932
+ "show-description-button": isHovered.value
1933
+ }, null, 8, ["id", "for", "label", "description", "show-description-button"])) : createCommentVNode("", true),
2042
1934
  renderSlot(_ctx.$slots, "default", {
2043
1935
  id: inputId.value,
2044
1936
  ariaLabelledby: props.label ? labelId.value : void 0,
@@ -2053,18 +1945,18 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2053
1945
  validating: props.validating,
2054
1946
  "preserve-sub-text-space": props.preserveSubTextSpace
2055
1947
  }, null, 8, ["id", "sub-text", "error", "validating", "preserve-sub-text-space"])
2056
- ]);
1948
+ ], 32);
2057
1949
  };
2058
1950
  }
2059
1951
  });
2060
1952
 
2061
- const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-52b1df11"]]);
1953
+ const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-5d99c134"]]);
2062
1954
 
2063
- const _hoisted_1$7 = {
1955
+ const _hoisted_1$b = {
2064
1956
  key: 0,
2065
1957
  class: "icon-wrapper leading"
2066
1958
  };
2067
- const _hoisted_2$3 = ["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"];
1959
+ const _hoisted_2$4 = ["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"];
2068
1960
  const _hoisted_3$3 = {
2069
1961
  key: 3,
2070
1962
  class: "trailing-slot"
@@ -2073,7 +1965,7 @@ const _hoisted_4$2 = {
2073
1965
  key: 4,
2074
1966
  class: "icon-wrapper trailing"
2075
1967
  };
2076
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
1968
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2077
1969
  __name: "BaseInput",
2078
1970
  props: /* @__PURE__ */ mergeModels({
2079
1971
  id: {},
@@ -2149,7 +2041,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2149
2041
  }),
2150
2042
  onClick: handleContainerClick
2151
2043
  }, [
2152
- props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
2044
+ props.leadingIcon ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
2153
2045
  props.leadingIcon ? (openBlock(), createBlock(KdsIcon, {
2154
2046
  key: 0,
2155
2047
  name: props.leadingIcon
@@ -2185,7 +2077,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2185
2077
  onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur", $event)),
2186
2078
  onKeydown: _cache[2] || (_cache[2] = ($event) => emit("keydown", $event)),
2187
2079
  onClick: _cache[3] || (_cache[3] = ($event) => emit("click", $event))
2188
- }, null, 42, _hoisted_2$3),
2080
+ }, null, 42, _hoisted_2$4),
2189
2081
  props.unit ? (openBlock(), createElementBlock("span", {
2190
2082
  key: 1,
2191
2083
  class: normalizeClass({
@@ -2194,7 +2086,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2194
2086
  disabled: props.disabled
2195
2087
  })
2196
2088
  }, toDisplayString(props.unit), 3)) : createCommentVNode("", true),
2197
- props.clearable && hasValue.value && !props.disabled && !props.readonly ? (openBlock(), createBlock(_sfc_main$r, {
2089
+ props.clearable && hasValue.value && !props.disabled && !props.readonly ? (openBlock(), createBlock(_sfc_main$t, {
2198
2090
  key: 2,
2199
2091
  class: "clear-button",
2200
2092
  type: "button",
@@ -2218,7 +2110,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2218
2110
  }
2219
2111
  });
2220
2112
 
2221
- const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-cf72eb5a"]]);
2113
+ const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cf72eb5a"]]);
2222
2114
 
2223
2115
  const additionalGroupSeparators = [" ", " ", " "];
2224
2116
  const decimalSeparatorSample = 1.1;
@@ -2342,9 +2234,10 @@ const createKdsNumberParser = (params) => {
2342
2234
  };
2343
2235
  };
2344
2236
 
2345
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
2237
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2346
2238
  __name: "KdsNumberInput",
2347
2239
  props: /* @__PURE__ */ mergeModels({
2240
+ description: {},
2348
2241
  label: {},
2349
2242
  ariaLabel: {},
2350
2243
  id: {},
@@ -2367,7 +2260,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2367
2260
  "modelModifiers": {}
2368
2261
  }),
2369
2262
  emits: ["update:modelValue"],
2370
- setup(__props) {
2263
+ setup(__props, { expose: __expose }) {
2371
2264
  const props = __props;
2372
2265
  const modelValue = useModel(__props, "modelValue");
2373
2266
  const isFocused = ref(false);
@@ -2467,10 +2360,17 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2467
2360
  modelValue.value = normalized;
2468
2361
  localValue.value = numberParser.value.formatForDisplay(normalized);
2469
2362
  };
2363
+ const baseInput = useTemplateRef("baseInput");
2364
+ __expose({
2365
+ focus: () => baseInput.value?.focus()
2366
+ });
2470
2367
  return (_ctx, _cache) => {
2471
2368
  return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2472
2369
  default: withCtx((slotProps) => [
2473
- createVNode(BaseInput, mergeProps(slotProps, {
2370
+ createVNode(BaseInput, mergeProps({
2371
+ ref_key: "baseInput",
2372
+ ref: baseInput
2373
+ }, slotProps, {
2474
2374
  "model-value": localValue.value,
2475
2375
  type: "text",
2476
2376
  inputmode: props.step >= 1 ? "numeric" : "decimal",
@@ -2493,7 +2393,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2493
2393
  onBlur: handleBlur
2494
2394
  }), {
2495
2395
  trailing: withCtx(() => [
2496
- createVNode(_sfc_main$r, {
2396
+ createVNode(_sfc_main$t, {
2497
2397
  type: "button",
2498
2398
  size: "xsmall",
2499
2399
  variant: "outlined",
@@ -2502,7 +2402,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2502
2402
  disabled: !canDecrease.value,
2503
2403
  onClick: _cache[0] || (_cache[0] = ($event) => adjustByStep(-1))
2504
2404
  }, null, 8, ["aria-label", "disabled"]),
2505
- createVNode(_sfc_main$r, {
2405
+ createVNode(_sfc_main$t, {
2506
2406
  type: "button",
2507
2407
  size: "xsmall",
2508
2408
  variant: "outlined",
@@ -2608,9 +2508,10 @@ const parseRegexToPatternInputValue = (regex, options) => {
2608
2508
  return wildcard ?? body;
2609
2509
  };
2610
2510
 
2611
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2511
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2612
2512
  __name: "KdsPatternInput",
2613
2513
  props: /* @__PURE__ */ mergeModels({
2514
+ description: {},
2614
2515
  label: {},
2615
2516
  ariaLabel: {},
2616
2517
  id: {},
@@ -2629,7 +2530,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2629
2530
  "modelModifiers": {}
2630
2531
  }),
2631
2532
  emits: ["update:modelValue"],
2632
- setup(__props) {
2533
+ setup(__props, { expose: __expose }) {
2633
2534
  const props = __props;
2634
2535
  const regex = useModel(__props, "modelValue");
2635
2536
  const uiValue = ref("");
@@ -2663,10 +2564,17 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2663
2564
  const patternModeAriaLabel = computed(
2664
2565
  () => useRegex.value ? "Use regex pattern" : "Use wildcard pattern"
2665
2566
  );
2567
+ const baseInput = useTemplateRef("baseInput");
2568
+ __expose({
2569
+ focus: () => baseInput.value?.focus()
2570
+ });
2666
2571
  return (_ctx, _cache) => {
2667
2572
  return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2668
2573
  default: withCtx((slotProps) => [
2669
- createVNode(BaseInput, mergeProps(slotProps, {
2574
+ createVNode(BaseInput, mergeProps({
2575
+ ref_key: "baseInput",
2576
+ ref: baseInput
2577
+ }, slotProps, {
2670
2578
  modelValue: uiValue.value,
2671
2579
  "onUpdate:modelValue": [
2672
2580
  _cache[3] || (_cache[3] = ($event) => uiValue.value = $event),
@@ -2684,7 +2592,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2684
2592
  clearable: ""
2685
2593
  }), {
2686
2594
  trailing: withCtx(() => [
2687
- createVNode(_sfc_main$p, {
2595
+ createVNode(_sfc_main$r, {
2688
2596
  modelValue: caseSensitive.value,
2689
2597
  "onUpdate:modelValue": [
2690
2598
  _cache[0] || (_cache[0] = ($event) => caseSensitive.value = $event),
@@ -2697,7 +2605,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2697
2605
  "aria-label": caseSensitiveAriaLabel.value,
2698
2606
  disabled: props.disabled || props.readonly
2699
2607
  }, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
2700
- createVNode(_sfc_main$p, {
2608
+ createVNode(_sfc_main$r, {
2701
2609
  modelValue: excludeMatches.value,
2702
2610
  "onUpdate:modelValue": [
2703
2611
  _cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
@@ -2710,7 +2618,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2710
2618
  "aria-label": excludeMatchesAriaLabel.value,
2711
2619
  disabled: props.disabled || props.readonly
2712
2620
  }, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
2713
- createVNode(_sfc_main$p, {
2621
+ createVNode(_sfc_main$r, {
2714
2622
  modelValue: useRegex.value,
2715
2623
  "onUpdate:modelValue": [
2716
2624
  _cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
@@ -2733,9 +2641,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2733
2641
  }
2734
2642
  });
2735
2643
 
2736
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2644
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2737
2645
  __name: "KdsSearchInput",
2738
2646
  props: /* @__PURE__ */ mergeModels({
2647
+ description: {},
2739
2648
  label: {},
2740
2649
  ariaLabel: {},
2741
2650
  id: {},
@@ -2757,17 +2666,17 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2757
2666
  setup(__props, { expose: __expose }) {
2758
2667
  const props = __props;
2759
2668
  const modelValue = useModel(__props, "modelValue");
2760
- const baseInputRef = useTemplateRef("baseInput");
2669
+ const baseInput = useTemplateRef("baseInput");
2761
2670
  __expose({
2762
- /**
2763
- * Focuses the input element
2764
- */
2765
- focus: () => baseInputRef.value?.focus()
2671
+ focus: () => baseInput.value?.focus()
2766
2672
  });
2767
2673
  return (_ctx, _cache) => {
2768
2674
  return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2769
2675
  default: withCtx((slotProps) => [
2770
- createVNode(BaseInput, mergeProps({ ref: "baseInput" }, slotProps, {
2676
+ createVNode(BaseInput, mergeProps({
2677
+ ref_key: "baseInput",
2678
+ ref: baseInput
2679
+ }, slotProps, {
2771
2680
  modelValue: modelValue.value,
2772
2681
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2773
2682
  type: "search",
@@ -2788,9 +2697,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2788
2697
  }
2789
2698
  });
2790
2699
 
2791
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2700
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2792
2701
  __name: "KdsTextInput",
2793
2702
  props: /* @__PURE__ */ mergeModels({
2703
+ description: {},
2794
2704
  label: {},
2795
2705
  ariaLabel: {},
2796
2706
  id: {},
@@ -2809,13 +2719,20 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2809
2719
  "modelModifiers": {}
2810
2720
  }),
2811
2721
  emits: ["update:modelValue"],
2812
- setup(__props) {
2722
+ setup(__props, { expose: __expose }) {
2813
2723
  const props = __props;
2814
2724
  const modelValue = useModel(__props, "modelValue");
2725
+ const baseInput = useTemplateRef("baseInput");
2726
+ __expose({
2727
+ focus: () => baseInput.value?.focus()
2728
+ });
2815
2729
  return (_ctx, _cache) => {
2816
2730
  return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2817
2731
  default: withCtx((slotProps) => [
2818
- createVNode(BaseInput, mergeProps(slotProps, {
2732
+ createVNode(BaseInput, mergeProps({
2733
+ ref_key: "baseInput",
2734
+ ref: baseInput
2735
+ }, slotProps, {
2819
2736
  modelValue: modelValue.value,
2820
2737
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2821
2738
  type: "text",
@@ -2834,10 +2751,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2834
2751
  }
2835
2752
  });
2836
2753
 
2837
- const _hoisted_1$6 = ["rows", "placeholder", "disabled", "readonly", "required", "name", "autocomplete"];
2838
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2754
+ const _hoisted_1$a = ["rows", "placeholder", "disabled", "readonly", "required", "name", "autocomplete"];
2755
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2839
2756
  __name: "KdsTextarea",
2840
2757
  props: /* @__PURE__ */ mergeModels({
2758
+ description: {},
2841
2759
  label: {},
2842
2760
  ariaLabel: {},
2843
2761
  id: {},
@@ -2857,7 +2775,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2857
2775
  "modelModifiers": {}
2858
2776
  }),
2859
2777
  emits: ["update:modelValue"],
2860
- setup(__props) {
2778
+ setup(__props, { expose: __expose }) {
2861
2779
  const props = __props;
2862
2780
  const normalizedRows = computed(() => Math.max(1, props.rows));
2863
2781
  const modelValue = useModel(__props, "modelValue");
@@ -2877,6 +2795,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2877
2795
  }
2878
2796
  useResizeObserver(textareaElement, resize);
2879
2797
  watch(modelValue, resize, { immediate: true });
2798
+ __expose({
2799
+ focus: () => {
2800
+ textareaElement.value?.focus();
2801
+ }
2802
+ });
2880
2803
  return (_ctx, _cache) => {
2881
2804
  return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2882
2805
  default: withCtx((slotProps) => [
@@ -2892,7 +2815,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2892
2815
  required: props.required,
2893
2816
  name: props.name,
2894
2817
  autocomplete: props.autocomplete
2895
- }), null, 16, _hoisted_1$6), [
2818
+ }), null, 16, _hoisted_1$a), [
2896
2819
  [vModelText, modelValue.value]
2897
2820
  ])
2898
2821
  ]),
@@ -2902,7 +2825,334 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2902
2825
  }
2903
2826
  });
2904
2827
 
2905
- const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f0055631"]]);
2828
+ const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-2e4d2d42"]]);
2829
+
2830
+ const _hoisted_1$9 = ["id", "popover", "role"];
2831
+ const _hoisted_2$3 = {
2832
+ key: 0,
2833
+ class: "kds-popover-default-content"
2834
+ };
2835
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2836
+ __name: "KdsPopover",
2837
+ props: /* @__PURE__ */ mergeModels({
2838
+ activatorEl: {},
2839
+ anchorEl: {},
2840
+ placement: { default: "bottom-left" },
2841
+ role: { default: "dialog" },
2842
+ fullWidth: { type: Boolean, default: false },
2843
+ content: {}
2844
+ }, {
2845
+ "modelValue": { type: Boolean, ...{ default: false } },
2846
+ "modelModifiers": {}
2847
+ }),
2848
+ emits: ["update:modelValue"],
2849
+ setup(__props) {
2850
+ const props = __props;
2851
+ const open = useModel(__props, "modelValue");
2852
+ const popoverEl = useTemplateRef("popoverEl");
2853
+ const popoverId = useId();
2854
+ const anchorName = `--anchor-${popoverId}`;
2855
+ const resolveElement = (el) => {
2856
+ if (!el) {
2857
+ return null;
2858
+ }
2859
+ const maybeInstance = el;
2860
+ const candidate = maybeInstance.$el ?? el;
2861
+ return candidate instanceof HTMLElement ? candidate : null;
2862
+ };
2863
+ const setA11yAttributes = (el, options) => {
2864
+ if (!el) {
2865
+ return;
2866
+ }
2867
+ if (options === null) {
2868
+ el.removeAttribute("aria-expanded");
2869
+ el.removeAttribute("aria-controls");
2870
+ el.removeAttribute("aria-haspopup");
2871
+ return;
2872
+ }
2873
+ el.setAttribute("aria-expanded", String(options.expanded));
2874
+ el.setAttribute("aria-controls", options.popoverId);
2875
+ el.setAttribute("aria-haspopup", props.role);
2876
+ };
2877
+ watch(open, (isOpen) => {
2878
+ if (isOpen) {
2879
+ popoverEl.value?.showPopover?.();
2880
+ } else {
2881
+ popoverEl.value?.hidePopover?.();
2882
+ }
2883
+ const activatorElement = resolveElement(unref(props.activatorEl));
2884
+ activatorElement?.setAttribute("aria-expanded", String(isOpen));
2885
+ });
2886
+ watch(
2887
+ () => [unref(props.anchorEl), unref(props.activatorEl)],
2888
+ ([nextAnchorEl, nextActivatorEl], prev) => {
2889
+ const [prevAnchorEl, prevActivatorEl] = prev ?? [null, null];
2890
+ const prevAnchor = resolveElement(prevAnchorEl ?? null) ?? resolveElement(prevActivatorEl);
2891
+ prevAnchor?.style.removeProperty("anchor-name");
2892
+ const prevActivator = resolveElement(prevActivatorEl);
2893
+ setA11yAttributes(prevActivator, null);
2894
+ const nextAnchor = resolveElement(nextAnchorEl ?? null) ?? resolveElement(nextActivatorEl);
2895
+ nextAnchor?.style.setProperty("anchor-name", anchorName);
2896
+ const nextActivator = resolveElement(nextActivatorEl);
2897
+ setA11yAttributes(nextActivator, { expanded: open.value, popoverId });
2898
+ },
2899
+ { immediate: true }
2900
+ );
2901
+ onBeforeUnmount(() => {
2902
+ const anchor = resolveElement(unref(props.anchorEl) ?? null) ?? resolveElement(unref(props.activatorEl));
2903
+ anchor?.style.removeProperty("anchor-name");
2904
+ const activator = resolveElement(unref(props.activatorEl));
2905
+ setA11yAttributes(activator, null);
2906
+ });
2907
+ return (_ctx, _cache) => {
2908
+ return openBlock(), createElementBlock("div", {
2909
+ id: unref(popoverId),
2910
+ ref_key: "popoverEl",
2911
+ ref: popoverEl,
2912
+ class: normalizeClass(["kds-popover", ["floating", props.placement, { "full-width": props.fullWidth }]]),
2913
+ popover: unref(props.activatorEl) ? "auto" : void 0,
2914
+ style: normalizeStyle({ "position-anchor": anchorName }),
2915
+ role: props.role,
2916
+ onToggle: _cache[0] || (_cache[0] = ($event) => open.value = $event.newState === "open")
2917
+ }, [
2918
+ open.value ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
2919
+ props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$3, toDisplayString(props.content), 1)) : createCommentVNode("", true)
2920
+ ], true) : createCommentVNode("", true)
2921
+ ], 46, _hoisted_1$9);
2922
+ };
2923
+ }
2924
+ });
2925
+
2926
+ const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-1e24f98e"]]);
2927
+
2928
+ const _hoisted_1$8 = { class: "kds-info-popover-content" };
2929
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2930
+ __name: "InfoPopover",
2931
+ props: {
2932
+ content: {}
2933
+ },
2934
+ setup(__props) {
2935
+ const props = __props;
2936
+ return (_ctx, _cache) => {
2937
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
2938
+ renderSlot(_ctx.$slots, "default", {}, () => [
2939
+ createTextVNode(toDisplayString(props.content), 1)
2940
+ ], true)
2941
+ ]);
2942
+ };
2943
+ }
2944
+ });
2945
+
2946
+ const InfoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-64f7db25"]]);
2947
+
2948
+ const _hoisted_1$7 = ["aria-pressed"];
2949
+ const TITLE = "Click for more information";
2950
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2951
+ __name: "KdsInfoToggleButton",
2952
+ props: /* @__PURE__ */ mergeModels({
2953
+ content: {},
2954
+ hidden: { type: Boolean, default: false }
2955
+ }, {
2956
+ "modelValue": { type: Boolean, ...{ default: false } },
2957
+ "modelModifiers": {}
2958
+ }),
2959
+ emits: ["update:modelValue"],
2960
+ setup(__props) {
2961
+ const props = __props;
2962
+ const modelValue = useModel(__props, "modelValue");
2963
+ const buttonEl = useTemplateRef("buttonEl");
2964
+ const isHovered = ref(false);
2965
+ const isFocused = ref(false);
2966
+ return (_ctx, _cache) => {
2967
+ return openBlock(), createElementBlock(Fragment, null, [
2968
+ createElementVNode("button", mergeProps({
2969
+ ref_key: "buttonEl",
2970
+ ref: buttonEl
2971
+ }, _ctx.$attrs, {
2972
+ class: {
2973
+ "info-toggle-button": true,
2974
+ selected: modelValue.value,
2975
+ hidden: props.hidden && !modelValue.value && !isHovered.value && !isFocused.value
2976
+ },
2977
+ title: TITLE,
2978
+ "aria-label": TITLE,
2979
+ "aria-pressed": modelValue.value,
2980
+ type: "button",
2981
+ onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value),
2982
+ onMouseenter: _cache[1] || (_cache[1] = ($event) => isHovered.value = true),
2983
+ onMouseleave: _cache[2] || (_cache[2] = ($event) => isHovered.value = false),
2984
+ onFocus: _cache[3] || (_cache[3] = ($event) => isFocused.value = true),
2985
+ onBlur: _cache[4] || (_cache[4] = ($event) => isFocused.value = false)
2986
+ }), [
2987
+ createVNode(KdsIcon, {
2988
+ name: "circle-question",
2989
+ size: "small"
2990
+ })
2991
+ ], 16, _hoisted_1$7),
2992
+ createVNode(KdsPopover, {
2993
+ modelValue: modelValue.value,
2994
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
2995
+ "activator-el": buttonEl.value,
2996
+ placement: "top-right"
2997
+ }, {
2998
+ default: withCtx(() => [
2999
+ createVNode(InfoPopover, {
3000
+ content: props.content
3001
+ }, {
3002
+ default: withCtx(() => [
3003
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
3004
+ ]),
3005
+ _: 3
3006
+ }, 8, ["content"])
3007
+ ]),
3008
+ _: 3
3009
+ }, 8, ["modelValue", "activator-el"])
3010
+ ], 64);
3011
+ };
3012
+ }
3013
+ });
3014
+
3015
+ const KdsInfoToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-5070a398"]]);
3016
+
3017
+ const KdsInfoToggleButton$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
3018
+ __proto__: null,
3019
+ default: KdsInfoToggleButton
3020
+ }, Symbol.toStringTag, { value: 'Module' }));
3021
+
3022
+ const _hoisted_1$6 = { class: "kds-variable-popover" };
3023
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3024
+ __name: "VariablePopover",
3025
+ props: {
3026
+ content: {}
3027
+ },
3028
+ setup(__props) {
3029
+ const props = __props;
3030
+ return (_ctx, _cache) => {
3031
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
3032
+ renderSlot(_ctx.$slots, "default", {}, () => [
3033
+ createTextVNode(toDisplayString(props.content), 1)
3034
+ ], true)
3035
+ ]);
3036
+ };
3037
+ }
3038
+ });
3039
+
3040
+ const VariablePopover = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-54c206b9"]]);
3041
+
3042
+ const _hoisted_1$5 = ["title", "aria-label", "aria-pressed"];
3043
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3044
+ __name: "KdsVariableToggleButton",
3045
+ props: /* @__PURE__ */ mergeModels({
3046
+ content: {},
3047
+ hidden: { type: Boolean, default: false },
3048
+ inSet: { type: Boolean, default: false },
3049
+ outSet: { type: Boolean, default: false },
3050
+ error: { type: Boolean, default: false }
3051
+ }, {
3052
+ "modelValue": { type: Boolean, ...{ default: false } },
3053
+ "modelModifiers": {}
3054
+ }),
3055
+ emits: ["update:modelValue"],
3056
+ setup(__props) {
3057
+ const props = __props;
3058
+ const modelValue = useModel(__props, "modelValue");
3059
+ const buttonEl = useTemplateRef("buttonEl");
3060
+ const isHovered = ref(false);
3061
+ const isFocused = ref(false);
3062
+ const iconState = computed(() => {
3063
+ if (props.inSet && props.outSet) {
3064
+ return "in-out";
3065
+ }
3066
+ if (props.inSet) {
3067
+ return "in";
3068
+ }
3069
+ if (props.outSet) {
3070
+ return "out";
3071
+ }
3072
+ return "none";
3073
+ });
3074
+ const iconName = computed(() => {
3075
+ switch (iconState.value) {
3076
+ case "in":
3077
+ return "flow-variable-in";
3078
+ case "out":
3079
+ return "flow-variable-out";
3080
+ case "in-out":
3081
+ return "flow-variable-in-out";
3082
+ case "none":
3083
+ default:
3084
+ return "flow-variable-default";
3085
+ }
3086
+ });
3087
+ const baseTitleByState = {
3088
+ in: "Input Flow Variable",
3089
+ out: "Output Flow Variable",
3090
+ "in-out": "Input and Output Flow Variable",
3091
+ none: "No Flow Variable set"
3092
+ };
3093
+ const errorTitleByState = {
3094
+ in: "Error in input Flow Variable",
3095
+ out: "Error in output Flow Variable",
3096
+ "in-out": "Error in Flow Variables"
3097
+ };
3098
+ const title = computed(() => {
3099
+ const baseTitle = baseTitleByState[iconState.value];
3100
+ if (!props.error) {
3101
+ return baseTitle;
3102
+ }
3103
+ return errorTitleByState[iconState.value] ?? baseTitle;
3104
+ });
3105
+ return (_ctx, _cache) => {
3106
+ return openBlock(), createElementBlock(Fragment, null, [
3107
+ createElementVNode("button", mergeProps({
3108
+ ref_key: "buttonEl",
3109
+ ref: buttonEl
3110
+ }, _ctx.$attrs, {
3111
+ class: {
3112
+ "variable-toggle-button": true,
3113
+ error: props.error,
3114
+ "pressed-or-set": modelValue.value || props.inSet || props.outSet,
3115
+ hidden: props.hidden && !modelValue.value && !isHovered.value && !isFocused.value
3116
+ },
3117
+ title: title.value,
3118
+ "aria-label": title.value,
3119
+ "aria-pressed": modelValue.value,
3120
+ type: "button",
3121
+ onClick: _cache[0] || (_cache[0] = ($event) => modelValue.value = !modelValue.value),
3122
+ onMouseenter: _cache[1] || (_cache[1] = ($event) => isHovered.value = true),
3123
+ onMouseleave: _cache[2] || (_cache[2] = ($event) => isHovered.value = false),
3124
+ onFocus: _cache[3] || (_cache[3] = ($event) => isFocused.value = true),
3125
+ onBlur: _cache[4] || (_cache[4] = ($event) => isFocused.value = false)
3126
+ }), [
3127
+ createVNode(KdsIcon, {
3128
+ name: iconName.value,
3129
+ size: "small"
3130
+ }, null, 8, ["name"])
3131
+ ], 16, _hoisted_1$5),
3132
+ createVNode(KdsPopover, {
3133
+ modelValue: modelValue.value,
3134
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
3135
+ "activator-el": buttonEl.value,
3136
+ placement: "bottom-right"
3137
+ }, {
3138
+ default: withCtx(() => [
3139
+ createVNode(VariablePopover, {
3140
+ content: props.content
3141
+ }, {
3142
+ default: withCtx(() => [
3143
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
3144
+ ]),
3145
+ _: 3
3146
+ }, 8, ["content"])
3147
+ ]),
3148
+ _: 3
3149
+ }, 8, ["modelValue", "activator-el"])
3150
+ ], 64);
3151
+ };
3152
+ }
3153
+ });
3154
+
3155
+ const KdsVariableToggleButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-64296d74"]]);
2906
3156
 
2907
3157
  const kdsModalClosedBy = {
2908
3158
  ANY: "any",
@@ -2942,14 +3192,14 @@ const kdsModalPropsDefault = {
2942
3192
  ...kdsModalLayoutPropsDefault
2943
3193
  };
2944
3194
 
2945
- const _hoisted_1$5 = { class: "modal-header" };
3195
+ const _hoisted_1$4 = { class: "modal-header" };
2946
3196
  const _hoisted_2$2 = { class: "modal-header-title" };
2947
3197
  const _hoisted_3$2 = ["data-variant"];
2948
3198
  const _hoisted_4$1 = {
2949
3199
  key: 0,
2950
3200
  class: "modal-footer"
2951
3201
  };
2952
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3202
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2953
3203
  ...{ inheritAttrs: false },
2954
3204
  __name: "KdsModalLayout",
2955
3205
  props: /* @__PURE__ */ mergeDefaults({
@@ -2966,14 +3216,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2966
3216
  const props = __props;
2967
3217
  return (_ctx, _cache) => {
2968
3218
  return openBlock(), createElementBlock(Fragment, null, [
2969
- createElementVNode("header", _hoisted_1$5, [
3219
+ createElementVNode("header", _hoisted_1$4, [
2970
3220
  props.icon ? (openBlock(), createBlock(KdsIcon, {
2971
3221
  key: 0,
2972
3222
  name: props.icon,
2973
3223
  size: "medium"
2974
3224
  }, null, 8, ["name"])) : createCommentVNode("", true),
2975
3225
  createElementVNode("div", _hoisted_2$2, toDisplayString(props.title), 1),
2976
- createVNode(_sfc_main$r, {
3226
+ createVNode(_sfc_main$t, {
2977
3227
  "leading-icon": "x-close",
2978
3228
  variant: "transparent",
2979
3229
  size: "medium",
@@ -2995,10 +3245,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2995
3245
  }
2996
3246
  });
2997
3247
 
2998
- const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-7dbd159b"]]);
3248
+ const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-7dbd159b"]]);
2999
3249
 
3000
- const _hoisted_1$4 = ["closedby"];
3001
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3250
+ const _hoisted_1$3 = ["closedby"];
3251
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3002
3252
  __name: "KdsModal",
3003
3253
  props: /* @__PURE__ */ mergeDefaults({
3004
3254
  icon: {},
@@ -3090,12 +3340,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3090
3340
  _: 3
3091
3341
  }, 8, ["title", "icon", "variant", "overflow"])
3092
3342
  ], true)
3093
- ], 42, _hoisted_1$4)) : createCommentVNode("", true);
3343
+ ], 42, _hoisted_1$3)) : createCommentVNode("", true);
3094
3344
  };
3095
3345
  }
3096
3346
  });
3097
3347
 
3098
- const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-c95b809a"]]);
3348
+ const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-c95b809a"]]);
3099
3349
 
3100
3350
  const createUnwrappedPromise = () => {
3101
3351
  let resolve = () => {
@@ -3188,7 +3438,7 @@ const useKdsDynamicModal = () => {
3188
3438
  };
3189
3439
  };
3190
3440
 
3191
- const _hoisted_1$3 = {
3441
+ const _hoisted_1$2 = {
3192
3442
  key: 1,
3193
3443
  class: "confirmation"
3194
3444
  };
@@ -3197,7 +3447,7 @@ const _hoisted_3$1 = {
3197
3447
  key: 0,
3198
3448
  class: "ask-again"
3199
3449
  };
3200
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3450
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3201
3451
  __name: "KdsDynamicModalProvider",
3202
3452
  setup(__props) {
3203
3453
  const askAgain = ref(false);
@@ -3250,10 +3500,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3250
3500
  unref(config)?.type === "confirm" ? {
3251
3501
  name: "body",
3252
3502
  fn: withCtx(() => [
3253
- unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$3, [
3503
+ unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$2, [
3254
3504
  createElementVNode("div", _hoisted_2$1, toDisplayString(unref(config).value.message), 1),
3255
3505
  unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
3256
- createVNode(_sfc_main$i, {
3506
+ createVNode(_sfc_main$m, {
3257
3507
  modelValue: askAgain.value,
3258
3508
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
3259
3509
  label: unref(config).value.doNotAskAgain.label,
@@ -3268,7 +3518,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3268
3518
  name: "footer",
3269
3519
  fn: withCtx(() => [
3270
3520
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
3271
- return openBlock(), createBlock(_sfc_main$r, {
3521
+ return openBlock(), createBlock(_sfc_main$t, {
3272
3522
  key: index,
3273
3523
  destructive: button.destructive,
3274
3524
  autofocus: button.autofocus,
@@ -3298,96 +3548,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3298
3548
  }
3299
3549
  });
3300
3550
 
3301
- const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-67e036b5"]]);
3302
-
3303
- const _hoisted_1$2 = ["id", "popover"];
3304
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3305
- __name: "KdsPopover",
3306
- props: /* @__PURE__ */ mergeModels({
3307
- activatorEl: {},
3308
- anchorEl: {},
3309
- placement: { default: "bottom-right" }
3310
- }, {
3311
- "modelValue": { type: Boolean, ...{ default: false } },
3312
- "modelModifiers": {}
3313
- }),
3314
- emits: ["update:modelValue"],
3315
- setup(__props) {
3316
- const props = __props;
3317
- const open = useModel(__props, "modelValue");
3318
- const popoverEl = useTemplateRef("popoverEl");
3319
- const popoverId = useId();
3320
- const anchorName = `--anchor-${popoverId}`;
3321
- const resolveElement = (el) => {
3322
- if (!el) {
3323
- return null;
3324
- }
3325
- const maybeInstance = el;
3326
- const candidate = maybeInstance.$el ?? el;
3327
- return candidate instanceof HTMLElement ? candidate : null;
3328
- };
3329
- const setA11yAttributes = (el, options) => {
3330
- if (!el) {
3331
- return;
3332
- }
3333
- if (options === null) {
3334
- el.removeAttribute("aria-expanded");
3335
- el.removeAttribute("aria-controls");
3336
- el.removeAttribute("aria-haspopup");
3337
- return;
3338
- }
3339
- el.setAttribute("aria-expanded", String(options.expanded));
3340
- el.setAttribute("aria-controls", options.popoverId);
3341
- el.setAttribute("aria-haspopup", "dialog");
3342
- };
3343
- watch(open, (isOpen) => {
3344
- if (isOpen) {
3345
- popoverEl.value?.showPopover?.();
3346
- } else {
3347
- popoverEl.value?.hidePopover?.();
3348
- }
3349
- const activatorElement = resolveElement(unref(props.activatorEl));
3350
- activatorElement?.setAttribute("aria-expanded", String(isOpen));
3351
- });
3352
- watch(
3353
- () => [unref(props.anchorEl), unref(props.activatorEl)],
3354
- ([nextAnchorEl, nextActivatorEl], prev) => {
3355
- const [prevAnchorEl, prevActivatorEl] = prev ?? [null, null];
3356
- const prevAnchor = resolveElement(prevAnchorEl ?? null) ?? resolveElement(prevActivatorEl);
3357
- prevAnchor?.style.removeProperty("anchor-name");
3358
- const prevActivator = resolveElement(prevActivatorEl);
3359
- setA11yAttributes(prevActivator, null);
3360
- const nextAnchor = resolveElement(nextAnchorEl ?? null) ?? resolveElement(nextActivatorEl);
3361
- nextAnchor?.style.setProperty("anchor-name", anchorName);
3362
- const nextActivator = resolveElement(nextActivatorEl);
3363
- setA11yAttributes(nextActivator, { expanded: open.value, popoverId });
3364
- },
3365
- { immediate: true }
3366
- );
3367
- onBeforeUnmount(() => {
3368
- const anchor = resolveElement(unref(props.anchorEl) ?? null) ?? resolveElement(unref(props.activatorEl));
3369
- anchor?.style.removeProperty("anchor-name");
3370
- const activator = resolveElement(unref(props.activatorEl));
3371
- setA11yAttributes(activator, null);
3372
- });
3373
- return (_ctx, _cache) => {
3374
- return openBlock(), createElementBlock("div", {
3375
- id: unref(popoverId),
3376
- ref_key: "popoverEl",
3377
- ref: popoverEl,
3378
- class: normalizeClass(["kds-popover", ["floating", props.placement]]),
3379
- popover: unref(props.activatorEl) ? "auto" : void 0,
3380
- style: normalizeStyle({ "position-anchor": anchorName }),
3381
- role: "dialog",
3382
- onToggle: _cache[0] || (_cache[0] = ($event) => open.value = $event.newState === "open")
3383
- }, [
3384
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
3385
- ], 46, _hoisted_1$2);
3386
- };
3387
- }
3388
- });
3389
-
3390
- const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6bc7ef3b"]]);
3551
+ const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-67e036b5"]]);
3391
3552
 
3392
3553
  const kdsPopoverPlacement = {
3393
3554
  TOP_LEFT: "top-left",
@@ -3396,6 +3557,12 @@ const kdsPopoverPlacement = {
3396
3557
  BOTTOM_RIGHT: "bottom-right"
3397
3558
  };
3398
3559
  const kdsPopoverPlacements = Object.values(kdsPopoverPlacement);
3560
+ const kdsPopoverRole = {
3561
+ DIALOG: "dialog",
3562
+ MENU: "menu",
3563
+ LISTBOX: "listbox"
3564
+ };
3565
+ const kdsPopoverRoles = Object.values(kdsPopoverRole);
3399
3566
 
3400
3567
  const _hoisted_1$1 = ["aria-label", "aria-labelledby", "aria-disabled", "aria-pressed", "tabindex", "onKeydown"];
3401
3568
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -3494,9 +3661,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3494
3661
  });
3495
3662
  const buttonType = computed(() => {
3496
3663
  if (isDefinedAndNotEmpty(props, "buttonTo")) {
3497
- return _sfc_main$q;
3664
+ return _sfc_main$s;
3498
3665
  }
3499
- return _sfc_main$r;
3666
+ return _sfc_main$t;
3500
3667
  });
3501
3668
  const mapProps = (mappings) => {
3502
3669
  return Object.fromEntries(
@@ -3518,7 +3685,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3518
3685
  ["destructive", "buttonDestructive"],
3519
3686
  ["title", "buttonTitle"]
3520
3687
  ]);
3521
- if (buttonType.value !== _sfc_main$q) {
3688
+ if (buttonType.value !== _sfc_main$s) {
3522
3689
  return baseProps;
3523
3690
  }
3524
3691
  return {
@@ -3547,5 +3714,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3547
3714
 
3548
3715
  const KdsEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-059bb01e"]]);
3549
3716
 
3550
- export { KdsAvatar, _sfc_main$r as KdsButton, KdsCard, _sfc_main$i as KdsCheckbox, KdsCheckboxGroup, KdsColorSwatch, KdsDataType, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLabel, _sfc_main$q as KdsLinkButton, KdsLiveStatus, KdsLoadingSpinner, KdsModal, KdsModalLayout, _sfc_main$a as KdsNumberInput, _sfc_main$9 as KdsPatternInput, KdsPopover, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, _sfc_main$8 as KdsSearchInput, KdsSubText, _sfc_main$7 as KdsTextInput, KdsTextarea, _sfc_main$p as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchType, kdsColorSwatchTypes, kdsDarkModeType, kdsDarkModeTypes, kdsDataTypeSize, kdsDataTypeSizes, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsPopoverPlacement, kdsPopoverPlacements, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
3717
+ export { KdsAvatar, _sfc_main$t as KdsButton, KdsCard, _sfc_main$m as KdsCheckbox, KdsCheckboxGroup, KdsColorSwatch, KdsDataType, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLabel, _sfc_main$s as KdsLinkButton, KdsLiveStatus, KdsLoadingSpinner, KdsModal, KdsModalLayout, _sfc_main$e as KdsNumberInput, _sfc_main$d as KdsPatternInput, KdsPopover, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, _sfc_main$c as KdsSearchInput, KdsSubText, _sfc_main$b as KdsTextInput, KdsTextarea, _sfc_main$r as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchType, kdsColorSwatchTypes, kdsDarkModeType, kdsDarkModeTypes, kdsDataTypeSize, kdsDataTypeSizes, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsPopoverPlacement, kdsPopoverPlacements, kdsPopoverRole, kdsPopoverRoles, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
3551
3718
  //# sourceMappingURL=index.js.map