@knime/kds-components 2.8.2 → 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,17 @@
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
+
3
15
  ## 2.8.2
4
16
 
5
17
  ### 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
  }
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 = {