@invopop/popui 0.1.78 → 0.1.79

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,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { Icon } from '@steeze-ui/svelte-icon'
3
- import { Search, Slash } from '@invopop/ui-icons'
3
+ import { Search, Command } from '@invopop/ui-icons'
4
4
  import { onDestroy, onMount } from 'svelte'
5
5
  import clsx from 'clsx'
6
6
  import ShortcutWrapper from './ShortcutWrapper.svelte'
@@ -25,11 +25,16 @@
25
25
  return
26
26
  }
27
27
 
28
+ if (!event.ctrlKey && !event.metaKey) {
29
+ return
30
+ }
31
+
28
32
  // We allow to type the GLOBAL SEARCH KEY on text fields
29
33
  if (isInputFocused()) {
30
34
  return
31
35
  }
32
36
 
37
+ event.preventDefault()
33
38
  onOpen?.()
34
39
  }
35
40
 
@@ -46,8 +51,13 @@
46
51
  <Icon src={Search} class="size-4 text-foreground-inverse shrink-0" />
47
52
  {#if !collapsed}
48
53
  <span class="text-foreground-inverse-secondary text-base flex-1 text-left">Search</span>
49
- <ShortcutWrapper theme="navigation">
50
- <Icon src={Slash} class="size-3" />
51
- </ShortcutWrapper>
54
+ <div class="flex items-center gap-1">
55
+ <ShortcutWrapper theme="navigation">
56
+ <Icon src={Command} class="size-3" />
57
+ </ShortcutWrapper>
58
+ <ShortcutWrapper theme="navigation">
59
+ <span class="text-sm font-semibold uppercase">{GLOBAL_SEARCH_KEY}</span>
60
+ </ShortcutWrapper>
61
+ </div>
52
62
  {/if}
53
63
  </button>
@@ -1 +1 @@
1
- export declare const GLOBAL_SEARCH_KEY = "/";
1
+ export declare const GLOBAL_SEARCH_KEY = "k";
package/dist/constants.js CHANGED
@@ -1 +1 @@
1
- export const GLOBAL_SEARCH_KEY = '/';
1
+ export const GLOBAL_SEARCH_KEY = 'k';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.78",
4
+ "version": "0.1.79",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },