@knime/kds-components 2.8.1 → 2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @knime/kds-components
2
2
 
3
+ ## 2.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 216447a: - **KdsDataType**: Derive tooltip title from icon name when no `iconTitle` prop is passed (e.g. `string-datatype` → "String Datatype"), instead of defaulting to "Unknown Data Type"
8
+ - **vKdsTooltip CSS**: Add horizontal `position-try-fallbacks` (`top-left`, `top-right`, `bottom-left`, `bottom-right`) so tooltips shift horizontally when centered positioning would overflow the viewport edge
9
+ - **vKdsTooltip stories**: Add `NearScreenEdge` story demonstrating edge-overflow fallback behavior
10
+
11
+ ### Patch Changes
12
+
13
+ - @knime/kds-styles@2.9.0
14
+
15
+ ## 2.8.2
16
+
17
+ ### Patch Changes
18
+
19
+ - 472a350: `KdsModal` no longer tears itself down when it is closed and quickly re-opened before its close animation finishes, so a modal re-opened via `useKdsDynamicModal` during that window now renders correctly.
20
+ - @knime/kds-styles@2.8.2
21
+
3
22
  ## 2.8.1
4
23
 
5
24
  ### Patch Changes
package/dist/KdsIcon.css CHANGED
@@ -6,7 +6,9 @@
6
6
  margin: var(--kds-spacing-container-0-25x) 0
7
7
  var(--kds-spacing-container-0-25x) 0;
8
8
  position-try-fallbacks:
9
- --kds-tooltip-try-bottom-center, --kds-tooltip-try-top-center;
9
+ --kds-tooltip-try-bottom-center, --kds-tooltip-try-top-left,
10
+ --kds-tooltip-try-top-right, --kds-tooltip-try-bottom-left,
11
+ --kds-tooltip-try-bottom-right;
10
12
  font: var(--kds-font-base-subtext-small);
11
13
  color: var(--kds-color-tooltip-text-and-icon-neutral);
12
14
  overflow-wrap: anywhere;
@@ -19,15 +21,45 @@
19
21
 
20
22
  @position-try --kds-tooltip-try-top-center {
21
23
  inset: auto auto anchor(top);
24
+ justify-self: anchor-center;
22
25
  margin: var(--kds-spacing-container-0-25x) 0
23
26
  var(--kds-spacing-container-0-25x) 0;
24
27
  }
25
28
 
26
29
  @position-try --kds-tooltip-try-bottom-center {
27
30
  inset: anchor(bottom) auto auto;
31
+ justify-self: anchor-center;
32
+ margin: var(--kds-spacing-container-0-25x) 0
33
+ var(--kds-spacing-container-0-25x) 0;
34
+ }
35
+
36
+ @position-try --kds-tooltip-try-top-left {
37
+ inset: auto auto anchor(top) anchor(left);
38
+ justify-self: anchor-right;
39
+ margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)
40
+ var(--kds-spacing-container-0-25x) 0;
41
+ }
42
+
43
+ @position-try --kds-tooltip-try-top-right {
44
+ inset: auto anchor(right) anchor(top) auto;
45
+ justify-self: anchor-left;
28
46
  margin: var(--kds-spacing-container-0-25x) 0
47
+ var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);
48
+ }
49
+
50
+ @position-try --kds-tooltip-try-bottom-left {
51
+ inset: anchor(bottom) auto auto anchor(left);
52
+ justify-self: anchor-right;
53
+ margin: var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x)
29
54
  var(--kds-spacing-container-0-25x) 0;
30
55
  }
56
+
57
+ @position-try --kds-tooltip-try-bottom-right {
58
+ inset: anchor(bottom) anchor(right) auto auto;
59
+ justify-self: anchor-left;
60
+ margin: var(--kds-spacing-container-0-25x) 0
61
+ var(--kds-spacing-container-0-25x) var(--kds-spacing-container-0-25x);
62
+ }
31
63
  .kds-icon {
32
64
  &[data-v-c1a42494] {
33
65
  --icon-width: var(--kds-dimension-icon-1x);
package/dist/index.css CHANGED
@@ -116,7 +116,7 @@
116
116
  }
117
117
  }
