@knime/kds-components 0.13.2 → 0.14.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 (42) hide show
  1. package/dist/forms/_helper/InfoPopover/KdsInfoToggleButton.vue.d.ts.map +1 -1
  2. package/dist/forms/_helper/List/KdsListItem/KdsListItem.vue.d.ts +5 -2
  3. package/dist/forms/_helper/List/KdsListItem/KdsListItem.vue.d.ts.map +1 -1
  4. package/dist/forms/_helper/List/KdsListItem/enums.d.ts +6 -0
  5. package/dist/forms/_helper/List/KdsListItem/enums.d.ts.map +1 -0
  6. package/dist/forms/_helper/List/KdsListItem/types.d.ts +11 -2
  7. package/dist/forms/_helper/List/KdsListItem/types.d.ts.map +1 -1
  8. package/dist/forms/_helper/List/ListContainer/KdsListContainer.vue.d.ts +17 -0
  9. package/dist/forms/_helper/List/ListContainer/KdsListContainer.vue.d.ts.map +1 -0
  10. package/dist/forms/_helper/List/ListContainer/index.d.ts +3 -0
  11. package/dist/forms/_helper/List/ListContainer/index.d.ts.map +1 -0
  12. package/dist/forms/_helper/List/ListContainer/types.d.ts +39 -0
  13. package/dist/forms/_helper/List/ListContainer/types.d.ts.map +1 -0
  14. package/dist/forms/_helper/List/ListItemAccessory/ListItemAccessory.vue.d.ts +2 -2
  15. package/dist/forms/_helper/List/ListItemAccessory/ListItemAccessory.vue.d.ts.map +1 -1
  16. package/dist/forms/_helper/List/ListItemAccessory/enums.d.ts +7 -0
  17. package/dist/forms/_helper/List/ListItemAccessory/enums.d.ts.map +1 -0
  18. package/dist/forms/_helper/List/ListItemAccessory/types.d.ts +2 -0
  19. package/dist/forms/_helper/List/ListItemAccessory/types.d.ts.map +1 -1
  20. package/dist/forms/_helper/VariablePopover/KdsVariableToggleButton.vue.d.ts.map +1 -1
  21. package/dist/forms/inputs/BaseInput.vue.d.ts +7 -0
  22. package/dist/forms/inputs/BaseInput.vue.d.ts.map +1 -1
  23. package/dist/forms/inputs/ColorInput/ColorPicker.vue.d.ts +13 -0
  24. package/dist/forms/inputs/ColorInput/ColorPicker.vue.d.ts.map +1 -0
  25. package/dist/forms/inputs/ColorInput/KdsColorInput.vue.d.ts +98 -0
  26. package/dist/forms/inputs/ColorInput/KdsColorInput.vue.d.ts.map +1 -0
  27. package/dist/forms/inputs/ColorInput/colorUtils.d.ts +21 -0
  28. package/dist/forms/inputs/ColorInput/colorUtils.d.ts.map +1 -0
  29. package/dist/forms/inputs/ColorInput/index.d.ts +2 -0
  30. package/dist/forms/inputs/ColorInput/index.d.ts.map +1 -0
  31. package/dist/forms/inputs/ColorInput/useColorInputValidationOnFocusOut.d.ts +5 -0
  32. package/dist/forms/inputs/ColorInput/useColorInputValidationOnFocusOut.d.ts.map +1 -0
  33. package/dist/forms/inputs/ColorInput/usePointerHandler.d.ts +7 -0
  34. package/dist/forms/inputs/ColorInput/usePointerHandler.d.ts.map +1 -0
  35. package/dist/forms/inputs/index.d.ts +1 -0
  36. package/dist/forms/inputs/index.d.ts.map +1 -1
  37. package/dist/forms/inputs/types.d.ts +1 -0
  38. package/dist/forms/inputs/types.d.ts.map +1 -1
  39. package/dist/index.css +191 -120
  40. package/dist/index.js +796 -236
  41. package/dist/index.js.map +1 -1
  42. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels, createVNode, defineAsyncComponent, useId, Fragment, renderList, onBeforeUpdate, nextTick, withModifiers, normalizeProps, guardReactiveProps, withDirectives, vModelText, watchEffect, createTextVNode, useCssVars, mergeDefaults, createSlots } from 'vue';
1
+ import { defineComponent, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, shallowRef, toRef, unref, createBlock, resolveDynamicComponent, createCommentVNode, normalizeStyle, useTemplateRef, withCtx, renderSlot, mergeProps, h, useSlots, getCurrentInstance, useModel, mergeModels, createVNode, defineAsyncComponent, useId, Fragment, renderList, onBeforeUpdate, nextTick, watchEffect, withModifiers, normalizeProps, guardReactiveProps, withDirectives, vModelText, createTextVNode, useCssVars, mergeDefaults, createSlots } from 'vue';
2
2
  import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useMutationObserver, useElementSize } from '@vueuse/core';
3
3
 
4
4
  import './index.css';const kdsAvatarSize = {
@@ -9,14 +9,14 @@ import './index.css';const kdsAvatarSize = {
9
9
  };
10
10
  const kdsAvatarSizes = Object.values(kdsAvatarSize);
11
11
 
12
- const _hoisted_1$r = ["role", "title", "aria-hidden", "aria-label"];
13
- const _hoisted_2$b = ["src"];
14
- const _hoisted_3$6 = {
12
+ const _hoisted_1$s = ["role", "title", "aria-hidden", "aria-label"];
13
+ const _hoisted_2$c = ["src"];
14
+ const _hoisted_3$7 = {
15
15
  key: 1,
16
16
  class: "kds-avatar-initials",
17
17
  "aria-hidden": "true"
18
18
  };
19
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
19
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
20
20
  __name: "KdsAvatar",
21
21
  props: {
22
22
  initials: {},
@@ -59,10 +59,10 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
59
59
  alt: "",
60
60
  "aria-hidden": "true",
61
61
  onError: onImageError
62
- }, null, 40, _hoisted_2$b)) : (openBlock(), createElementBlock("div", _hoisted_3$6, [
62
+ }, null, 40, _hoisted_2$c)) : (openBlock(), createElementBlock("div", _hoisted_3$7, [
63
63
  createElementVNode("span", null, toDisplayString(displayedInitials.value), 1)
64
64
  ]))
65
- ], 10, _hoisted_1$r);
65
+ ], 10, _hoisted_1$s);
66
66
  };
67
67
  }
68
68
  });
@@ -75,7 +75,7 @@ const _export_sfc = (sfc, props) => {
75
75
  return target;
76
76
  };
77
77
 
78
- const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-d6a313f1"]]);
78
+ const KdsAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-d6a313f1"]]);
79
79
 
80
80
  const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
81
81
  const v = glob$1[path$13];
@@ -111,7 +111,7 @@ const useIcon = ({
111
111
  return iconComponent;
112
112
  };
113
113
 
114
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
114
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
115
115
  __name: "KdsIcon",
116
116
  props: {
117
117
  name: {},
@@ -136,7 +136,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
136
136
  }
137
137
  });
138
138
 
139
- const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-3a57d423"]]);
139
+ const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-3a57d423"]]);
140
140
 
141
141
  const ID_TO_ICON_MAP = {
142
142
  // Flow Variables
@@ -462,8 +462,8 @@ const kdsDataTypeSize = {
462
462
  };
463
463
  const kdsDataTypeSizes = Object.values(kdsDataTypeSize);
464
464
 
465
- const _hoisted_1$q = ["title"];
466
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
465
+ const _hoisted_1$r = ["title"];
466
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
467
467
  __name: "KdsDataType",
468
468
  props: {
469
469
  iconName: { default: "unknown-datatype" },
@@ -503,12 +503,12 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
503
503
  "aria-hidden": "true",
504
504
  focusable: "false"
505
505
  }, null, 8, ["class"]))
506
- ], 10, _hoisted_1$q);
506
+ ], 10, _hoisted_1$r);
507
507
  };
508
508
  }
509
509
  });
510
510
 
511
- const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-d7166d18"]]);
511
+ const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-d7166d18"]]);
512
512
 
513
513
  const kdsBadgeVariant = {
514
514
  NEUTRAL: "neutral",
@@ -525,8 +525,8 @@ const kdsBadgeSize = {
525
525
  };
526
526
  const kdsBadgeSizes = Object.values(kdsBadgeSize);
527
527
 
528
- const _hoisted_1$p = { class: "label-wrapper" };
529
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
528
+ const _hoisted_1$q = { class: "label-wrapper" };
529
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
530
530
  __name: "KdsBadge",
531
531
  props: {
532
532
  label: {},
@@ -548,13 +548,13 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
548
548
  name: __props.icon,
549
549
  size: sizeToIconSize[__props.size]
550
550
  }, null, 8, ["name", "size"])) : createCommentVNode("", true),
551
- createElementVNode("span", _hoisted_1$p, toDisplayString(__props.label), 1)
551
+ createElementVNode("span", _hoisted_1$q, toDisplayString(__props.label), 1)
552
552
  ], 2);
553
553
  };
554
554
  }
555
555
  });
556
556
 
557
- const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-5c6c74a8"]]);
557
+ const KdsBadge = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-5c6c74a8"]]);
558
558
 
