@invopop/popui 0.1.61 → 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.
@@ -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 group', {
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 items-start group-hover:bg-background-default-secondary py-1 pl-2 pr-1 rounded-md min-w-0 min-h-8',
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
- <span class={cn('font-mono text-base text-foreground text-right block', config?.className)}>
9
- {value}
10
- </span>
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
- <span class={cn('font-mono text-base text-foreground', config?.className)}>
9
- {value}
10
- </span>
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}
@@ -9,4 +9,6 @@
9
9
 
10
10
  {#if option}
11
11
  <TagStatus label={option.label} status={option.color} dot={config.showDot ?? false} />
12
+ {:else if value == null || value === ''}
13
+ <span class="text-foreground-default-tertiary">-</span>
12
14
  {/if}
@@ -6,5 +6,9 @@
6
6
  </script>
7
7
 
8
8
  <div class={cn('truncate', config?.className)}>
9
- {value}
9
+ {#if value != null && value !== ''}
10
+ {value}
11
+ {:else}
12
+ <span class="text-foreground-default-tertiary">-</span>
13
+ {/if}
10
14
  </div>
@@ -5,13 +5,17 @@
5
5
  let { value, config }: { value: string; config?: UuidCellConfig } = $props()
6
6
  </script>
7
7
 
8
- <div class="relative z-0">
9
- <ButtonUuidCopy
10
- uuid={value}
11
- prefixLength={config?.prefixLength}
12
- suffixLength={config?.suffixLength}
13
- full={config?.full}
14
- disabled={config?.disabled}
15
- oncopied={config?.onCopy}
16
- />
17
- </div>
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}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.61",
4
+ "version": "0.1.63",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },