@invopop/popui 0.1.62 → 0.1.63
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/DataListItem.svelte +3 -3
- package/dist/data-table/cells/currency-cell.svelte +7 -3
- package/dist/data-table/cells/date-cell.svelte +7 -3
- package/dist/data-table/cells/tag-cell.svelte +2 -0
- package/dist/data-table/cells/text-cell.svelte +5 -1
- package/dist/data-table/cells/uuid-cell.svelte +14 -10
- package/dist/data-table/flex-render.svelte +8 -2
- package/package.json +1 -1
package/dist/DataListItem.svelte
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}: DataListItemProps = $props()
|
|
17
17
|
|
|
18
18
|
let valueStyles = $derived(
|
|
19
|
-
clsx('text-foreground font-medium text-base min-w-0', {
|
|
19
|
+
clsx('text-foreground font-medium text-base min-w-0 h-6 flex items-center', {
|
|
20
20
|
'font-mono slashed-zero tabular-nums lining-nums': monospaced,
|
|
21
21
|
truncate: !children
|
|
22
22
|
})
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
40
|
<div
|
|
41
|
-
class={clsx('flex
|
|
41
|
+
class={clsx('flex', {
|
|
42
42
|
'flex-col gap-1.5': vertical,
|
|
43
43
|
'gap-6 items-center': !vertical
|
|
44
44
|
})}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
56
56
|
<div
|
|
57
57
|
class={clsx(
|
|
58
|
-
'flex flex-1 gap-1.5 items-start group
|
|
58
|
+
'flex flex-1 gap-1.5 items-start group hover:bg-background-default-secondary py-1 pl-2 pr-1 rounded-md min-w-0 min-h-8',
|
|
59
59
|
{ 'cursor-pointer': clickAction }
|
|
60
60
|
)}
|
|
61
61
|
onclick={clickAction ? handleAreaClick : undefined}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
let { value, config }: { value: any; config?: CurrencyCellConfig } = $props()
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
8
|
+
{#if value != null && value !== ''}
|
|
9
|
+
<span class={cn('font-mono text-base text-foreground text-right block', config?.className)}>
|
|
10
|
+
{value}
|
|
11
|
+
</span>
|
|
12
|
+
{:else}
|
|
13
|
+
<span class="text-foreground-default-tertiary text-right block">-</span>
|
|
14
|
+
{/if}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
let { value, config }: { value: any; config?: DateCellConfig } = $props()
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
8
|
+
{#if value != null && value !== ''}
|
|
9
|
+
<span class={cn('font-mono text-base text-foreground', config?.className)}>
|
|
10
|
+
{value}
|
|
11
|
+
</span>
|
|
12
|
+
{:else}
|
|
13
|
+
<span class="text-foreground-default-tertiary">-</span>
|
|
14
|
+
{/if}
|
|
@@ -5,13 +5,17 @@
|
|
|
5
5
|
let { value, config }: { value: string; config?: UuidCellConfig } = $props()
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
{#if value != null && value !== ''}
|
|
9
|
+
<div class="relative z-0">
|
|
10
|
+
<ButtonUuidCopy
|
|
11
|
+
uuid={value}
|
|
12
|
+
prefixLength={config?.prefixLength}
|
|
13
|
+
suffixLength={config?.suffixLength}
|
|
14
|
+
full={config?.full}
|
|
15
|
+
disabled={config?.disabled}
|
|
16
|
+
oncopied={config?.onCopy}
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
{:else}
|
|
20
|
+
<span class="text-foreground-default-tertiary">-</span>
|
|
21
|
+
{/if}
|
|
@@ -23,7 +23,11 @@
|
|
|
23
23
|
</script>
|
|
24
24
|
|
|
25
25
|
{#if typeof content === 'string'}
|
|
26
|
-
{content}
|
|
26
|
+
{#if content}
|
|
27
|
+
{content}
|
|
28
|
+
{:else}
|
|
29
|
+
<span class="text-foreground-default-tertiary">-</span>
|
|
30
|
+
{/if}
|
|
27
31
|
{:else if content instanceof Function}
|
|
28
32
|
<!-- It's unlikely that a CellContext will be passed to a Header -->
|
|
29
33
|
<!-- eslint-disable-next-line @typescript-eslint/no-explicit-any -->
|
|
@@ -34,7 +38,9 @@
|
|
|
34
38
|
{:else if result instanceof RenderSnippetConfig}
|
|
35
39
|
{@const { snippet, params } = result}
|
|
36
40
|
{@render snippet({ ...params, attach })}
|
|
37
|
-
{:else}
|
|
41
|
+
{:else if result != null && result !== ''}
|
|
38
42
|
{result}
|
|
43
|
+
{:else}
|
|
44
|
+
<span class="text-foreground-default-tertiary">-</span>
|
|
39
45
|
{/if}
|
|
40
46
|
{/if}
|