559
559
  const kdsColorSwatchType = {
560
560
  LEARNER: "learner",
@@ -573,8 +573,8 @@ const kdsColorSwatchSize = {
573
573
  };
574
574
  const kdsColorSwatchSizes = Object.values(kdsColorSwatchSize);
575
575
 
576
- const _hoisted_1$o = ["role", "title", "aria-hidden", "aria-label"];
577
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
576
+ const _hoisted_1$p = ["role", "title", "aria-hidden", "aria-label"];
577
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
578
578
  __name: "KdsColorSwatch",
579
579
  props: {
580
580
  color: {},
@@ -609,12 +609,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
609
609
  style: normalizeStyle({ backgroundColor: backgroundColor.value }),
610
610
  "aria-hidden": hasTitle.value ? void 0 : "true",
611
611
  "aria-label": hasTitle.value ? accessibleTitle.value : void 0
612
- }, null, 14, _hoisted_1$o);
612
+ }, null, 14, _hoisted_1$p);
613
613
  };
614
614
  }
615
615
  });
616
616
 
617
- const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-bdb3dd24"]]);
617
+ const KdsColorSwatch = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-bdb3dd24"]]);
618
618
 
619
619
  const kdsDarkModeType = {
620
620
  LIGHT: "light",
@@ -734,9 +734,9 @@ function useKdsIsTruncated(elementRef) {
734
734
  return { isTruncated };
735
735
  }
736
736
 
737
- const _hoisted_1$n = ["title", "aria-label"];
738
- const _hoisted_2$a = ["title"];
739
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
737
+ const _hoisted_1$o = ["title", "aria-label"];
738
+ const _hoisted_2$b = ["title"];
739
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
740
740
  __name: "KdsLiveStatus",
741
741
  props: {
742
742
  status: { default: "red" },
@@ -765,13 +765,13 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
765
765
  ref: labelEl,
766
766
  class: "label",
767
767
  title: unref(isTruncated) ? props.label : void 0
768
- }, toDisplayString(props.label), 9, _hoisted_2$a)) : createCommentVNode("", true)
769
- ], 10, _hoisted_1$n);
768
+ }, toDisplayString(props.label), 9, _hoisted_2$b)) : createCommentVNode("", true)
769
+ ], 10, _hoisted_1$o);
770
770
  };
771
771
  }
772
772
  });
773
773
 
774
- const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-4dec8e94"]]);
774
+ const KdsLiveStatus = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-4dec8e94"]]);
775
775
 
776
776
  const kdsLiveStatusStatus = {
777
777
  RED: "red",
@@ -787,8 +787,8 @@ const kdsLiveStatusSize = {
787
787
  };
788
788
  const kdsLiveStatusSizes = Object.values(kdsLiveStatusSize);
789
789
 
790
- const _hoisted_1$m = ["data-style"];
791
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
790
+ const _hoisted_1$n = ["data-style"];
791
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
792
792
  __name: "KdsLoadingSpinner",
793
793
  props: {
794
794
  size: { default: "medium" },
@@ -813,12 +813,12 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
813
813
  cy: "60",
814
814
  r: "50"
815
815
  }, null, -1)
816
- ])], 10, _hoisted_1$m);
816
+ ])], 10, _hoisted_1$n);
817
817
  };
818
818
  }
819
819
  });
820
820
 
821
- const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-74bb7c3d"]]);
821
+ const KdsLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-74bb7c3d"]]);
822
822
 
823
823
  const kdsLoadingSpinnerVariant = {
824
824
  ON_PRIMARY: "onPrimary",
@@ -828,11 +828,11 @@ const kdsLoadingSpinnerVariants = Object.values(
828
828
  kdsLoadingSpinnerVariant
829
829
  );
830
830
 
831
- const _hoisted_1$l = {
831
+ const _hoisted_1$m = {
832
832
  key: 0,
833
833
  class: "label"
834
834
  };
835
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
835
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
836
836
  __name: "BaseButton",
837
837
  props: {
838
838
  size: { default: "medium" },
@@ -891,7 +891,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
891
891
  size: iconSize.value
892
892
  }, null, 8, ["name", "size"])) : createCommentVNode("", true)
893
893
  ], true),
894
- props.label ? (openBlock(), createElementBlock("span", _hoisted_1$l, toDisplayString(props.label), 1)) : createCommentVNode("", true),
894
+ props.label ? (openBlock(), createElementBlock("span", _hoisted_1$m, toDisplayString(props.label), 1)) : createCommentVNode("", true),
895
895
  props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
896
896
  key: 1,
897
897
  name: props.trailingIcon,
@@ -904,9 +904,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
904
904
  }
905
905
  });
906
906
 
907
- const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-b0f9559f"]]);
907
+ const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-b0f9559f"]]);
908
908
 
909
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
909
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
910
910
  __name: "KdsButton",
911
911
  props: {
912
912
  size: {},
@@ -959,7 +959,7 @@ const resolveNuxtLinkComponent = () => {
959
959
  return fallbackComponent;
960
960
  };
961
961
 
962
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
962
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
963
963
  __name: "KdsLinkButton",
964
964
  props: {
965
965
  size: {},
@@ -995,7 +995,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
995
995
  }
996
996
  });
997
997
 
998
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
998
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
999
999
  __name: "KdsToggleButton",
1000
1000
  props: /* @__PURE__ */ mergeModels({
1001
1001
  size: {},
@@ -1030,9 +1030,9 @@ const kdsToggleButtonVariant = {
1030
1030
  };
1031
1031
  const kdsToggleButtonVariants = Object.values(kdsToggleButtonVariant);
1032
1032
 
1033
- const _hoisted_1$k = ["data-visible"];
1034
- const _hoisted_2$9 = ["data-visible"];
1035
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
1033
+ const _hoisted_1$l = ["data-visible"];
1034
+ const _hoisted_2$a = ["data-visible"];
1035
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1036
1036
  __name: "KdsProgressButton",
1037
1037
  props: /* @__PURE__ */ mergeModels({
1038
1038
  size: { default: "medium" },
@@ -1095,7 +1095,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1095
1095
  name: props.leadingIcon,
1096
1096
  size: iconSize.value
1097
1097
  }, null, 8, ["name", "size"])
1098
- ], 8, _hoisted_1$k),
1098
+ ], 8, _hoisted_1$l),
1099
1099
  createElementVNode("span", {
1100
1100
  class: "spinner",
1101
1101
  "data-visible": state.value === "progress"
@@ -1104,7 +1104,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1104
1104
  size: iconSize.value,
1105
1105
  variant: props.variant === "filled" ? "onPrimary" : "onSurface"
1106
1106
  }, null, 8, ["size", "variant"])
1107
- ], 8, _hoisted_2$9)
1107
+ ], 8, _hoisted_2$a)
1108
1108
  ], 2)
1109
1109
  ]),
1110
1110
  _: 1
@@ -1113,7 +1113,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1113
1113
  }
1114
1114
  });
1115
1115
 
1116
- const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-ec08a9ba"]]);
1116
+ const KdsProgressButton = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-ec08a9ba"]]);
1117
1117
 
1118
1118
  const kdsProgressButtonState = {
1119
1119
  DEFAULT: "default",
@@ -1137,9 +1137,9 @@ const kdsButtonVariant = {
1137
1137
  };
1138
1138
  const kdsButtonVariants = Object.values(kdsButtonVariant);
1139
1139
 
1140
- const _hoisted_1$j = { class: "kds-label-wrapper" };
1141
- const _hoisted_2$8 = ["id", "for", "title"];
1142
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
1140
+ const _hoisted_1$k = { class: "kds-label-wrapper" };
1141
+ const _hoisted_2$9 = ["id", "for", "title"];
1142
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1143
1143
  __name: "KdsLabel",
1144
1144
  props: {
1145
1145
  label: {},
@@ -1156,7 +1156,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1156
1156
  const labelEl = useTemplateRef("labelEl");
1157
1157
  const { isTruncated } = useKdsIsTruncated(labelEl);
1158
1158
  return (_ctx, _cache) => {
1159
- return openBlock(), createElementBlock("div", _hoisted_1$j, [
1159
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
1160
1160
  createElementVNode("label", {
1161
1161
  id: props.id,
1162
1162
  ref_key: "labelEl",
@@ -1164,7 +1164,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1164
1164
  for: props.for,
1165
1165
  class: "label",
1166
1166
  title: unref(isTruncated) ? props.label : void 0
1167
- }, toDisplayString(props.label), 9, _hoisted_2$8),
1167
+ }, toDisplayString(props.label), 9, _hoisted_2$9),
1168
1168
  props.description ? (openBlock(), createBlock(unref(KdsInfoToggleButton), {
1169
1169
  key: 0,
1170
1170
  content: props.description,
@@ -1175,11 +1175,11 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1175
1175
  }
1176
1176
  });
1177
1177
 
1178
- const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-1a5dc1ba"]]);
1178
+ const KdsLabel = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-1a5dc1ba"]]);
1179
1179
 
1180
- const _hoisted_1$i = ["id"];
1181
- const _hoisted_2$7 = { class: "subtext-text" };
1182
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
1180
+ const _hoisted_1$j = ["id"];
1181
+ const _hoisted_2$8 = { class: "subtext-text" };
1182
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1183
1183
  __name: "KdsSubText",
1184
1184
  props: {
1185
1185
  id: {},
@@ -1210,27 +1210,27 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1210
1210
  variant: "onSurface",
1211
1211
  "aria-hidden": "true"
1212
1212
  })) : createCommentVNode("", true),
1213
- createElementVNode("span", _hoisted_2$7, toDisplayString(props.subText), 1)
1214
- ], 10, _hoisted_1$i)) : createCommentVNode("", true);
1213
+ createElementVNode("span", _hoisted_2$8, toDisplayString(props.subText), 1)
1214
+ ], 10, _hoisted_1$j)) : createCommentVNode("", true);
1215
1215
  };
1216
1216
  }
1217
1217
  });
1218
1218
 
1219
- const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-df9a85a4"]]);
1219
+ const KdsSubText = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-df9a85a4"]]);
1220
1220
 
