@invopop/popui 0.1.28 → 0.1.30

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.
@@ -36,7 +36,7 @@
36
36
  class="flex items-center gap-2 px-[5px] py-0.5 rounded bg-background-default-secondary border border-border"
37
37
  >
38
38
  <span
39
- class="font-medium text-xs leading-4 text-foreground-default-tertiary whitespace-nowrap"
39
+ class="font-medium text-sm leading-4 text-foreground-default-tertiary whitespace-nowrap"
40
40
  >
41
41
  Soon
42
42
  </span>
@@ -6,7 +6,7 @@
6
6
 
7
7
  let styles = $derived(
8
8
  clsx(
9
- 'inline-flex items-center justify-center rounded px-[3px] pb-[1.5px] pt-[2.5px] font-mono font-medium text-xs leading-none',
9
+ 'inline-flex items-center justify-center rounded px-[3px] pb-[1.5px] pt-[2.5px] font-mono font-medium text-sm leading-none',
10
10
  {
11
11
  'bg-background-default-tertiary text-foreground': theme === 'light',
12
12
  'bg-background-accent text-foreground-inverse': theme === 'accent',
@@ -1,10 +1,12 @@
1
1
  <script lang="ts">
2
+ import 'flag-icons/css/flag-icons.min.css'
2
3
  import type { BaseFlagProps } from './types'
3
4
 
4
- let { country = '', width = 12 }: BaseFlagProps = $props()
5
+ let { country = '' }: BaseFlagProps = $props()
5
6
 
6
7
  let iso = $derived(country.toLowerCase())
7
8
  </script>
8
9
 
9
- <!-- https://github.com/HatScripts/circle-flags -->
10
- <img src={`https://hatscripts.github.io/circle-flags/flags/${iso}.svg`} alt={country} {width} />
10
+ <div class="w-3.5 h-2.5 rounded-[1.5px] overflow-hidden flex items-center justify-center">
11
+ <span class="fi fi-{country.toLocaleLowerCase()} text-[14px] leading-none"></span>
12
+ </div>
@@ -1,3 +1,4 @@
1
+ import 'flag-icons/css/flag-icons.min.css';
1
2
  import type { BaseFlagProps } from './types';
2
3
  declare const BaseFlag: import("svelte").Component<BaseFlagProps, {}, "">;
3
4
  type BaseFlag = ReturnType<typeof BaseFlag>;
@@ -24,7 +24,7 @@
24
24
  <span class="flex items-center gap-2" class:justify-end={field.rightAlign}>
25
25
  {#if field.isCountry && data}
26
26
  <span class="flex items-center space-x-1">
27
- <BaseFlag country={String(data)} width={16} />
27
+ <BaseFlag country={String(data)} />
28
28
  <span>{getCountryName(String(data))}</span>
29
29
  </span>
30
30
  {:else if field.copy && data}
@@ -35,6 +35,6 @@
35
35
  </span>
36
36
  {/if}
37
37
  {#if breadcrumb.country}
38
- <BaseFlag country={breadcrumb.country} width={14} />
38
+ <BaseFlag country={breadcrumb.country} />
39
39
  {/if}
40
40
  </li>
@@ -18,7 +18,7 @@
18
18
 
19
19
  let fileAvatarStyles = $derived(
20
20
  cn(
21
- 'size-8 rounded-md border border-border flex items-center justify-center text-xs font-black font-mono leading-4 uppercase',
21
+ 'size-8 rounded-md border border-border flex items-center justify-center text-sm font-black font-mono leading-4 uppercase',
22
22
  {
23
23
  'text-foreground-document-pdf': fileType === 'pdf',
24
24
  'text-foreground-document-xml': fileType === 'xml',
@@ -55,7 +55,7 @@
55
55
  <div class="text-sm font-medium text-foreground truncate w-full">
56
56
  {name}
57
57
  </div>
58
- <div class="text-xs text-foreground-default-secondary truncate w-full">
58
+ <div class="text-sm text-foreground-default-secondary truncate w-full">
59
59
  {date}
60
60
  </div>
61
61
  </div>
@@ -71,20 +71,16 @@
71
71
  class="w-4 h-4 {item.destructive ? 'text-icon-critical' : item.iconClass || 'text-icon'}"
72
72
  />
73
73
  {/if}
74
- <div class="whitespace-nowrap flex-1 text-left flex flex-col truncate" {title}>
75
- <span class="flex items-center space-x-1.5">
76
- {#if item.color}
77
- <TagStatus status={item.color} dot />
78
- {/if}
79
- <span class="{labelStyles} text-base font-medium truncate">{item.label}</span>
80
- </span>
74
+ <div class="whitespace-nowrap flex-1 text-left flex items-center space-x-1.5 truncate" {title}>
75
+ {#if item.color}
76
+ <TagStatus status={item.color} dot />
77
+ {/if}
78
+ <span class="{labelStyles} text-base font-medium truncate">{item.label}</span>
81
79
 
82
80
  {#if item.country}
83
- <span class="flex space-x-1 items-center">
84
- <BaseFlag country={item.country} width={10} />
85
- <span class="text-sm text-foreground-default-secondary">
86
- {getCountryName(item.country)}
87
- </span>
81
+ <BaseFlag country={item.country} />
82
+ <span class="text-xs font-medium text-foreground-default-secondary uppercase">
83
+ {item.country}
88
84
  </span>
89
85
  {/if}
90
86
  </div>
@@ -6,7 +6,7 @@
6
6
  let { errorText = '' }: InputErrorProps = $props()
7
7
  </script>
8
8
 
9
- <p class="flex items-center gap-1 text-xs text-foreground-critical">
9
+ <p class="flex items-center gap-1 text-sm text-foreground-critical">
10
10
  <Icon src={Alert} class="size-3 shrink-0" />
11
11
  <span>{errorText}</span>
12
12
  </p>
@@ -82,7 +82,7 @@
82
82
  <div class="absolute right-2 flex items-center gap-1">
83
83
  {#each shortcutKeys as key}
84
84
  <ShortcutWrapper>
85
- <span class="text-xs font-semibold">{key}</span>
85
+ <span class="text-sm font-semibold">{key}</span>
86
86
  </ShortcutWrapper>
87
87
  {/each}
88
88
  </div>
@@ -4,7 +4,7 @@
4
4
  >
5
5
  <div class="border-[0.5px] border-white-60 rounded-[3px] relative shrink-0">
6
6
  <div class="flex gap-2 items-start overflow-hidden px-1 py-px rounded-[inherit]">
7
- <span class="font-medium text-xs leading-4 text-white whitespace-nowrap">Beta</span>
7
+ <span class="font-medium text-sm leading-4 text-white whitespace-nowrap">Beta</span>
8
8
  </div>
9
9
  </div>
10
10
  <div class="absolute h-5 left-0 right-0 top-0 pointer-events-none">
@@ -5,7 +5,7 @@
5
5
  let { label = '', status = 'grey', dot = false }: TagStatusProps = $props()
6
6
 
7
7
  let tagStyles = $derived(
8
- clsx('rounded inline-flex items-center text-xs font-medium gap-1 box-border leading-4 py-0.5', {
8
+ clsx('rounded inline-flex items-center text-sm font-medium gap-1 box-border leading-4 py-0.5', {
9
9
  'bg-background-status-paid text-foreground-status-paid': status === 'green',
10
10
  'bg-background-status-processing text-foreground-status-processing': status === 'yellow',
11
11
  'bg-background-status-error text-foreground-status-error': status === 'red',
@@ -33,7 +33,7 @@
33
33
  // Default text color
34
34
  'text-foreground-default-primary',
35
35
  // inner spans
36
- '[&>span]:text-xs [&>span]:opacity-70',
36
+ '[&>span]:text-sm [&>span]:opacity-70',
37
37
  className
38
38
  )}
39
39
  {...restProps}
@@ -11,7 +11,7 @@
11
11
  <RangeCalendarPrimitive.HeadCell
12
12
  bind:ref
13
13
  class={cn(
14
- 'text-foreground-default-tertiary w-(--cell-size) h-(--cell-size) text-xs font-normal border-b border-border flex items-center justify-center',
14
+ 'text-foreground-default-tertiary w-(--cell-size) h-(--cell-size) text-sm font-normal border-b border-border flex items-center justify-center',
15
15
  className
16
16
  )}
17
17
  {...restProps}
@@ -18,7 +18,7 @@
18
18
  title: 'font-medium text-base text-foreground-inverse',
19
19
  description: 'font-normal text-base text-foreground-inverse-secondary',
20
20
  actionButton:
21
- 'bg-background-selected-inverse rounded px-2 py-1 text-xs font-medium text-foreground-inverse hover:bg-background-selected-inverse-hover transition-colors',
21
+ 'bg-background-selected-inverse rounded px-2 py-1 text-sm font-medium text-foreground-inverse hover:bg-background-selected-inverse-hover transition-colors',
22
22
  closeButton: 'hidden'
23
23
  }
24
24
  }}
@@ -821,6 +821,10 @@
821
821
  --text-sm: 12px;
822
822
  --text-sm--line-height: 16px;
823
823
  --text-sm--letter-spacing: var(--tracking-wide);
824
+
825
+ --text-xs: 10px;
826
+ --text-xs--line-height: 12px;
827
+ --text-xs--letter-spacing: var(--tracking-wide);
824
828
  }
825
829
 
826
830
  @layer theme {
package/dist/types.d.ts CHANGED
@@ -195,7 +195,6 @@ export interface BaseDropdownProps {
195
195
  }
196
196
  export interface BaseFlagProps {
197
197
  country?: string;
198
- width?: number;
199
198
  }
200
199
  export interface BaseTableProps {
201
200
  sortBy?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.28",
4
+ "version": "0.1.30",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "dev:clean": "npm run clean && vite dev",
@@ -91,6 +91,7 @@
91
91
  "clsx": "^2.0.0",
92
92
  "date-fns": "^2.30.0",
93
93
  "dayjs": "^1.11.10",
94
+ "flag-icons": "^7.5.0",
94
95
  "flatpickr": "^4.6.13",
95
96
  "inter-ui": "^3.19.3",
96
97
  "lodash-es": "^4.17.21",