@streamscloud/kit 0.10.6 → 0.10.7-1781472368663
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/ui/grid-card/fields/cmp.grid-card-actions-field.svelte +1 -1
- package/dist/ui/grid-card/fields/cmp.grid-card-actions-field.svelte.d.ts +2 -0
- package/dist/ui/grid-card/fields/cmp.grid-card-button.svelte +11 -4
- package/dist/ui/grid-card/fields/cmp.grid-card-button.svelte.d.ts +2 -0
- package/dist/ui/table/table-cells/table-by-cell.svelte +1 -0
- package/dist/ui/tooltip/cmp.tooltip.svelte +6 -1
- package/dist/ui/tooltip/cmp.tooltip.svelte.d.ts +2 -0
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ const { label, actions } = $props();
|
|
|
6
6
|
<GridCardField label={label}>
|
|
7
7
|
<div class="grid-card-actions-field">
|
|
8
8
|
{#each actions as action (action)}
|
|
9
|
-
<GridCardButton icon={action.icon} text={action.text} variant={action.variant} on={action.on} />
|
|
9
|
+
<GridCardButton icon={action.icon} text={action.text} ariaLabel={action.ariaLabel} variant={action.variant} on={action.on} />
|
|
10
10
|
{/each}
|
|
11
11
|
</div>
|
|
12
12
|
</GridCardField>
|
|
@@ -4,6 +4,8 @@ export type GridCardAction = {
|
|
|
4
4
|
/** Use the `{ src, color }` object form to tint the icon (e.g. `'danger'` for delete) without coloring the whole button. */
|
|
5
5
|
icon: IconProp;
|
|
6
6
|
text?: string;
|
|
7
|
+
/** Accessible name — required for text-less (icon-only) actions. */
|
|
8
|
+
ariaLabel?: string;
|
|
7
9
|
/** @default 'ghost' */
|
|
8
10
|
variant?: ButtonVariant;
|
|
9
11
|
on: {
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
<script lang="ts">import { Button } from '../../button';
|
|
2
|
-
const { icon, text, variant = 'ghost', on } = $props();
|
|
2
|
+
const { icon, text, ariaLabel, variant = 'ghost', on } = $props();
|
|
3
3
|
const handleClick = (e) => {
|
|
4
4
|
e.stopPropagation();
|
|
5
5
|
on.click(e);
|
|
6
6
|
};
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
+
{#snippet label()}{text}{/snippet}
|
|
10
|
+
|
|
9
11
|
<span class="grid-card-button">
|
|
10
|
-
<Button
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
<Button
|
|
13
|
+
type="button"
|
|
14
|
+
variant={variant}
|
|
15
|
+
icon={icon}
|
|
16
|
+
size="xs"
|
|
17
|
+
aria-label={ariaLabel ?? text}
|
|
18
|
+
children={text ? label : undefined}
|
|
19
|
+
on={{ click: handleClick }} />
|
|
13
20
|
</span>
|
|
14
21
|
|
|
15
22
|
<!--
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">import { arrow as arrowMiddleware, autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom';
|
|
2
2
|
import { tick } from 'svelte';
|
|
3
|
-
const { text, placement = 'top', delay = 250, children } = $props();
|
|
3
|
+
const { text, placement = 'top', delay = 250, fillHeight = false, children } = $props();
|
|
4
4
|
let triggerEl = $state.raw(undefined);
|
|
5
5
|
let bubbleEl = $state.raw(undefined);
|
|
6
6
|
let arrowEl = $state.raw(undefined);
|
|
@@ -65,6 +65,7 @@ $effect(() => () => {
|
|
|
65
65
|
<span
|
|
66
66
|
bind:this={triggerEl}
|
|
67
67
|
class="tooltip"
|
|
68
|
+
class:tooltip--fill-height={fillHeight}
|
|
68
69
|
aria-describedby={visible ? id : undefined}
|
|
69
70
|
onmouseenter={show}
|
|
70
71
|
onmouseleave={hide}
|
|
@@ -105,6 +106,10 @@ or plain text. Bubble flips and shifts on viewport collision; an arrow points to
|
|
|
105
106
|
|
|
106
107
|
<style>.tooltip {
|
|
107
108
|
display: inline-flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
}
|
|
111
|
+
.tooltip--fill-height {
|
|
112
|
+
block-size: 100%;
|
|
108
113
|
}
|
|
109
114
|
.tooltip__bubble {
|
|
110
115
|
--_tt--background: var(--sc-kit--tooltip--background, var(--sc-kit--color--bg--tooltip));
|
|
@@ -7,6 +7,8 @@ type Props = {
|
|
|
7
7
|
placement?: Placement;
|
|
8
8
|
/** Delay before show in ms. @default 250 */
|
|
9
9
|
delay?: number;
|
|
10
|
+
/** Stretch the trigger to the parent's full height (content stays vertically centered). @default false */
|
|
11
|
+
fillHeight?: boolean;
|
|
10
12
|
/** Wrapped element — anything passed becomes the tooltip trigger (icon, button, link, plain text). */
|
|
11
13
|
children: Snippet;
|
|
12
14
|
};
|