1221
- const _hoisted_1$h = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
1222
- const _hoisted_2$6 = { class: "control" };
1223
- const _hoisted_3$5 = {
1221
+ const _hoisted_1$i = ["disabled", "title", "aria-label", "aria-checked", "aria-describedby", "aria-invalid"];
1222
+ const _hoisted_2$7 = { class: "control" };
1223
+ const _hoisted_3$6 = {
1224
1224
  key: 0,
1225
1225
  class: "content"
1226
1226
  };
1227
1227
  const _hoisted_4$4 = { class: "label" };
1228
1228
  const _hoisted_5$2 = ["id"];
1229
- const _hoisted_6$1 = {
1229
+ const _hoisted_6$2 = {
1230
1230
  key: 0,
1231
1231
  class: "subtext-wrapper"
1232
1232
  };
1233
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
1233
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1234
1234
  __name: "BaseCheckbox",
1235
1235
  props: /* @__PURE__ */ mergeModels({
1236
1236
  disabled: { type: Boolean, default: false },
@@ -1303,7 +1303,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1303
1303
  role: "checkbox",
1304
1304
  onClick: handleClick
1305
1305
  }, [
1306
- createElementVNode("div", _hoisted_2$6, [
1306
+ createElementVNode("div", _hoisted_2$7, [
1307
1307
  icon.value ? (openBlock(), createBlock(KdsIcon, {
1308
1308
  key: 0,
1309
1309
  name: icon.value,
@@ -1311,7 +1311,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1311
1311
  size: "xsmall"
1312
1312
  }, null, 8, ["name"])) : createCommentVNode("", true)
1313
1313
  ]),
1314
- props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
1314
+ props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
1315
1315
  createElementVNode("div", _hoisted_4$4, toDisplayString(props.label), 1),
1316
1316
  props.helperText ? (openBlock(), createElementBlock("div", {
1317
1317
  key: 0,
@@ -1319,8 +1319,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1319
1319
  class: "helper-text"
1320
1320
  }, toDisplayString(props.helperText), 9, _hoisted_5$2)) : createCommentVNode("", true)
1321
1321
  ])) : createCommentVNode("", true)
1322
- ], 10, _hoisted_1$h),
1323
- props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
1322
+ ], 10, _hoisted_1$i),
1323
+ props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
1324
1324
  createVNode(KdsSubText, {
1325
1325
  id: unref(descriptionId),
1326
1326
  "sub-text": props.subText,
@@ -1333,9 +1333,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1333
1333
  }
1334
1334
  });
1335
1335
 
1336
- const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-32f17780"]]);
1336
+ const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-32f17780"]]);
1337
1337
 
1338
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
1338
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1339
1339
  __name: "KdsCheckbox",
1340
1340
  props: /* @__PURE__ */ mergeModels({
1341
1341
  disabled: { type: Boolean, default: false },
@@ -1367,8 +1367,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1367
1367
  }
1368
1368
  });
1369
1369
 
1370
- const _hoisted_1$g = ["id", "aria-labelledby", "aria-describedby"];
1371
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
1370
+ const _hoisted_1$h = ["id", "aria-labelledby", "aria-describedby"];
1371
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1372
1372
  __name: "KdsCheckboxGroup",
1373
1373
  props: /* @__PURE__ */ mergeModels({
1374
1374
  id: {},
@@ -1452,12 +1452,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1452
1452
  "preserve-sub-text-space": props.preserveSubTextSpace,
1453
1453
  error: hasError.value
1454
1454
  }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1455
- ], 8, _hoisted_1$g);
1455
+ ], 8, _hoisted_1$h);
1456
1456
  };
1457
1457
  }
1458
1458
  });
1459
1459
 
1460
- const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-c38eeda5"]]);
1460
+ const KdsCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-c38eeda5"]]);
1461
1461
 
1462
1462
  const kdsCheckboxGroupAlignment = {
1463
1463
  VERTICAL: "vertical",
@@ -1473,9 +1473,9 @@ const kdsCheckboxValue = {
1473
1473
  };
1474
1474
  const kdsCheckboxValues = Object.values(kdsCheckboxValue);
1475
1475
 
1476
- const _hoisted_1$f = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
1477
- const _hoisted_2$5 = { class: "control" };
1478
- const _hoisted_3$4 = {
1476
+ const _hoisted_1$g = ["aria-checked", "aria-describedby", "aria-invalid", "disabled"];
1477
+ const _hoisted_2$6 = { class: "control" };
1478
+ const _hoisted_3$5 = {
1479
1479
  key: 0,
1480
1480
  class: "dot",
1481
1481
  viewBox: "0 0 2 2",
@@ -1484,8 +1484,8 @@ const _hoisted_3$4 = {
1484
1484
  };
1485
1485
  const _hoisted_4$3 = { class: "content" };
1486
1486
  const _hoisted_5$1 = { class: "label" };
1487
- const _hoisted_6 = ["id"];
1488
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
1487
+ const _hoisted_6$1 = ["id"];
1488
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1489
1489
  __name: "KdsRadioButton",
1490
1490
  props: /* @__PURE__ */ mergeModels({
1491
1491
  text: {},
@@ -1525,8 +1525,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1525
1525
  type: "button",
1526
1526
  onClick: handleClick
1527
1527
  }, [
1528
- createElementVNode("div", _hoisted_2$5, [
1529
- modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$4, [..._cache[0] || (_cache[0] = [
1528
+ createElementVNode("div", _hoisted_2$6, [
1529
+ modelValue.value ? (openBlock(), createElementBlock("svg", _hoisted_3$5, [..._cache[0] || (_cache[0] = [
1530
1530
  createElementVNode("circle", {
1531
1531
  cx: "1",
1532
1532
  cy: "1",
@@ -1540,14 +1540,14 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1540
1540
  key: 0,
1541
1541
  id: `${unref(id)}-helper`,
1542
1542
  class: "helper-text"
1543
- }, toDisplayString(props.helperText), 9, _hoisted_6)) : createCommentVNode("", true)
1543
+ }, toDisplayString(props.helperText), 9, _hoisted_6$1)) : createCommentVNode("", true)
1544
1544
  ])
1545
- ], 10, _hoisted_1$f);
1545
+ ], 10, _hoisted_1$g);
1546
1546
  };
1547
1547
  }
1548
1548
  });
1549
1549
 
1550
- const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-27c361e4"]]);
1550
+ const KdsRadioButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-27c361e4"]]);
1551
1551
 
1552
1552
  const useRadioSelection = ({
1553
1553
  selectedId,
@@ -1669,8 +1669,8 @@ const useRadioSelection = ({
1669
1669
  };
1670
1670
  };
1671
1671
 
1672
- const _hoisted_1$e = ["id", "aria-labelledby", "aria-describedby"];
1673
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1672
+ const _hoisted_1$f = ["id", "aria-labelledby", "aria-describedby"];
1673
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1674
1674
  __name: "KdsRadioButtonGroup",
1675
1675
  props: /* @__PURE__ */ mergeModels({
1676
1676
  id: {},
@@ -1749,15 +1749,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1749
1749
  "preserve-sub-text-space": props.preserveSubTextSpace,
1750
1750
  error: unref(hasError)
1751
1751
  }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1752
- ], 8, _hoisted_1$e);
1752
+ ], 8, _hoisted_1$f);
1753
1753
  };
1754
1754
  }
1755
1755
  });
1756
1756
 
1757
- const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-9cc4dcdd"]]);
1757
+ const KdsRadioButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-9cc4dcdd"]]);
1758
1758
 
1759
- const _hoisted_1$d = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
1760
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
1759
+ const _hoisted_1$e = ["aria-checked", "aria-label", "disabled", "tabindex", "title"];
1760
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1761
1761
  __name: "ValueSwitchItem",
1762
1762
  props: {
1763
1763
  selected: { type: Boolean },
@@ -1807,12 +1807,12 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1807
1807
  name: props.trailingIcon,
1808
1808
  size: props.size
1809
1809
  }, null, 8, ["name", "size"])) : createCommentVNode("", true)
1810
- ], 10, _hoisted_1$d);
1810
+ ], 10, _hoisted_1$e);
1811
1811
  };
1812
1812
  }
1813
1813
  });
1814
1814
 
1815
- const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-93f3f577"]]);
1815
+ const ValueSwitchItem = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-93f3f577"]]);
1816
1816
 
1817
1817
  const useValueSwitchIconHiding = ({
1818
1818
  width,
@@ -1863,8 +1863,8 @@ const useValueSwitchIconHiding = ({
1863
1863
  };
1864
1864
  };
1865
1865
 
1866
- const _hoisted_1$c = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
1867
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
1866
+ const _hoisted_1$d = ["id", "aria-invalid", "aria-labelledby", "aria-describedby"];
1867
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1868
1868
  __name: "KdsValueSwitch",
1869
1869
  props: /* @__PURE__ */ mergeModels({
1870
1870
  id: {},
@@ -1957,12 +1957,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1957
1957
  "preserve-sub-text-space": props.preserveSubTextSpace,
1958
1958
  error: props.error
1959
1959
  }, null, 8, ["id", "sub-text", "preserve-sub-text-space", "error"])
1960
- ], 10, _hoisted_1$c);
1960
+ ], 10, _hoisted_1$d);
1961
1961
  };
1962
1962
  }
1963
1963
  });
1964
1964
 
1965
- const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-666d4c10"]]);
1965
+ const KdsValueSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-666d4c10"]]);
1966
1966
 