118
118
  .kds-icon {
119
- &[data-v-c908ab99] {
119
+ &[data-v-b85206a7] {
120
120
  --icon-width: var(--kds-dimension-icon-1x);
121
121
  --icon-height: var(--kds-dimension-icon-1x);
122
122
  --icon-stroke-width: var(--kds-border-width-icon-stroke-m);
@@ -130,24 +130,24 @@
130
130
  vertical-align: middle;
131
131
  stroke-width: var(--icon-stroke-width);
132
132
  }
133
- &.xsmall[data-v-c908ab99] {
133
+ &.xsmall[data-v-b85206a7] {
134
134
  --icon-width: var(--kds-dimension-icon-0-56x);
135
135
  --icon-height: var(--kds-dimension-icon-0-56x);
136
136
  --icon-stroke-width: var(--kds-border-width-icon-stroke-s);
137
137
  }
138
- &.small[data-v-c908ab99] {
138
+ &.small[data-v-b85206a7] {
139
139
  --icon-width: var(--kds-dimension-icon-0-75x);
140
140
  --icon-height: var(--kds-dimension-icon-0-75x);
141
141
  --icon-stroke-width: var(--kds-border-width-icon-stroke-s);
142
142
  }
143
- &.large[data-v-c908ab99] {
143
+ &.large[data-v-b85206a7] {
144
144
  --icon-width: var(--kds-dimension-icon-1-25x);
145
145
  --icon-height: var(--kds-dimension-icon-1-25x);
146
146
  --icon-stroke-width: var(--kds-border-width-icon-stroke-l);
147
147
  }
148
148
  }
149
149
  .kds-data-type-icon-container {
150
- &[data-v-c908ab99] {
150
+ &[data-v-b85206a7] {
151
151
  --data-type-height: var(--kds-dimension-component-height-1x);
152
152
  --data-type-width: var(--kds-dimension-component-width-1x);
153
153
  --data-type-padding: var(--kds-spacing-container-0-12x);
@@ -165,23 +165,23 @@
165
165
 
166
166
  /* The kds-data-type-icon class is needed to increase the specificity to overwrite the icon-stroke-width */
167
167
  }
168
- &.disabled[data-v-c908ab99] {
168
+ &.disabled[data-v-b85206a7] {
169
169
  color: var(--kds-color-text-and-icon-disabled);
170
170
  }
171
- &.small[data-v-c908ab99] {
171
+ &.small[data-v-b85206a7] {
172
172
  --data-type-height: var(--kds-dimension-icon-0-75x);
173
173
  --data-type-width: var(--kds-dimension-icon-0-75x);
174
174
  --data-type-padding: var(--kds-spacing-container-none);
175
175
  }
176
- &.large[data-v-c908ab99] {
176
+ &.large[data-v-b85206a7] {
177
177
  --data-type-height: var(--kds-dimension-component-height-1-25x);
178
178
  --data-type-width: var(--kds-dimension-component-width-1-25x);
179
179
  }
180
180
  & .kds-icon.kds-data-type-icon {
181
- &.small[data-v-c908ab99] {
181
+ &.small[data-v-b85206a7] {
182
182
  --icon-stroke-width: var(--kds-border-width-icon-stroke-m);
183
183
  }
184
- &.medium[data-v-c908ab99] {
184
+ &.medium[data-v-b85206a7] {
185
185
  --icon-stroke-width: var(--kds-border-width-icon-stroke-l);
186
186
  }
187
187
  }
@@ -856,7 +856,7 @@ body:has(dialog.modal[open]) {
856
856
  }
857
857
 
858
858
  .kds-modal {
859
- &[data-v-a56c7085] {
859
+ &[data-v-9c8c5863] {
860
860
  /* rule is broken it complains about local variables for no reason */
861
861
  /* stylelint-disable no-unknown-custom-properties */
862
862
  --modal-full-size: 95%;
@@ -868,7 +868,7 @@ body:has(dialog.modal[open]) {
868
868
  height: var(--modal-height);
869
869
  max-height: var(--modal-full-size);
870
870
  padding: 0;
871
- overflow: var(--v366b75ef);
871
+ overflow: var(--v6770010d);
872
872
  font: var(--kds-font-base-body-small);
873
873
  color: var(--kds-color-text-and-icon-neutral);
874
874
  background-color: var(--kds-color-surface-default);
@@ -885,55 +885,55 @@ body:has(dialog.modal[open]) {
885
885
 
886
886
  /* hide if its not open */
887
887
  }
888
- &.width-small[data-v-a56c7085] {
888
+ &.width-small[data-v-9c8c5863] {
889
889
  --modal-width: var(--kds-dimension-component-width-25x);
890
890
  --modal-animation-time: 100ms;
891
891
  --modal-scale-base: 0.85;
892
892
  }
893
- &.width-medium[data-v-a56c7085] {
893
+ &.width-medium[data-v-9c8c5863] {
894
894
  --modal-width: var(--kds-dimension-component-width-32x);
895
895
  --modal-animation-time: 140ms;
896
896
  --modal-scale-base: 0.88;
897
897
  }
898
- &.width-large[data-v-a56c7085] {
898
+ &.width-large[data-v-9c8c5863] {
899
899
  --modal-width: var(--kds-dimension-component-width-45x);
900
900
  --modal-animation-time: 210ms;
901
901
  --modal-scale-base: 0.88;
902
902
  }
903
- &.width-xlarge[data-v-a56c7085] {
903
+ &.width-xlarge[data-v-9c8c5863] {
904
904
  --modal-width: var(--kds-dimension-component-width-61x);
905
905
  --modal-animation-time: 300ms;
906
906
  --modal-scale-base: 0.88;
907
907
  }
908
- &.width-full[data-v-a56c7085] {
908
+ &.width-full[data-v-9c8c5863] {
909
909
  --modal-width: var(--modal-full-size);
910
910
  --modal-animation-time: 350ms;
911
911
  --modal-scale-base: 0.92;
912
912
  }
913
- &.height-full[data-v-a56c7085] {
913
+ &.height-full[data-v-9c8c5863] {
914
914
  --modal-height: var(--modal-full-size);
915
915
  }
916
- &.height-auto[data-v-a56c7085] {
916
+ &.height-auto[data-v-9c8c5863] {
917
917
  --modal-height: fit-content;
918
918
  }
919
- &[data-v-a56c7085]:not([open]) {
919
+ &[data-v-9c8c5863]:not([open]) {
920
920
  display: none;
921
921
  }
922
- &[data-v-a56c7085]:focus-visible {
922
+ &[data-v-9c8c5863]:focus-visible {
923
923
  outline: var(--kds-border-action-focused);
924
924
  outline-offset: var(--kds-spacing-offset-focus);
925
925
  }
926
- &[data-v-a56c7085]::backdrop {
926
+ &[data-v-9c8c5863]::backdrop {
927
927
  background: var(--kds-color-blanket-default);
928
928
  opacity: 0;
929
929
  transition: var(--modal-animation-time) allow-discrete;
930
930
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
931
931
  transition-property: display, opacity, overlay;
932
932
  }
933
- &[open][data-v-a56c7085]::backdrop {
933
+ &[open][data-v-9c8c5863]::backdrop {
934
934
  opacity: 1;
935
935
  }
936
- &[open][data-v-a56c7085] {
936
+ &[open][data-v-9c8c5863] {
937
937
  opacity: 1;
938
938
  transform: scale(1);
939
939
  }
@@ -942,18 +942,18 @@ body:has(dialog.modal[open]) {
942
942
  /** Animation starting styles */
943
943
  @starting-style {
944
944
  .kds-modal {
945
- &[data-v-a56c7085] {
945
+ &[data-v-9c8c5863] {
946
946
  opacity: 1;
947
947
  transform: scale(1);
948
948
  }
949
- &[open][data-v-a56c7085] {
949
+ &[open][data-v-9c8c5863] {
950
950
  opacity: 0;
951
951
  transform: scale(var(--modal-scale-base));
952
952
  }
953
- &[data-v-a56c7085]::backdrop {
953
+ &[data-v-9c8c5863]::backdrop {
954
954
  opacity: 1;
955
955
  }
956
- &[open][data-v-a56c7085]::backdrop {
956
+ &[open][data-v-9c8c5863]::backdrop {
957
957
  opacity: 0;
958
958
  }
959
959
  }
package/dist/index.js CHANGED
@@ -490,7 +490,7 @@ var KdsDataType_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
490
490
  __name: "KdsDataType",
491
491
  props: {
492
492
  iconName: { default: "unknown-datatype" },
493
- iconTitle: { default: "Unknown Data Type" },
493
+ iconTitle: {},
494
494
  size: { default: "medium" },
495
495
  disabled: {
496
496
  type: Boolean,
@@ -511,6 +511,8 @@ var KdsDataType_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
511
511
  if (isTypeId(__props.iconName)) return ID_TO_ICON_MAP[__props.iconName];
512
512
  return __props.iconName.startsWith("org.knime") ? "default-extension-datatype" : "unknown-datatype";
513
513
  });
514
+ const derivedTitle = computed(() => iconName.value.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" "));
515
+ const resolvedTitle = computed(() => __props.iconTitle ?? derivedTitle.value);
514
516
  const { iconComponent, status } = useIcon({
515
517
  name: iconName,
516
518
  folder: "type-icons"
@@ -540,10 +542,10 @@ var KdsDataType_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
540
542
  ]),
541
543
  "aria-hidden": "true",
542
544
  focusable: "false"
543
- }, null, 8, ["class"]))], 10, _hoisted_1$77)), [[unref(vKdsTooltip), __props.iconTitle]]);
545
+ }, null, 8, ["class"]))], 10, _hoisted_1$77)), [[unref(vKdsTooltip), resolvedTitle.value]]);
544
546
  };
545
547
  }
546
- }), [["__scopeId", "data-v-c908ab99"]]);
548
+ }), [["__scopeId", "data-v-b85206a7"]]);
547
549
  //#endregion
548
550
  //#region src/components/accessories/Badge/enums.ts
549
551
  var kdsBadgeVariant = {
@@ -10108,7 +10110,7 @@ var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
10108
10110
  },
10109
10111
  emits: ["close", "closed"],
10110
10112
  setup(__props, { emit: __emit }) {
10111
- useCssVars((_ctx) => ({ "v366b75ef": _ctx.overflow }));
10113
+ useCssVars((_ctx) => ({ "v6770010d": _ctx.overflow }));
10112
10114
  const emit = __emit;
10113
10115
  const dialog = useTemplateRef("dialogElement");
10114
10116
  const onClose = (event) => {
@@ -10122,7 +10124,7 @@ var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
10122
10124
  }, { immediate: true });
10123
10125
  const renderDialog = ref(__props.active);
10124
10126
  const removeDialog = () => {
10125
- if (!renderDialog.value) return;
10127
+ if (!renderDialog.value || __props.active) return;
10126
10128
  renderDialog.value = false;
10127
10129
  emit("closed");
10128
10130
  };
@@ -10176,7 +10178,7 @@ var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
10176
10178
  ])], true)], 42, _hoisted_1$66)) : createCommentVNode("", true);
10177
10179
  };
10178
10180
  }
10179
- }), [["__scopeId", "data-v-a56c7085"]]);
10181
+ }), [["__scopeId", "data-v-9c8c5863"]]);
10180
10182
  //#endregion
10181
10183
  //#region src/components/forms/_helper/KdsSubText.vue?vue&type=script&setup=true&lang.ts
10182
10184
  var _hoisted_1$65 = ["id"];