@juspay/svelte-ui-components 2.89.0 → 2.89.1
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.
|
@@ -551,6 +551,7 @@
|
|
|
551
551
|
white-space: nowrap;
|
|
552
552
|
overflow: hidden;
|
|
553
553
|
text-overflow: ellipsis;
|
|
554
|
+
text-align: var(--select-value-align, left);
|
|
554
555
|
}
|
|
555
556
|
|
|
556
557
|
.select-placeholder {
|
|
@@ -559,6 +560,7 @@
|
|
|
559
560
|
white-space: nowrap;
|
|
560
561
|
overflow: hidden;
|
|
561
562
|
text-overflow: ellipsis;
|
|
563
|
+
text-align: var(--select-value-align, left);
|
|
562
564
|
}
|
|
563
565
|
|
|
564
566
|
.select-search {
|
package/dist/Table/Table.svelte
CHANGED
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
onSearchChange,
|
|
50
50
|
pagination,
|
|
51
51
|
toolbarSlot,
|
|
52
|
-
rowNumberColumn = false
|
|
52
|
+
rowNumberColumn = false,
|
|
53
|
+
rowNumberLabel = '#',
|
|
54
|
+
headerTooltipIcon,
|
|
55
|
+
headerTooltipPosition
|
|
53
56
|
}: TableProperties = $props();
|
|
54
57
|
|
|
55
58
|
// ─── Keyed column model → positional projection ─────────────────────────────
|
|
@@ -612,7 +615,7 @@
|
|
|
612
615
|
{/if}
|
|
613
616
|
{#if rowNumberColumn}
|
|
614
617
|
<th class="table-header table-row-number-col" class:table-header-sticky={isStickyHeader}
|
|
615
|
-
|
|
618
|
+
>{rowNumberLabel}</th
|
|
616
619
|
>
|
|
617
620
|
{/if}
|
|
618
621
|
{#each effectiveHeaders as header, colIndex (colIndex)}
|
|
@@ -633,8 +636,16 @@
|
|
|
633
636
|
: null}
|
|
634
637
|
>
|
|
635
638
|
{#if headerColumn?.tooltip}
|
|
636
|
-
<Tooltip
|
|
637
|
-
|
|
639
|
+
<Tooltip
|
|
640
|
+
text={headerColumn.tooltip}
|
|
641
|
+
position={headerTooltipPosition}
|
|
642
|
+
icon={headerTooltipIcon}
|
|
643
|
+
iconPosition="trailing"
|
|
644
|
+
>
|
|
645
|
+
<span
|
|
646
|
+
class="table-header-label"
|
|
647
|
+
class:table-header-label-plain={headerTooltipIcon}>{header}</span
|
|
648
|
+
>
|
|
638
649
|
</Tooltip>
|
|
639
650
|
{:else}
|
|
640
651
|
{header}
|
|
@@ -990,12 +1001,14 @@
|
|
|
990
1001
|
letter-spacing: var(--table-header-letter-spacing, 0.02em);
|
|
991
1002
|
text-transform: var(--table-header-text-transform);
|
|
992
1003
|
color: var(--table-header-color, var(--table-header-font-color, #6b7280));
|
|
1004
|
+
border-bottom: var(--table-header-border, var(--table-inner-border, none));
|
|
993
1005
|
}
|
|
994
1006
|
|
|
995
1007
|
.table-header-content {
|
|
996
1008
|
display: flex;
|
|
997
1009
|
align-items: center;
|
|
998
1010
|
gap: 4px;
|
|
1011
|
+
justify-content: var(--table-header-justify, flex-start);
|
|
999
1012
|
}
|
|
1000
1013
|
|
|
1001
1014
|
.table-header-label {
|
|
@@ -1004,6 +1017,10 @@
|
|
|
1004
1017
|
cursor: help;
|
|
1005
1018
|
}
|
|
1006
1019
|
|
|
1020
|
+
.table-header-label-plain {
|
|
1021
|
+
text-decoration: none;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1007
1024
|
.table-header-filter {
|
|
1008
1025
|
display: inline-flex;
|
|
1009
1026
|
align-items: center;
|
|
@@ -1256,6 +1273,7 @@
|
|
|
1256
1273
|
width: var(--table-row-number-col-width, 48px);
|
|
1257
1274
|
color: var(--table-row-number-color, #6b7280);
|
|
1258
1275
|
font-variant-numeric: tabular-nums;
|
|
1276
|
+
text-align: var(--table-row-number-align, var(--table-text-align, left));
|
|
1259
1277
|
}
|
|
1260
1278
|
|
|
1261
1279
|
/* ── Accessibility ──────────────────────────────────────────────────────── */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { JSONValue } from 'type-decoder';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { TooltipPosition } from '../Tooltip/properties';
|
|
3
4
|
export type SortDirection = 'asc' | 'desc';
|
|
4
5
|
/**
|
|
5
6
|
* Built-in cell renderer vocabulary for the keyed column model.
|
|
@@ -335,6 +336,16 @@ export type OptionalTableProperties = {
|
|
|
335
336
|
}]>;
|
|
336
337
|
/** Prepends a sequential row-number column (1-based, pagination-aware). */
|
|
337
338
|
rowNumberColumn?: boolean;
|
|
339
|
+
/** Header label for the row-number column. Defaults to `'#'`. */
|
|
340
|
+
rowNumberLabel?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Icon snippet shown after each header label that has a `tooltip` — the
|
|
343
|
+
* consumer supplies the glyph; the table places it trailing inside the tooltip
|
|
344
|
+
* trigger. When set, the default underline affordance on those labels is dropped.
|
|
345
|
+
*/
|
|
346
|
+
headerTooltipIcon?: Snippet;
|
|
347
|
+
/** Placement of every header tooltip bubble. Defaults to `'top'`. */
|
|
348
|
+
headerTooltipPosition?: TooltipPosition;
|
|
338
349
|
sortable?: boolean;
|
|
339
350
|
sortableColumns?: number[];
|
|
340
351
|
stickyHeader?: boolean;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
classes,
|
|
12
12
|
children,
|
|
13
13
|
icon,
|
|
14
|
+
iconPosition = 'leading',
|
|
14
15
|
content,
|
|
15
16
|
usePortal = false
|
|
16
17
|
}: TooltipProperties = $props();
|
|
@@ -355,10 +356,13 @@
|
|
|
355
356
|
onfocusout={hideTooltip}
|
|
356
357
|
data-pw={testId}
|
|
357
358
|
>
|
|
358
|
-
{#if typeof icon === 'function'}
|
|
359
|
+
{#if typeof icon === 'function' && iconPosition === 'leading'}
|
|
359
360
|
<span class="tooltip-icon" aria-hidden="true">{@render icon()}</span>
|
|
360
361
|
{/if}
|
|
361
362
|
{@render children()}
|
|
363
|
+
{#if typeof icon === 'function' && iconPosition === 'trailing'}
|
|
364
|
+
<span class="tooltip-icon" aria-hidden="true">{@render icon()}</span>
|
|
365
|
+
{/if}
|
|
362
366
|
{#if visible && !usePortal}
|
|
363
367
|
<div
|
|
364
368
|
use:clampInlineBubble
|
|
@@ -9,8 +9,10 @@ export type OptionalTooltipProperties = {
|
|
|
9
9
|
delay?: number;
|
|
10
10
|
testId?: string | null;
|
|
11
11
|
classes?: string;
|
|
12
|
-
/** Snippet rendered as
|
|
12
|
+
/** Snippet rendered as an icon in the trigger wrapper, beside the content. No default glyph is provided — consumers supply their own. Placement is controlled by `iconPosition`. */
|
|
13
13
|
icon?: Snippet;
|
|
14
|
+
/** Which side of the trigger content the `icon` sits on. Defaults to `'leading'`. */
|
|
15
|
+
iconPosition?: 'leading' | 'trailing';
|
|
14
16
|
/** Snippet rendered as the bubble body. When provided, replaces the plain `text` string inside the tooltip bubble. */
|
|
15
17
|
content?: Snippet;
|
|
16
18
|
/**
|