1967
1967
  const kdsRadioButtonGroupAlignment = {
1968
1968
  VERTICAL: "vertical",
@@ -1982,7 +1982,62 @@ const kdsValueSwitchVariant = {
1982
1982
  };
1983
1983
  const kdsValueSwitchVariants = Object.values(kdsValueSwitchVariant);
1984
1984
 
1985
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
1985
+ const _hoisted_1$c = ["id", "role", "aria-label"];
1986
+ const _hoisted_2$5 = {
1987
+ key: 0,
1988
+ class: "kds-popover-default-content"
1989
+ };
1990
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1991
+ __name: "KdsPopover",
1992
+ props: /* @__PURE__ */ mergeModels({
1993
+ placement: { default: "bottom-left" },
1994
+ role: { default: "dialog" },
1995
+ fullWidth: { type: Boolean, default: false },
1996
+ popoverAriaLabel: {},
1997
+ content: {}
1998
+ }, {
1999
+ "modelValue": { type: Boolean, ...{ default: false } },
2000
+ "modelModifiers": {}
2001
+ }),
2002
+ emits: ["update:modelValue"],
2003
+ setup(__props, { expose: __expose }) {
2004
+ const props = __props;
2005
+ const open = useModel(__props, "modelValue");
2006
+ const popoverEl = useTemplateRef("popoverEl");
2007
+ const popoverId = useId();
2008
+ const anchorName = `--anchor-${popoverId}`;
2009
+ watchEffect(() => {
2010
+ if (open.value) {
2011
+ popoverEl.value?.showPopover?.();
2012
+ } else {
2013
+ popoverEl.value?.hidePopover?.();
2014
+ }
2015
+ });
2016
+ const anchorStyle = { "anchor-name": anchorName };
2017
+ __expose({ anchorStyle, popoverId });
2018
+ return (_ctx, _cache) => {
2019
+ return openBlock(), createElementBlock("div", {
2020
+ id: unref(popoverId),
2021
+ ref_key: "popoverEl",
2022
+ ref: popoverEl,
2023
+ class: normalizeClass(["kds-popover", ["floating", props.placement, { "full-width": props.fullWidth }]]),
2024
+ popover: "auto",
2025
+ style: normalizeStyle({ "position-anchor": anchorName }),
2026
+ role: props.role,
2027
+ "aria-label": props.popoverAriaLabel,
2028
+ onToggle: _cache[0] || (_cache[0] = ($event) => open.value = $event.newState === "open")
2029
+ }, [
2030
+ open.value ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
2031
+ props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$5, toDisplayString(props.content), 1)) : createCommentVNode("", true)
2032
+ ], true) : createCommentVNode("", true)
2033
+ ], 46, _hoisted_1$c);
2034
+ };
2035
+ }
2036
+ });
2037
+
2038
+ const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-9125d023"]]);
2039
+
2040
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1986
2041
  __name: "BaseFormFieldWrapper",
1987
2042
  props: {
1988
2043
  id: {},
@@ -2034,23 +2089,27 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2034
2089
  }
2035
2090
  });
2036
2091
 
2037
- const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-5d99c134"]]);
2092
+ const BaseFormFieldWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-5d99c134"]]);
2038
2093
 
2039
2094
  const _hoisted_1$b = {
2040
2095
  key: 0,
2041
2096
  class: "icon-wrapper leading"
2042
2097
  };
2043
- 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"];
2044
- const _hoisted_3$3 = ["aria-disabled"];
2045
- const _hoisted_4$2 = {
2046
- key: 3,
2047
- class: "trailing-slot"
2098
+ const _hoisted_2$4 = {
2099
+ key: 1,
2100
+ class: "leading-slot"
2048
2101
  };
2102
+ const _hoisted_3$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", "aria-activedescendant"];
2103
+ const _hoisted_4$2 = ["aria-disabled"];
2049
2104
  const _hoisted_5 = {
2050
2105
  key: 4,
2106
+ class: "trailing-slot"
2107
+ };
2108
+ const _hoisted_6 = {
2109
+ key: 5,
2051
2110
  class: "icon-wrapper trailing"
2052
2111
  };
2053
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2112
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2054
2113
  __name: "BaseInput",
2055
2114
  props: /* @__PURE__ */ mergeModels({
2056
2115
  id: {},
@@ -2076,6 +2135,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2076
2135
  ariaValuemin: { default: void 0 },
2077
2136
  ariaValuemax: { default: void 0 },
2078
2137
  ariaValuetext: { default: void 0 },
2138
+ ariaActivedescendant: { default: void 0 },
2079
2139
  unit: { default: void 0 },
2080
2140
  inputmode: { default: void 0 },
2081
2141
  clearable: { type: Boolean, default: false }
@@ -2132,6 +2192,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2132
2192
  name: props.leadingIcon
2133
2193
  }, null, 8, ["name"])) : createCommentVNode("", true)
2134
2194
  ])) : createCommentVNode("", true),
2195
+ _ctx.$slots.leading ? (openBlock(), createElementBlock("div", _hoisted_2$4, [
2196
+ renderSlot(_ctx.$slots, "leading", {}, void 0, true)
2197
+ ])) : createCommentVNode("", true),
2135
2198
  createElementVNode("input", {
2136
2199
  id: props.id,
2137
2200
  ref: "input",
@@ -2156,24 +2219,25 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2156
2219
  "aria-valuemin": props.ariaValuemin,
2157
2220
  "aria-valuemax": props.ariaValuemax,
2158
2221
  "aria-valuetext": props.ariaValuetext,
2222
+ "aria-activedescendant": props.ariaActivedescendant,
2159
2223
  class: normalizeClass({ "input-field": true, "has-value": hasValue.value }),
2160
2224
  onInput: handleInput,
2161
2225
  onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus", $event)),
2162
2226
  onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur", $event)),
2163
2227
  onKeydown: _cache[2] || (_cache[2] = ($event) => emit("keydown", $event)),
2164
2228
  onClick: _cache[3] || (_cache[3] = ($event) => emit("click", $event))
2165
- }, null, 42, _hoisted_2$4),
2229
+ }, null, 42, _hoisted_3$4),
2166
2230
  props.unit ? (openBlock(), createElementBlock("span", {
2167
- key: 1,
2231
+ key: 2,
2168
2232
  class: normalizeClass({
2169
2233
  unit: true,
2170
2234
  placeholder: showUnitPlaceholder.value,
2171
2235
  disabled: props.disabled
2172
2236
  }),
2173
2237
  "aria-disabled": props.disabled || void 0
2174
- }, toDisplayString(props.unit), 11, _hoisted_3$3)) : createCommentVNode("", true),
2175
- props.clearable && hasValue.value && !props.disabled && !props.readonly ? (openBlock(), createBlock(_sfc_main$t, {
2176
- key: 2,
2238
+ }, toDisplayString(props.unit), 11, _hoisted_4$2)) : createCommentVNode("", true),
2239
+ props.clearable && hasValue.value && !props.disabled && !props.readonly ? (openBlock(), createBlock(_sfc_main$v, {
2240
+ key: 3,
2177
2241
  class: "clear-button",
2178
2242
  type: "button",
2179
2243
  size: "xsmall",
@@ -2183,10 +2247,10 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2183
2247
  title: "Clear",
2184
2248
  onClick: withModifiers(clearAndFocusInput, ["stop"])
2185
2249
  })) : createCommentVNode("", true),
2186
- _ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
2250
+ _ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_5, [
2187
2251
  renderSlot(_ctx.$slots, "trailing", {}, void 0, true)
2188
2252
  ])) : createCommentVNode("", true),
2189
- props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_5, [
2253
+ props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_6, [
2190
2254
  createVNode(KdsIcon, {
2191
2255
  name: props.trailingIcon
2192
2256
  }, null, 8, ["name"])
@@ -2196,7 +2260,612 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2196
2260
  }
2197
2261
  });
2198
2262
 
