@streamscloud/kit 0.92.1 → 0.93.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.
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">import { showInTopLayer } from '../_internal/top-layer';
2
2
  import { arrow as arrowMiddleware, autoUpdate, computePosition, flip, hide as hideMiddleware, offset, shift } from '@floating-ui/dom';
3
3
  import { tick } from 'svelte';
4
- const { text, placement = 'top', delay = 250, fillHeight = false, children } = $props();
4
+ const { text, placement = 'top', delay = 250, fillHeight = false, shrink = false, children } = $props();
5
5
  let triggerEl = $state.raw(undefined);
6
6
  let bubbleEl = $state.raw(undefined);
7
7
  let arrowEl = $state.raw(undefined);
@@ -71,6 +71,7 @@ $effect(() => () => {
71
71
  bind:this={triggerEl}
72
72
  class="tooltip"
73
73
  class:tooltip--fill-height={fillHeight}
74
+ class:tooltip--shrink={shrink}
74
75
  onmouseenter={show}
75
76
  onmouseleave={hide}
76
77
  onfocusin={show}
@@ -116,6 +117,10 @@ or plain text. Bubble flips and shifts on viewport collision; an arrow points to
116
117
  .tooltip--fill-height {
117
118
  block-size: 100%;
118
119
  }
120
+ .tooltip--shrink {
121
+ min-inline-size: 0;
122
+ max-inline-size: 100%;
123
+ }
119
124
  .tooltip__description {
120
125
  position: absolute;
121
126
  width: 1px;
@@ -9,6 +9,8 @@ type Props = {
9
9
  delay?: number;
10
10
  /** Stretch the trigger to the parent's full height (content stays vertically centered). @default false */
11
11
  fillHeight?: boolean;
12
+ /** Let the trigger shrink below its content width to fit its container, so an ellipsized child can truncate. */
13
+ shrink?: boolean;
12
14
  /**
13
15
  * Wrapped element — anything passed becomes the tooltip trigger (icon, button, link, plain text). Receives
14
16
  * `aria-describedby` pointing at the tooltip text: spread it onto an interactive trigger so screen readers announce the text.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.92.1",
3
+ "version": "0.93.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",