@14ch/svelte-ui 0.0.22 → 0.0.24

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.
@@ -653,7 +653,7 @@
653
653
  <div
654
654
  class="input
655
655
  input--focus-{focusStyle}
656
- input--type-{resolvedType}"
656
+ input--type-{type}"
657
657
  class:input--inline={inline}
658
658
  class:input--linkify={isLinkifyActive}
659
659
  class:input--auto-resize={inline}
@@ -69,7 +69,9 @@
69
69
 
70
70
  const executeMenuItem = (item: MenuItem, event?: MouseEvent) => {
71
71
  event?.stopPropagation();
72
- event?.preventDefault();
72
+ if (!item.href) {
73
+ event?.preventDefault();
74
+ }
73
75
  if (item.callback) {
74
76
  item.callback();
75
77
  }
@@ -261,6 +263,7 @@
261
263
  tabindex="-1"
262
264
  aria-describedby={item.icon ? `${getMenuItemId(actionableIndex)}-icon` : undefined}
263
265
  href={item.href}
266
+ target={item.target}
264
267
  onclick={(e) => executeMenuItem(item, e)}
265
268
  onmouseenter={() => handleMouseEnter(actionableIndex)}
266
269
  onfocus={() => handleFocus(actionableIndex)}
@@ -1,6 +1,7 @@
1
1
  export type MenuItem = {
2
2
  label: string;
3
3
  href?: string;
4
+ target?: '_blank' | '_self' | '_parent' | '_top';
4
5
  callback?: () => void;
5
6
  icon?: string;
6
7
  matchingPath?: string[];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@14ch/svelte-ui",
3
3
  "description": "Modern Svelte UI components library with TypeScript support",
4
4
  "private": false,
5
- "version": "0.0.22",
5
+ "version": "0.0.24",
6
6
  "type": "module",
7
7
  "keywords": [
8
8
  "svelte",