2199
- const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-375bc2d8"]]);
2263
+ const BaseInput = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-44072f2e"]]);
2264
+
2265
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2266
+ __name: "KdsTextInput",
2267
+ props: /* @__PURE__ */ mergeModels({
2268
+ description: {},
2269
+ label: {},
2270
+ ariaLabel: {},
2271
+ id: {},
2272
+ subText: {},
2273
+ error: { type: Boolean, default: false },
2274
+ validating: { type: Boolean, default: false },
2275
+ preserveSubTextSpace: { type: Boolean, default: false },
2276
+ placeholder: {},
2277
+ disabled: { type: Boolean, default: false },
2278
+ readonly: { type: Boolean, default: false },
2279
+ required: { type: Boolean, default: false },
2280
+ name: {},
2281
+ autocomplete: {}
2282
+ }, {
2283
+ "modelValue": { default: "" },
2284
+ "modelModifiers": {}
2285
+ }),
2286
+ emits: ["update:modelValue"],
2287
+ setup(__props, { expose: __expose }) {
2288
+ const props = __props;
2289
+ const modelValue = useModel(__props, "modelValue");
2290
+ const baseInput = useTemplateRef("baseInput");
2291
+ __expose({
2292
+ focus: () => baseInput.value?.focus()
2293
+ });
2294
+ return (_ctx, _cache) => {
2295
+ return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2296
+ default: withCtx((slotProps) => [
2297
+ createVNode(BaseInput, mergeProps({
2298
+ ref_key: "baseInput",
2299
+ ref: baseInput
2300
+ }, slotProps, {
2301
+ modelValue: modelValue.value,
2302
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2303
+ type: "text",
2304
+ placeholder: props.placeholder,
2305
+ disabled: props.disabled,
2306
+ readonly: props.readonly,
2307
+ required: props.required,
2308
+ error: props.error,
2309
+ name: props.name,
2310
+ autocomplete: props.autocomplete
2311
+ }), null, 16, ["modelValue", "placeholder", "disabled", "readonly", "required", "error", "name", "autocomplete"])
2312
+ ]),
2313
+ _: 1
2314
+ }, 16);
2315
+ };
2316
+ }
2317
+ });
2318
+
2319
+ const HEX_RADIX = 16;
2320
+ const RGB_MAX = 255;
2321
+ const HUE_MAX_DEG$1 = 360;
2322
+ const HUE_SECTOR_DEG = 60;
2323
+ const HUE_SECTOR_COUNT = 6;
2324
+ const HUE_OFFSET_FOR_MAX_G = 2;
2325
+ const HUE_OFFSET_FOR_MAX_B = 4;
2326
+ const HUE_SECTOR_INDEX_2 = 2;
2327
+ const HUE_SECTOR_INDEX_3 = 3;
2328
+ const HUE_SECTOR_INDEX_4 = 4;
2329
+ const HUE_SECTOR_INDEX_5 = 5;
2330
+ const HEX_PAIR_LENGTH = 2;
2331
+ const HEX_RED_START = 1;
2332
+ const HEX_GREEN_START = HEX_RED_START + HEX_PAIR_LENGTH;
2333
+ const HEX_BLUE_START = HEX_GREEN_START + HEX_PAIR_LENGTH;
2334
+ const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
2335
+ const round = (value) => Math.round(value);
2336
+ const padHex = (value) => value.toString(HEX_RADIX).padStart(2, "0");
2337
+ const normalizeHexColor = (value) => {
2338
+ const trimmed = value.trim();
2339
+ if (trimmed.length === 0) {
2340
+ return null;
2341
+ }
2342
+ const withoutHash = trimmed.startsWith("#") ? trimmed.slice(1) : trimmed;
2343
+ if (/^[0-9a-fA-F]{3}$/.test(withoutHash)) {
2344
+ const [r, g, b] = withoutHash.split("");
2345
+ return `#${r}${r}${g}${g}${b}${b}`.toUpperCase();
2346
+ }
2347
+ if (/^[0-9a-fA-F]{6}$/.test(withoutHash)) {
2348
+ return `#${withoutHash}`.toUpperCase();
2349
+ }
2350
+ return null;
2351
+ };
2352
+ const hexToRgb = (hex) => {
2353
+ const normalized = normalizeHexColor(hex);
2354
+ if (!normalized) {
2355
+ return null;
2356
+ }
2357
+ const r = Number.parseInt(
2358
+ normalized.slice(HEX_RED_START, HEX_RED_START + HEX_PAIR_LENGTH),
2359
+ HEX_RADIX
2360
+ );
2361
+ const g = Number.parseInt(
2362
+ normalized.slice(HEX_GREEN_START, HEX_GREEN_START + HEX_PAIR_LENGTH),
2363
+ HEX_RADIX
2364
+ );
2365
+ const b = Number.parseInt(
2366
+ normalized.slice(HEX_BLUE_START, HEX_BLUE_START + HEX_PAIR_LENGTH),
2367
+ HEX_RADIX
2368
+ );
2369
+ return { r, g, b };
2370
+ };
2371
+ const rgbToHex = ({ r, g, b }) => {
2372
+ const rr = clamp(round(r), 0, RGB_MAX);
2373
+ const gg = clamp(round(g), 0, RGB_MAX);
2374
+ const bb = clamp(round(b), 0, RGB_MAX);
2375
+ return `#${padHex(rr)}${padHex(gg)}${padHex(bb)}`.toUpperCase();
2376
+ };
2377
+ const rgbToHsv = ({ r, g, b }) => {
2378
+ const rr = clamp(r / RGB_MAX, 0, 1);
2379
+ const gg = clamp(g / RGB_MAX, 0, 1);
2380
+ const bb = clamp(b / RGB_MAX, 0, 1);
2381
+ const max = Math.max(rr, gg, bb);
2382
+ const min = Math.min(rr, gg, bb);
2383
+ const delta = max - min;
2384
+ const v = max;
2385
+ const s = max === 0 ? 0 : delta / max;
2386
+ let h = 0;
2387
+ if (delta !== 0) {
2388
+ if (max === rr) {
2389
+ h = (gg - bb) / delta % HUE_SECTOR_COUNT;
2390
+ } else if (max === gg) {
2391
+ h = (bb - rr) / delta + HUE_OFFSET_FOR_MAX_G;
2392
+ } else {
2393
+ h = (rr - gg) / delta + HUE_OFFSET_FOR_MAX_B;
2394
+ }
2395
+ h *= HUE_SECTOR_DEG;
2396
+ if (h < 0) {
2397
+ h += HUE_MAX_DEG$1;
2398
+ }
2399
+ }
2400
+ return { h, s, v };
2401
+ };
2402
+ const hsvToRgb = ({ h, s, v }) => {
2403
+ const hh = (h % HUE_MAX_DEG$1 + HUE_MAX_DEG$1) % HUE_MAX_DEG$1;
2404
+ const ss = clamp(s, 0, 1);
2405
+ const vv = clamp(v, 0, 1);
2406
+ const c = vv * ss;
2407
+ const x = c * (1 - Math.abs(hh / HUE_SECTOR_DEG % 2 - 1));
2408
+ const m = vv - c;
2409
+ let rPrime = 0;
2410
+ let gPrime = 0;
2411
+ let bPrime = 0;
2412
+ if (hh < HUE_SECTOR_DEG) {
2413
+ rPrime = c;
2414
+ gPrime = x;
2415
+ } else if (hh < HUE_SECTOR_INDEX_2 * HUE_SECTOR_DEG) {
2416
+ rPrime = x;
2417
+ gPrime = c;
2418
+ } else if (hh < HUE_SECTOR_INDEX_3 * HUE_SECTOR_DEG) {
2419
+ gPrime = c;
2420
+ bPrime = x;
2421
+ } else if (hh < HUE_SECTOR_INDEX_4 * HUE_SECTOR_DEG) {
2422
+ gPrime = x;
2423
+ bPrime = c;
2424
+ } else if (hh < HUE_SECTOR_INDEX_5 * HUE_SECTOR_DEG) {
2425
+ rPrime = x;
2426
+ bPrime = c;
2427
+ } else {
2428
+ rPrime = c;
2429
+ bPrime = x;
2430
+ }
2431
+ return {
2432
+ r: round((rPrime + m) * RGB_MAX),
2433
+ g: round((gPrime + m) * RGB_MAX),
2434
+ b: round((bPrime + m) * RGB_MAX)
2435
+ };
2436
+ };
2437
+ const hsvToHex = (hsv) => rgbToHex(hsvToRgb(hsv));
2438
+
2439
+ const usePointerHandler = (updateFromEvent) => {
2440
+ const activePointerId = ref(null);
2441
+ const onPointerDown = (event) => {
2442
+ if (event.button !== 0) {
2443
+ return;
2444
+ }
2445
+ const target = event.currentTarget;
2446
+ if (!(target instanceof HTMLElement)) {
2447
+ return;
2448
+ }
2449
+ activePointerId.value = event.pointerId;
2450
+ target.setPointerCapture(event.pointerId);
2451
+ updateFromEvent(event);
2452
+ };
2453
+ const onPointerMove = (event) => {
2454
+ if (activePointerId.value !== event.pointerId) {
2455
+ return;
2456
+ }
2457
+ updateFromEvent(event);
2458
+ };
2459
+ const endPointerInteraction = (event) => {
2460
+ if (activePointerId.value !== event.pointerId) {
2461
+ return;
2462
+ }
2463
+ const target = event.currentTarget;
2464
+ if (target instanceof HTMLElement && target.hasPointerCapture(event.pointerId)) {
2465
+ target.releasePointerCapture(event.pointerId);
2466
+ }
2467
+ activePointerId.value = null;
2468
+ };
2469
+ return {
2470
+ activePointerId,
2471
+ onPointerDown,
2472
+ onPointerMove,
2473
+ onPointerUp: endPointerInteraction
2474
+ };
2475
+ };
2476
+
2477
+ const _hoisted_1$a = { class: "kds-color-picker" };
2478
+ const _hoisted_2$3 = ["aria-valuetext"];
2479
+ const _hoisted_3$3 = ["aria-valuenow", "aria-valuetext"];
2480
+ const DEFAULT_HUE_DEG = 270;
2481
+ const DEFAULT_SATURATION = 0.8;
2482
+ const DEFAULT_VALUE = 0.9;
2483
+ const HUE_MAX_DEG = 360;
2484
+ const HUE_MAX_EXCLUSIVE_DEG = 359.999;
2485
+ const PERCENT = 100;
2486
+ const KEYBOARD_STEP = 0.01;
2487
+ const KEYBOARD_LARGE_STEP = 0.1;
2488
+ const HUE_KEYBOARD_STEP_DEG = 1;
2489
+ const HUE_KEYBOARD_LARGE_STEP_DEG = 10;
2490
+ const TO_BOTTOM_GRADIENT = "linear-gradient(to bottom, transparent, black)";
2491
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2492
+ __name: "ColorPicker",
2493
+ props: {
2494
+ "modelValue": { default: "" },
2495
+ "modelModifiers": {}
2496
+ },
2497
+ emits: ["update:modelValue"],
2498
+ setup(__props) {
2499
+ const modelValue = useModel(__props, "modelValue");
2500
+ const colorspaceEl = ref(null);
2501
+ const hueEl = ref(null);
2502
+ const hue = ref(DEFAULT_HUE_DEG);
2503
+ const saturation = ref(DEFAULT_SATURATION);
2504
+ const value = ref(DEFAULT_VALUE);
2505
+ const hasPendingInternalModelUpdate = ref(false);
2506
+ const syncFromModelValue = (next) => {
2507
+ const rgb = hexToRgb(next);
2508
+ if (!rgb) {
2509
+ return;
2510
+ }
2511
+ const hsv = rgbToHsv(rgb);
2512
+ hue.value = hsv.h;
2513
+ saturation.value = hsv.s;
2514
+ value.value = hsv.v;
2515
+ };
2516
+ watch(
2517
+ () => modelValue.value,
2518
+ (next) => {
2519
+ if (hasPendingInternalModelUpdate.value) {
2520
+ hasPendingInternalModelUpdate.value = false;
2521
+ return;
2522
+ }
2523
+ syncFromModelValue(next);
2524
+ },
2525
+ { immediate: true }
2526
+ );
2527
+ const currentHex = computed(
2528
+ () => hsvToHex({
2529
+ h: hue.value,
2530
+ s: saturation.value,
2531
+ v: value.value
2532
+ })
2533
+ );
2534
+ const hueRgb = computed(() => hsvToRgb({ h: hue.value, s: 1, v: 1 }));
2535
+ const colorspaceBackground = computed(() => {
2536
+ const { r, g, b } = hueRgb.value;
2537
+ return {
2538
+ background: `${TO_BOTTOM_GRADIENT}, linear-gradient(to right, white, rgb(${r}, ${g}, ${b}))`
2539
+ };
2540
+ });
2541
+ const colorspaceHandleStyle = computed(() => ({
2542
+ left: `${saturation.value * 100}%`,
2543
+ top: `${(1 - value.value) * 100}%`
2544
+ }));
2545
+ const hueHandleStyle = computed(() => ({
2546
+ left: `${hue.value / HUE_MAX_DEG * PERCENT}%`
2547
+ }));
2548
+ const setModelValueFromHsv = () => {
2549
+ hasPendingInternalModelUpdate.value = true;
2550
+ modelValue.value = currentHex.value;
2551
+ };
2552
+ const updateFromColorspaceEvent = (event) => {
2553
+ const el = colorspaceEl.value;
2554
+ if (!el) {
2555
+ return;
2556
+ }
2557
+ const rect = el.getBoundingClientRect();
2558
+ const x = (event.clientX - rect.left) / rect.width;
2559
+ const y = (event.clientY - rect.top) / rect.height;
2560
+ saturation.value = Math.min(1, Math.max(0, x));
2561
+ value.value = 1 - Math.min(1, Math.max(0, y));
2562
+ setModelValueFromHsv();
2563
+ };
2564
+ const updateFromHueEvent = (event) => {
2565
+ const el = hueEl.value;
2566
+ if (!el) {
2567
+ return;
2568
+ }
2569
+ const rect = el.getBoundingClientRect();
2570
+ const x = (event.clientX - rect.left) / rect.width;
2571
+ hue.value = Math.min(HUE_MAX_EXCLUSIVE_DEG, Math.max(0, x * HUE_MAX_DEG));
2572
+ setModelValueFromHsv();
2573
+ };
2574
+ const {
2575
+ onPointerDown: onColorspacePointerDown,
2576
+ onPointerMove: onColorspacePointerMove,
2577
+ onPointerUp: onColorspacePointerUp
2578
+ } = usePointerHandler(updateFromColorspaceEvent);
2579
+ const {
2580
+ onPointerDown: onHuePointerDown,
2581
+ onPointerMove: onHuePointerMove,
2582
+ onPointerUp: onHuePointerUp
2583
+ } = usePointerHandler(updateFromHueEvent);
2584
+ const updateFromTextValue = (next) => {
2585
+ modelValue.value = next;
2586
+ const normalized = normalizeHexColor(next);
2587
+ if (normalized) {
2588
+ syncFromModelValue(normalized);
2589
+ }
2590
+ };
2591
+ const saturationPercent = computed(
2592
+ () => Math.round(saturation.value * PERCENT)
2593
+ );
2594
+ const valuePercent = computed(() => Math.round(value.value * PERCENT));
2595
+ const colorspaceValueText = computed(
2596
+ () => `Saturation ${saturationPercent.value} percent, brightness ${valuePercent.value} percent`
2597
+ );
2598
+ const hueValueText = computed(() => `${Math.round(hue.value)} degrees`);
2599
+ const onColorspaceKeyDown = (event) => {
2600
+ const step = event.shiftKey ? KEYBOARD_LARGE_STEP : KEYBOARD_STEP;
2601
+ let handled = true;
2602
+ switch (event.key) {
2603
+ case "ArrowLeft":
2604
+ saturation.value = clamp(saturation.value - step, 0, 1);
2605
+ break;
2606
+ case "ArrowRight":
2607
+ saturation.value = clamp(saturation.value + step, 0, 1);
2608
+ break;
2609
+ case "ArrowUp":
2610
+ value.value = clamp(value.value + step, 0, 1);
2611
+ break;
2612
+ case "ArrowDown":
2613
+ value.value = clamp(value.value - step, 0, 1);
2614
+ break;
2615
+ default:
2616
+ handled = false;
2617
+ }
2618
+ if (handled) {
2619
+ event.preventDefault();
2620
+ setModelValueFromHsv();
2621
+ }
2622
+ };
2623
+ const onHueKeyDown = (event) => {
2624
+ const step = event.shiftKey ? HUE_KEYBOARD_LARGE_STEP_DEG : HUE_KEYBOARD_STEP_DEG;
2625
+ let handled = true;
2626
+ switch (event.key) {
2627
+ case "ArrowLeft":
2628
+ hue.value = clamp(hue.value - step, 0, HUE_MAX_EXCLUSIVE_DEG);
2629
+ break;
2630
+ case "ArrowRight":
2631
+ hue.value = clamp(hue.value + step, 0, HUE_MAX_EXCLUSIVE_DEG);
2632
+ break;
2633
+ default:
2634
+ handled = false;
2635
+ }
2636
+ if (handled) {
2637
+ event.preventDefault();
2638
+ setModelValueFromHsv();
2639
+ }
2640
+ };
2641
+ return (_ctx, _cache) => {
2642
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
2643
+ createElementVNode("div", {
2644
+ ref_key: "colorspaceEl",
2645
+ ref: colorspaceEl,
2646
+ class: "colorspace",
2647
+ role: "slider",
2648
+ "aria-label": "Color selection",
2649
+ "aria-roledescription": "2D color slider",
2650
+ "aria-valuetext": colorspaceValueText.value,
2651
+ style: normalizeStyle(colorspaceBackground.value),
2652
+ tabindex: "0",
2653
+ onPointerdown: _cache[0] || (_cache[0] = withModifiers(
2654
+ //@ts-ignore
2655
+ (...args) => unref(onColorspacePointerDown) && unref(onColorspacePointerDown)(...args),
2656
+ ["prevent"]
2657
+ )),
2658
+ onPointermove: _cache[1] || (_cache[1] = withModifiers(
2659
+ //@ts-ignore
2660
+ (...args) => unref(onColorspacePointerMove) && unref(onColorspacePointerMove)(...args),
2661
+ ["prevent"]
2662
+ )),
2663
+ onPointerup: _cache[2] || (_cache[2] = //@ts-ignore
2664
+ (...args) => unref(onColorspacePointerUp) && unref(onColorspacePointerUp)(...args)),
2665
+ onPointercancel: _cache[3] || (_cache[3] = //@ts-ignore
2666
+ (...args) => unref(onColorspacePointerUp) && unref(onColorspacePointerUp)(...args)),
2667
+ onKeydown: onColorspaceKeyDown
2668
+ }, [
2669
+ createElementVNode("div", {
2670
+ class: "handle",
2671
+ style: normalizeStyle(colorspaceHandleStyle.value)
2672
+ }, null, 4)
2673
+ ], 44, _hoisted_2$3),
2674
+ createElementVNode("div", {
2675
+ ref_key: "hueEl",
2676
+ ref: hueEl,
2677
+ class: "hue",
2678
+ role: "slider",
2679
+ "aria-label": "Hue",
2680
+ "aria-valuenow": Math.round(hue.value),
2681
+ "aria-valuemin": "0",
2682
+ "aria-valuemax": HUE_MAX_DEG,
2683
+ "aria-valuetext": hueValueText.value,
2684
+ tabindex: "0",
2685
+ onPointerdown: _cache[4] || (_cache[4] = withModifiers(
2686
+ //@ts-ignore
2687
+ (...args) => unref(onHuePointerDown) && unref(onHuePointerDown)(...args),
2688
+ ["prevent"]
2689
+ )),
2690
+ onPointermove: _cache[5] || (_cache[5] = withModifiers(
2691
+ //@ts-ignore
2692
+ (...args) => unref(onHuePointerMove) && unref(onHuePointerMove)(...args),
2693
+ ["prevent"]
2694
+ )),
2695
+ onPointerup: _cache[6] || (_cache[6] = //@ts-ignore
2696
+ (...args) => unref(onHuePointerUp) && unref(onHuePointerUp)(...args)),
2697
+ onPointercancel: _cache[7] || (_cache[7] = //@ts-ignore
2698
+ (...args) => unref(onHuePointerUp) && unref(onHuePointerUp)(...args)),
2699
+ onKeydown: onHueKeyDown
2700
+ }, [
2701
+ createElementVNode("div", {
2702
+ class: "handle",
2703
+ style: normalizeStyle(hueHandleStyle.value)
2704
+ }, null, 4)
2705
+ ], 40, _hoisted_3$3),
2706
+ createVNode(_sfc_main$f, {
2707
+ "model-value": modelValue.value,
2708
+ "aria-label": "Color hex value",
2709
+ placeholder: "#FFFFFF",
2710
+ "onUpdate:modelValue": updateFromTextValue
2711
+ }, null, 8, ["model-value"])
2712
+ ]);
2713
+ };
2714
+ }
2715
+ });
2716
+
2717
+ const ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-180fafdd"]]);
2718
+
2719
+ const HEX_LENGTH_1 = 1;
2720
+ const HEX_LENGTH_2 = 2;
2721
+ const HEX_LENGTH_3 = 3;
2722
+ const HEX_LENGTH_4 = 4;
2723
+ const HEX_LENGTH_6 = 6;
2724
+ const normalize = (value, fallbackValue) => {
2725
+ const trimmed = value.trim();
2726
+ if (trimmed.length === 0) {
2727
+ return fallbackValue;
2728
+ }
2729
+ const withoutHash = trimmed.startsWith("#") ? trimmed.slice(1) : trimmed;
2730
+ if (!/^[0-9a-fA-F]+$/.test(withoutHash)) {
2731
+ return fallbackValue;
2732
+ }
2733
+ if (withoutHash.length === HEX_LENGTH_1) {
2734
+ return `#${withoutHash.repeat(HEX_LENGTH_6)}`.toUpperCase();
2735
+ }
2736
+ if (withoutHash.length === HEX_LENGTH_2) {
2737
+ return `#${withoutHash.repeat(HEX_LENGTH_3)}`.toUpperCase();
2738
+ }
2739
+ if (withoutHash.length === HEX_LENGTH_3 || withoutHash.length === HEX_LENGTH_4) {
2740
+ const [r, g, b] = withoutHash;
2741
+ return `#${r}${r}${g}${g}${b}${b}`.toUpperCase();
2742
+ }
2743
+ if (withoutHash.length === HEX_LENGTH_6) {
2744
+ return `#${withoutHash}`.toUpperCase();
2745
+ }
2746
+ return fallbackValue;
2747
+ };
2748
+ const useColorInputValidationOnFocusOut = (modelValue) => {
2749
+ const lastValidHexColor = ref("");
2750
+ watch(
2751
+ modelValue,
2752
+ (value) => {
2753
+ const withoutHash = value.startsWith("#") ? value.slice(1) : value;
2754
+ if (/^[0-9a-fA-F]{6}$/.test(withoutHash)) {
2755
+ lastValidHexColor.value = `#${withoutHash.toUpperCase()}`;
2756
+ }
2757
+ },
2758
+ { immediate: true }
2759
+ );
2760
+ const handleFocusOut = (event) => {
2761
+ const currentTarget = event.currentTarget;
2762
+ if (!(currentTarget instanceof HTMLElement)) {
2763
+ return;
2764
+ }
2765
+ const nextFocusedElement = event.relatedTarget;
2766
+ if (nextFocusedElement instanceof Node && currentTarget.contains(nextFocusedElement)) {
2767
+ return;
2768
+ }
2769
+ const normalized = normalize(modelValue.value, lastValidHexColor.value);
2770
+ if (normalized !== void 0) {
2771
+ modelValue.value = normalized;
2772
+ }
2773
+ };
2774
+ return { handleFocusOut };
2775
+ };
2776
+
2777
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2778
+ __name: "KdsColorInput",
2779
+ props: /* @__PURE__ */ mergeModels({
2780
+ description: {},
2781
+ label: {},
2782
+ ariaLabel: {},
2783
+ id: {},
2784
+ subText: {},
2785
+ error: { type: Boolean, default: false },
2786
+ validating: { type: Boolean, default: false },
2787
+ preserveSubTextSpace: { type: Boolean, default: false },
2788
+ placeholder: { default: "#FFFFFF" },
2789
+ disabled: { type: Boolean, default: false },
2790
+ name: { default: void 0 },
2791
+ autocomplete: { default: void 0 }
2792
+ }, {
2793
+ "modelValue": { default: "" },
2794
+ "modelModifiers": {}
2795
+ }),
2796
+ emits: ["update:modelValue"],
2797
+ setup(__props) {
2798
+ const props = __props;
2799
+ const modelValue = useModel(__props, "modelValue");
2800
+ const open = ref(false);
2801
+ const popoverEl = useTemplateRef("popoverEl");
2802
+ const swatchColor = computed(
2803
+ () => normalizeHexColor(modelValue.value) ?? "#FFFFFF"
2804
+ );
2805
+ const { handleFocusOut } = useColorInputValidationOnFocusOut(modelValue);
2806
+ return (_ctx, _cache) => {
2807
+ return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2808
+ default: withCtx((slotProps) => [
2809
+ createElementVNode("div", {
2810
+ style: normalizeStyle(popoverEl.value?.anchorStyle),
2811
+ onFocusout: _cache[4] || (_cache[4] = //@ts-ignore
2812
+ (...args) => unref(handleFocusOut) && unref(handleFocusOut)(...args))
2813
+ }, [
2814
+ createVNode(BaseInput, mergeProps(slotProps, {
2815
+ modelValue: modelValue.value,
2816
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue.value = $event),
2817
+ placeholder: props.placeholder,
2818
+ disabled: props.disabled,
2819
+ error: props.error,
2820
+ name: props.name,
2821
+ autocomplete: props.autocomplete
2822
+ }), {
2823
+ leading: withCtx(() => [
2824
+ createVNode(KdsColorSwatch, {
2825
+ size: "large",
2826
+ color: swatchColor.value,
2827
+ "aria-hidden": true
2828
+ }, null, 8, ["color"])
2829
+ ]),
2830
+ trailing: withCtx(() => [
2831
+ createVNode(unref(_sfc_main$t), {
2832
+ modelValue: open.value,
2833
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
2834
+ size: "xsmall",
2835
+ variant: "outlined",
2836
+ "leading-icon": "color-picker",
2837
+ "aria-label": "Open color picker",
2838
+ "aria-controls": popoverEl.value?.popoverId,
2839
+ "aria-haspopup": "dialog",
2840
+ disabled: props.disabled,
2841
+ title: open.value ? "Close color picker" : "Open color picker"
2842
+ }, null, 8, ["modelValue", "aria-controls", "disabled", "title"])
2843
+ ]),
2844
+ _: 1
2845
+ }, 16, ["modelValue", "placeholder", "disabled", "error", "name", "autocomplete"]),
2846
+ createVNode(KdsPopover, {
2847
+ ref_key: "popoverEl",
2848
+ ref: popoverEl,
2849
+ modelValue: open.value,
2850
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => open.value = $event),
2851
+ placement: "bottom-right",
2852
+ "popover-aria-label": "Color picker"
2853
+ }, {
2854
+ default: withCtx(() => [
2855
+ createVNode(ColorPicker, {
2856
+ modelValue: modelValue.value,
2857
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => modelValue.value = $event)
2858
+ }, null, 8, ["modelValue"])
2859
+ ]),
2860
+ _: 1
2861
+ }, 8, ["modelValue"])
2862
+ ], 36)
2863
+ ]),
2864
+ _: 1
2865
+ }, 16);
2866
+ };
2867
+ }
2868
+ });
2200
2869
 
