@invopop/popui 0.1.46 → 0.1.48

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.
@@ -19,7 +19,8 @@
19
19
  icon: a.icon,
20
20
  separator: a.separator,
21
21
  destructive: a.destructive,
22
- disabled: a.disabled
22
+ disabled: a.disabled,
23
+ action: a.action
23
24
  })) as DrawerOption[]
24
25
  )
25
26
 
@@ -9,6 +9,7 @@
9
9
  import { FolderL } from '@invopop/ui-icons'
10
10
  import { resolveIcon } from './helpers.js'
11
11
  import DrawerContext from './DrawerContext.svelte'
12
+ import TagBeta from './TagBeta.svelte'
12
13
 
13
14
  const [floatingRef, floatingContent] = createFloatingActions({
14
15
  strategy: 'absolute',
@@ -26,6 +27,7 @@
26
27
  collapsedSidebar = false,
27
28
  iconTheme = 'default',
28
29
  icon = undefined,
30
+ beta = false,
29
31
  children = undefined,
30
32
  onclick
31
33
  }: MenuItemProps = $props()
@@ -118,6 +120,9 @@
118
120
  {/if}
119
121
  {#if !collapsedSidebar}
120
122
  <span class="whitespace-nowrap tracking-normal">{label}</span>
123
+ {#if beta}
124
+ <TagBeta />
125
+ {/if}
121
126
  {/if}
122
127
  </span>
123
128
  {#if collapsable && !collapsedSidebar}
package/dist/types.d.ts CHANGED
@@ -73,14 +73,8 @@ export type Badge = {
73
73
  export type TableDataRow = {
74
74
  [key: string]: unknown;
75
75
  };
76
- export type TableAction = {
77
- icon?: IconSource;
78
- label?: string;
76
+ export type TableAction = DrawerOption & {
79
77
  slug?: string;
80
- separator?: boolean;
81
- destructive?: boolean;
82
- disabled?: boolean;
83
- value?: AnyProp;
84
78
  };
85
79
  export type TableSortBy = '' | 'asc' | 'desc';
86
80
  export type TableActionProp = undefined | ((data: TableDataRow) => TableAction[]);
@@ -520,6 +514,7 @@ export interface MenuItemProps {
520
514
  collapsedSidebar?: boolean;
521
515
  iconTheme?: IconTheme;
522
516
  icon?: IconSource | string | undefined;
517
+ beta?: boolean;
523
518
  children?: MenuItemProps[] | undefined;
524
519
  onclick?: (url: string) => void;
525
520
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.46",
4
+ "version": "0.1.48",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },