@knime/kds-components 0.22.1 → 0.22.2

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.
package/dist/index.css CHANGED
@@ -1032,7 +1032,7 @@ html.kds-legacy {
1032
1032
  }
1033
1033
 
1034
1034
  .kds-list-container {
1035
- &[data-v-446a5ba1] {
1035
+ &[data-v-d8750fc1] {
1036
1036
  position: relative;
1037
1037
  display: flex;
1038
1038
  flex-direction: column;
@@ -1041,20 +1041,20 @@ html.kds-legacy {
1041
1041
  padding: var(--kds-spacing-container-0-25x);
1042
1042
  overflow-y: auto;
1043
1043
  }
1044
- &.standalone[data-v-446a5ba1] {
1044
+ &.standalone[data-v-d8750fc1] {
1045
1045
  border: var(--kds-border-base-subtle);
1046
1046
  border-radius: var(--kds-border-radius-container-0-31x);
1047
1047
  }
1048
- &.menu[data-v-446a5ba1] {
1048
+ &.menu[data-v-d8750fc1] {
1049
1049
  border: none;
1050
1050
  }
1051
- &[data-v-446a5ba1]:focus-visible {
1051
+ &[data-v-d8750fc1]:focus-visible {
1052
1052
  outline: var(--kds-border-action-focused);
1053
1053
  outline-offset: var(--kds-spacing-offset-focus);
1054
1054
  border-radius: var(--kds-border-radius-container-0-31x);
1055
1055
  }
1056
1056
  }
1057
- .kds-list-container-empty[data-v-446a5ba1] {
1057
+ .kds-list-container-empty[data-v-d8750fc1] {
1058
1058
  display: flex;
1059
1059
  flex: 1;
1060
1060
  align-items: center;
@@ -1730,7 +1730,7 @@ html.kds-legacy {
1730
1730
  box-shadow: var(--kds-elevation-level-3);
1731
1731
  }
1732
1732
 
1733
- .kds-color-picker[data-v-74392b20] {
1733
+ .kds-color-picker[data-v-d2bb72e0] {
1734
1734
  display: flex;
1735
1735
  flex-direction: column;
1736
1736
  gap: var(--kds-spacing-container-1x);
@@ -1741,7 +1741,7 @@ html.kds-legacy {
1741
1741
  border-radius: var(--kds-border-radius-container-0-50x);
1742
1742
  box-shadow: var(--kds-elevation-level-3);
1743
1743
  }
1744
- .colorspace[data-v-74392b20] {
1744
+ .colorspace[data-v-d2bb72e0] {
1745
1745
  position: relative;
1746
1746
  width: 100%;
1747
1747
  height: 200px;
@@ -1749,7 +1749,7 @@ html.kds-legacy {
1749
1749
  outline: none;
1750
1750
  border-radius: var(--kds-border-radius-container-0-37x);
1751
1751
  }
1752
- .handle[data-v-74392b20] {
1752
+ .handle[data-v-d2bb72e0] {
1753
1753
  position: absolute;
1754
1754
  width: var(--kds-dimension-icon-0-75x);
1755
1755
  height: var(--kds-dimension-icon-0-75x);
@@ -1760,7 +1760,7 @@ html.kds-legacy {
1760
1760
  transform: translate(-50%, -50%);
1761
1761
  }
1762
1762
  .hue {
1763
- &[data-v-74392b20] {
1763
+ &[data-v-d2bb72e0] {
1764
1764
  position: relative;
1765
1765
  width: 100%;
1766
1766
  height: var(--kds-dimension-component-height-0-75x);
@@ -1778,18 +1778,18 @@ html.kds-legacy {
1778
1778
  );
1779
1779
  border-radius: var(--kds-border-radius-container-pill);
1780
1780
  }
1781
- & .handle[data-v-74392b20] {
1781
+ & .handle[data-v-d2bb72e0] {
1782
1782
  top: 50%;
1783
1783
  }
1784
1784
  }
1785
- .colorspace[data-v-74392b20]:focus,
1786
- .hue[data-v-74392b20]:focus {
1785
+ .colorspace[data-v-d2bb72e0]:focus,
1786
+ .hue[data-v-d2bb72e0]:focus {
1787
1787
  outline: none;
1788
1788
  }
1789
- .colorspace:focus .handle[data-v-74392b20],
1790
- .colorspace:focus-visible .handle[data-v-74392b20],
1791
- .hue:focus .handle[data-v-74392b20],
1792
- .hue:focus-visible .handle[data-v-74392b20] {
1789
+ .colorspace:focus .handle[data-v-d2bb72e0],
1790
+ .colorspace:focus-visible .handle[data-v-d2bb72e0],
1791
+ .hue:focus .handle[data-v-d2bb72e0],
1792
+ .hue:focus-visible .handle[data-v-d2bb72e0] {
1793
1793
  outline: var(--kds-border-action-focused);
1794
1794
  outline-offset: calc(-1 * var(--kds-spacing-offset-focus));
1795
1795
  }
@@ -3496,16 +3496,16 @@ textarea[data-v-bdf12ef9]::-webkit-scrollbar {
3496
3496
  }
3497
3497
 
3498
3498
  .kds-resize-container {
3499
- &[data-v-403e065b] {
3499
+ &[data-v-46b33b01] {
3500
3500
  display: flex;
3501
3501
  flex-direction: column;
3502
3502
  gap: var(--kds-spacing-container-0-37x);
3503
3503
  }
3504
- &.dragging[data-v-403e065b] {
3504
+ &.dragging[data-v-46b33b01] {
3505
3505
  user-select: none;
3506
3506
  }
3507
3507
  }
3508
- .kds-resize-container-content[data-v-403e065b] {
3508
+ .kds-resize-container-content[data-v-46b33b01] {
3509
3509
  inline-size: 100%;
3510
3510
  }
3511
3511
 
package/dist/index.js CHANGED
@@ -1804,8 +1804,37 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1804
1804
  }
1805
1805
  return elementId?.slice(idPrefix.length + 1);
1806
1806
  }
1807
+ const warnedDuplicateIds = /* @__PURE__ */ new Set();
1808
+ const deduplicationResult = computed(() => {
1809
+ const seen = /* @__PURE__ */ new Set();
1810
+ const duplicateIds = [];
1811
+ const items = props.possibleValues.filter((o) => {
1812
+ if (seen.has(o.id)) {
1813
+ duplicateIds.push(o.id);
1814
+ return false;
1815
+ }
1816
+ seen.add(o.id);
1817
+ return true;
1818
+ });
1819
+ return { items, duplicateIds };
1820
+ });
1821
+ const sanitizedValues = computed(() => deduplicationResult.value.items);
1822
+ watch(
1823
+ () => deduplicationResult.value.duplicateIds,
1824
+ (duplicateIds) => {
1825
+ for (const id of duplicateIds) {
1826
+ if (!warnedDuplicateIds.has(id)) {
1827
+ console.warn(
1828
+ `[KdsListContainer] Duplicate option id "${id}" detected. Only the first occurrence will be used.`
1829
+ );
1830
+ warnedDuplicateIds.add(id);
1831
+ }
1832
+ }
1833
+ },
1834
+ { immediate: true }
1835
+ );
1807
1836
  const prefixedValues = computed(
1808
- () => (__props.loading ? [] : props.possibleValues).map((o) => ({
1837
+ () => (__props.loading ? [] : sanitizedValues.value).map((o) => ({
1809
1838
  ...o,
1810
1839
  id: `${idPrefix}-${o.id}`
1811
1840
  }))
@@ -2027,7 +2056,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2027
2056
  }
2028
2057
  });
2029
2058
 
2030
- const KdsListContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$R, [["__scopeId", "data-v-446a5ba1"]]);
2059
+ const KdsListContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$R, [["__scopeId", "data-v-d8750fc1"]]);
2031
2060
 
2032
2061
  const KdsListContainer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
2033
2062
  __proto__: null,
@@ -3957,6 +3986,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
3957
3986
  )),
3958
3987
  onLostpointercapture: _cache[2] || (_cache[2] = //@ts-ignore
3959
3988
  (...args) => unref(onColorspacePointerUp) && unref(onColorspacePointerUp)(...args)),
3989
+ onPointerup: _cache[3] || (_cache[3] = //@ts-ignore
3990
+ (...args) => unref(onColorspacePointerUp) && unref(onColorspacePointerUp)(...args)),
3960
3991
  onKeydown: onColorspaceKeyDown
3961
3992
  }, [
3962
3993
  createElementVNode("div", {
@@ -3975,17 +4006,19 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
3975
4006
  "aria-valuemax": HUE_MAX_DEG,
3976
4007
  "aria-valuetext": hueValueText.value,
3977
4008
  tabindex: "0",
3978
- onPointerdown: _cache[3] || (_cache[3] = withModifiers(
4009
+ onPointerdown: _cache[4] || (_cache[4] = withModifiers(
3979
4010
  //@ts-ignore
3980
4011
  (...args) => unref(onHuePointerDown) && unref(onHuePointerDown)(...args),
3981
4012
  ["prevent"]
3982
4013
  )),
3983
- onPointermove: _cache[4] || (_cache[4] = withModifiers(
4014
+ onPointermove: _cache[5] || (_cache[5] = withModifiers(
3984
4015
  //@ts-ignore
3985
4016
  (...args) => unref(onHuePointerMove) && unref(onHuePointerMove)(...args),
3986
4017
  ["prevent"]
3987
4018
  )),
3988
- onLostpointercapture: _cache[5] || (_cache[5] = //@ts-ignore
4019
+ onLostpointercapture: _cache[6] || (_cache[6] = //@ts-ignore
4020
+ (...args) => unref(onHuePointerUp) && unref(onHuePointerUp)(...args)),
4021
+ onPointerup: _cache[7] || (_cache[7] = //@ts-ignore
3989
4022
  (...args) => unref(onHuePointerUp) && unref(onHuePointerUp)(...args)),
3990
4023
  onKeydown: onHueKeyDown
3991
4024
  }, [
@@ -4005,7 +4038,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
4005
4038
  }
4006
4039
  });
4007
4040
 
4008
- const ColorPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__scopeId", "data-v-74392b20"]]);
4041
+ const ColorPicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__scopeId", "data-v-d2bb72e0"]]);
4009
4042
 
4010
4043
  const HEX_LENGTH_1 = 1;
4011
4044
  const HEX_LENGTH_2 = 2;
@@ -16301,15 +16334,16 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
16301
16334
  onPointerdown: unref(onPointerDown),
16302
16335
  onPointermove: withModifiers(unref(onPointerMove), ["prevent"]),
16303
16336
  onLostpointercapture: unref(onPointerUp),
16337
+ onPointerup: unref(onPointerUp),
16304
16338
  onKeydown,
16305
16339
  onDblclick: toggleMaximized
16306
- }, null, 8, ["number-of-handles", "handle-gap", "onPointerdown", "onPointermove", "onLostpointercapture"])
16340
+ }, null, 8, ["number-of-handles", "handle-gap", "onPointerdown", "onPointermove", "onLostpointercapture", "onPointerup"])
16307
16341
  ], 2);
16308
16342
  };
16309
16343
  }
16310
16344
  });
16311
16345
 
16312
- const KdsResizeContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__scopeId", "data-v-403e065b"]]);
16346
+ const KdsResizeContainer = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__scopeId", "data-v-46b33b01"]]);
16313
16347
 
16314
16348
  const CLICK_META_KEY_TIMEOUT = 250;
16315
16349
  const useMultiSelectListBoxSelection = ({
@@ -16559,7 +16593,9 @@ const useMultiSelectListBoxSelection = ({
16559
16593
  if (currentKeyNavIndex.value < 0) {
16560
16594
  currentKeyNavIndex.value = 0;
16561
16595
  }
16562
- setSelected([allValues.value[currentKeyNavIndex.value].id]);
16596
+ if (modelValue.value.length === 0) {
16597
+ setSelected([allValues.value[currentKeyNavIndex.value].id]);
16598
+ }
16563
16599
  }
16564
16600
  };
16565
16601
  const onBlur = () => {