@isoftdata/svelte-context-menu 2.0.2 → 2.0.4

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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Svelte ContextMenu
2
-
2
+ ![Screenshot of the attachment component](conMen.png?raw=true "Screenshot")
3
3
  A Context/Dropdown menu component, filled with [DropdownItem](DropdownItem.md)s and [DropdownCheckboxItem](DropdownCheckboxItem.md)s
4
4
 
5
5
  ## Install
@@ -4,24 +4,26 @@
4
4
  import Icon, { getIconProps } from '@isoftdata/svelte-icon'
5
5
 
6
6
  interface Props extends Omit<HTMLButtonAttributes, `on:${string}` | `bind:${string}` | `aria-${string}`> {
7
- icon?: ComponentProps<Icon>['icon'] | ComponentProps<Icon>
7
+ icon?: ComponentProps<typeof Icon>['icon'] | ComponentProps<typeof Icon>
8
8
  children?: Snippet
9
9
  }
10
10
 
11
11
  let {
12
12
  //
13
13
  icon,
14
+ class: classNames,
15
+
14
16
  children,
15
17
  ...rest
16
18
  }: Props = $props()
17
19
 
18
- const iconProps = $derived(getIconProps(icon))
20
+ const iconProps = $derived(icon ? getIconProps(icon) : undefined)
19
21
  </script>
20
22
 
21
23
  <button
22
- class="dropdown-item"
23
- type="button"
24
24
  {...rest}
25
+ class={['dropdown-item', classNames]}
26
+ type="button"
25
27
  >{#if icon}<span class="mr-1 me-1"
26
28
  ><Icon
27
29
  fixedWidth
@@ -2,7 +2,7 @@ import type { ComponentProps, Snippet } from 'svelte';
2
2
  import type { HTMLButtonAttributes } from 'svelte/elements';
3
3
  import Icon from '@isoftdata/svelte-icon';
4
4
  interface Props extends Omit<HTMLButtonAttributes, `on:${string}` | `bind:${string}` | `aria-${string}`> {
5
- icon?: ComponentProps<Icon>['icon'] | ComponentProps<Icon>;
5
+ icon?: ComponentProps<typeof Icon>['icon'] | ComponentProps<typeof Icon>;
6
6
  children?: Snippet;
7
7
  }
8
8
  declare const DropdownItem: import("svelte").Component<Props, {}, "">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/svelte-context-menu",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "devDependencies": {
19
19
  "@isoftdata/prettier-config": "^2.0.4",
20
20
  "@isoftdata/svelte-bootstrap-version-switcher": "^1.1.2",
21
- "@isoftdata/svelte-button": "^2.1.0",
21
+ "@isoftdata/svelte-button": "^2.1.1",
22
22
  "@isoftdata/svelte-checkbox": "^2.1.1",
23
23
  "@sveltejs/adapter-auto": "^6.0.0",
24
24
  "@sveltejs/kit": "^2.5.27",
@@ -44,7 +44,8 @@
44
44
  "prettier": "@isoftdata/prettier-config",
45
45
  "dependencies": {
46
46
  "@floating-ui/dom": "^1.5.3",
47
- "@isoftdata/svelte-icon": "^2.0.0",
47
+ "@isoftdata/svelte-icon": "^2.0.4",
48
+ "@isoftdata/utility-bootstrap": "^2.2.1",
48
49
  "svelte": "^5.23.2"
49
50
  },
50
51
  "engines": {