2201
2870
  const additionalGroupSeparators = [" ", " ", " "];
2202
2871
  const decimalSeparatorSample = 1.1;
@@ -2320,7 +2989,7 @@ const createKdsNumberParser = (params) => {
2320
2989
  };
2321
2990
  };
2322
2991
 
2323
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2992
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2324
2993
  __name: "KdsNumberInput",
2325
2994
  props: /* @__PURE__ */ mergeModels({
2326
2995
  description: {},
@@ -2479,7 +3148,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2479
3148
  onBlur: handleBlur
2480
3149
  }), {
2481
3150
  trailing: withCtx(() => [
2482
- createVNode(_sfc_main$t, {
3151
+ createVNode(_sfc_main$v, {
2483
3152
  type: "button",
2484
3153
  size: "xsmall",
2485
3154
  variant: "outlined",
@@ -2488,7 +3157,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2488
3157
  disabled: !canDecrease.value,
2489
3158
  onClick: _cache[0] || (_cache[0] = ($event) => adjustByStep(-1))
2490
3159
  }, null, 8, ["aria-label", "disabled"]),
2491
- createVNode(_sfc_main$t, {
3160
+ createVNode(_sfc_main$v, {
2492
3161
  type: "button",
2493
3162
  size: "xsmall",
2494
3163
  variant: "outlined",
@@ -2594,7 +3263,7 @@ const parseRegexToPatternInputValue = (regex, options) => {
2594
3263
  return wildcard ?? body;
2595
3264
  };
2596
3265
 
2597
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
3266
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2598
3267
  __name: "KdsPatternInput",
2599
3268
  props: /* @__PURE__ */ mergeModels({
2600
3269
  description: {},
@@ -2678,7 +3347,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2678
3347
  clearable: ""
2679
3348
  }), {
2680
3349
  trailing: withCtx(() => [
2681
- createVNode(_sfc_main$r, {
3350
+ createVNode(_sfc_main$t, {
2682
3351
  modelValue: caseSensitive.value,
2683
3352
  "onUpdate:modelValue": [
2684
3353
  _cache[0] || (_cache[0] = ($event) => caseSensitive.value = $event),
@@ -2691,7 +3360,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2691
3360
  "aria-label": caseSensitiveAriaLabel.value,
2692
3361
  disabled: props.disabled || props.readonly
2693
3362
  }, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
2694
- createVNode(_sfc_main$r, {
3363
+ createVNode(_sfc_main$t, {
2695
3364
  modelValue: excludeMatches.value,
2696
3365
  "onUpdate:modelValue": [
2697
3366
  _cache[1] || (_cache[1] = ($event) => excludeMatches.value = $event),
@@ -2704,7 +3373,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2704
3373
  "aria-label": excludeMatchesAriaLabel.value,
2705
3374
  disabled: props.disabled || props.readonly
2706
3375
  }, null, 8, ["modelValue", "title", "aria-label", "disabled"]),
2707
- createVNode(_sfc_main$r, {
3376
+ createVNode(_sfc_main$t, {
2708
3377
  modelValue: useRegex.value,
2709
3378
  "onUpdate:modelValue": [
2710
3379
  _cache[2] || (_cache[2] = ($event) => useRegex.value = $event),
@@ -2727,7 +3396,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2727
3396
  }
2728
3397
  });
2729
3398
 
2730
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
3399
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2731
3400
  __name: "KdsSearchInput",
2732
3401
  props: /* @__PURE__ */ mergeModels({
2733
3402
  description: {},
@@ -2783,62 +3452,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2783
3452
  }
2784
3453
  });
2785
3454
 
2786
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
2787
- __name: "KdsTextInput",
2788
- props: /* @__PURE__ */ mergeModels({
2789
- description: {},
2790
- label: {},
2791
- ariaLabel: {},
2792
- id: {},
2793
- subText: {},
2794
- error: { type: Boolean, default: false },
2795
- validating: { type: Boolean, default: false },
2796
- preserveSubTextSpace: { type: Boolean, default: false },
2797
- placeholder: {},
2798
- disabled: { type: Boolean, default: false },
2799
- readonly: { type: Boolean, default: false },
2800
- required: { type: Boolean, default: false },
2801
- name: {},
2802
- autocomplete: {}
2803
- }, {
2804
- "modelValue": { default: "" },
2805
- "modelModifiers": {}
2806
- }),
2807
- emits: ["update:modelValue"],
2808
- setup(__props, { expose: __expose }) {
2809
- const props = __props;
2810
- const modelValue = useModel(__props, "modelValue");
2811
- const baseInput = useTemplateRef("baseInput");
2812
- __expose({
2813
- focus: () => baseInput.value?.focus()
2814
- });
2815
- return (_ctx, _cache) => {
2816
- return openBlock(), createBlock(BaseFormFieldWrapper, normalizeProps(guardReactiveProps(props)), {
2817
- default: withCtx((slotProps) => [
2818
- createVNode(BaseInput, mergeProps({
2819
- ref_key: "baseInput",
2820
- ref: baseInput
2821
- }, slotProps, {
2822
- modelValue: modelValue.value,
2823
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2824
- type: "text",
2825
- placeholder: props.placeholder,
2826
- disabled: props.disabled,
2827
- readonly: props.readonly,
2828
- required: props.required,
2829
- error: props.error,
2830
- name: props.name,
2831
- autocomplete: props.autocomplete
2832
- }), null, 16, ["modelValue", "placeholder", "disabled", "readonly", "required", "error", "name", "autocomplete"])
2833
- ]),
2834
- _: 1
2835
- }, 16);
2836
- };
2837
- }
2838
- });
2839
-
2840
- const _hoisted_1$a = ["rows", "placeholder", "disabled", "readonly", "required", "name", "autocomplete"];
2841
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3455
+ const _hoisted_1$9 = ["rows", "placeholder", "disabled", "readonly", "required", "name", "autocomplete"];
3456
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2842
3457
  __name: "KdsTextarea",
2843
3458
  props: /* @__PURE__ */ mergeModels({
2844
3459
  description: {},
@@ -2901,7 +3516,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2901
3516
  required: props.required,
2902
3517
  name: props.name,
2903
3518
  autocomplete: props.autocomplete
2904
- }), null, 16, _hoisted_1$a), [
3519
+ }), null, 16, _hoisted_1$9), [
2905
3520
  [vModelText, modelValue.value]
2906
3521
  ])
2907
3522
  ]),
@@ -2911,62 +3526,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2911
3526
  }
2912
3527
  });
2913
3528
 
2914
- const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-2e4d2d42"]]);
2915
-
2916
- const _hoisted_1$9 = ["id", "role", "aria-label"];
2917
- const _hoisted_2$3 = {
2918
- key: 0,
2919
- class: "kds-popover-default-content"
2920
- };
2921
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2922
- __name: "KdsPopover",
2923
- props: /* @__PURE__ */ mergeModels({
2924
- placement: { default: "bottom-left" },
2925
- role: { default: "dialog" },
2926
- fullWidth: { type: Boolean, default: false },
2927
- popoverAriaLabel: {},
2928
- content: {}
2929
- }, {
2930
- "modelValue": { type: Boolean, ...{ default: false } },
2931
- "modelModifiers": {}
2932
- }),
2933
- emits: ["update:modelValue"],
2934
- setup(__props, { expose: __expose }) {
2935
- const props = __props;
2936
- const open = useModel(__props, "modelValue");
2937
- const popoverEl = useTemplateRef("popoverEl");
2938
- const popoverId = useId();
2939
- const anchorName = `--anchor-${popoverId}`;
2940
- watchEffect(() => {
2941
- if (open.value) {
2942
- popoverEl.value?.showPopover?.();
2943
- } else {
2944
- popoverEl.value?.hidePopover?.();
2945
- }
2946
- });
2947
- const anchorStyle = { "anchor-name": anchorName };
2948
- __expose({ anchorStyle, popoverId });
2949
- return (_ctx, _cache) => {
2950
- return openBlock(), createElementBlock("div", {
2951
- id: unref(popoverId),
2952
- ref_key: "popoverEl",
2953
- ref: popoverEl,
2954
- class: normalizeClass(["kds-popover", ["floating", props.placement, { "full-width": props.fullWidth }]]),
2955
- popover: "auto",
2956
- style: normalizeStyle({ "position-anchor": anchorName }),
2957
- role: props.role,
2958
- "aria-label": props.popoverAriaLabel,
2959
- onToggle: _cache[0] || (_cache[0] = ($event) => open.value = $event.newState === "open")
2960
- }, [
2961
- open.value ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
2962
- props.content?.trim().length ? (openBlock(), createElementBlock("div", _hoisted_2$3, toDisplayString(props.content), 1)) : createCommentVNode("", true)
2963
- ], true) : createCommentVNode("", true)
2964
- ], 46, _hoisted_1$9);
2965
- };
2966
- }
2967
- });
2968
-
2969
- const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-9125d023"]]);
3529
+ const KdsTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-2e4d2d42"]]);
2970
3530
 
2971
3531
  const _hoisted_1$8 = { class: "kds-info-popover-content" };
2972
3532
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
@@ -3228,7 +3788,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3228
3788
  () => props.button && "to" in props.button && props.button.to !== void 0
3229
3789
  );
3230
3790
  const buttonComponent = computed(
3231
- () => isLinkButton.value ? _sfc_main$s : _sfc_main$t
3791
+ () => isLinkButton.value ? _sfc_main$u : _sfc_main$v
3232
3792
  );
3233
3793
  return (_ctx, _cache) => {
3234
3794
  return openBlock(), createElementBlock("div", _hoisted_1$4, [
@@ -3381,7 +3941,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3381
3941
  size: "medium"
3382
3942
  }, null, 8, ["name"])) : createCommentVNode("", true),
3383
3943
  createElementVNode("div", _hoisted_2$1, toDisplayString(props.title), 1),
3384
- createVNode(_sfc_main$t, {
3944
+ createVNode(_sfc_main$v, {
3385
3945
  "leading-icon": "x-close",
3386
3946
  variant: "transparent",
3387
3947
  size: "medium",
@@ -3654,7 +4214,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3654
4214
  unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1, [
3655
4215
  createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
3656
4216
  unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
3657
- createVNode(_sfc_main$m, {
4217
+ createVNode(_sfc_main$o, {
3658
4218
  modelValue: askAgain.value,
3659
4219
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
3660
4220
  label: unref(config).value.doNotAskAgain.label,
@@ -3669,7 +4229,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3669
4229
  name: "footer",
3670
4230
  fn: withCtx(() => [
3671
4231
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
3672
- return openBlock(), createBlock(_sfc_main$t, {
4232
+ return openBlock(), createBlock(_sfc_main$v, {
3673
4233
  key: index,
3674
4234
  destructive: button.destructive,
3675
4235
  autofocus: button.autofocus,
@@ -3701,5 +4261,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3701
4261
 
3702
4262
  const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67e036b5"]]);
3703
4263
 
3704
- export { KdsAvatar, KdsBadge, _sfc_main$t as KdsButton, KdsCardClickable, _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, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, _sfc_main$c as KdsSearchInput, KdsSubText, _sfc_main$b as KdsTextInput, KdsTextarea, _sfc_main$r as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, kdsAvatarSize, kdsAvatarSizes, kdsBadgeSize, kdsBadgeSizes, kdsBadgeVariant, kdsBadgeVariants, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCardVariant, kdsCardVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchSize, kdsColorSwatchSizes, 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, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
4264
+ export { KdsAvatar, KdsBadge, _sfc_main$v as KdsButton, KdsCardClickable, _sfc_main$o as KdsCheckbox, KdsCheckboxGroup, _sfc_main$d as KdsColorInput, KdsColorSwatch, KdsDataType, KdsDynamicModalProvider, KdsEmptyState, KdsIcon, KdsInfoToggleButton, KdsLabel, _sfc_main$u as KdsLinkButton, KdsLiveStatus, KdsLoadingSpinner, KdsModal, KdsModalLayout, _sfc_main$c as KdsNumberInput, _sfc_main$b as KdsPatternInput, KdsProgressButton, KdsRadioButton, KdsRadioButtonGroup, _sfc_main$a as KdsSearchInput, KdsSubText, _sfc_main$f as KdsTextInput, KdsTextarea, _sfc_main$t as KdsToggleButton, KdsValueSwitch, KdsVariableToggleButton, kdsAvatarSize, kdsAvatarSizes, kdsBadgeSize, kdsBadgeSizes, kdsBadgeVariant, kdsBadgeVariants, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCardVariant, kdsCardVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchSize, kdsColorSwatchSizes, 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, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsLegacyMode };
3705
4265
  //# sourceMappingURL=index.js.map