@invopop/popui 0.1.27 → 0.1.29

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.
@@ -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>
@@ -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>
@@ -15,7 +15,7 @@
15
15
  bind:this={ref}
16
16
  data-slot="table-cell"
17
17
  class={cn(
18
- 'py-[9.5px] pl-3 pr-3 align-middle text-foreground font-normal text-base [&:has([role=menu])]:pl-1 relative z-1 border-b border-border',
18
+ 'py-[9.5px] [&:has([role=menu])]:py-[5px] pl-3 pr-3 align-middle text-foreground font-normal text-base [&:has([role=menu])]:pl-1 relative z-1 border-b border-border',
19
19
  className
20
20
  )}
21
21
  onclick={bubble('click')}
@@ -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.27",
4
+ "version": "0.1.29",
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",