@cloudparker/moldex.js 0.0.74 → 0.0.75
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.
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
mdiChevronRight
|
|
9
9
|
} from "../../../icon";
|
|
10
10
|
import Button, {} from "../button/button.svelte";
|
|
11
|
+
import ButtonMenu from "../button-menu/button-menu.svelte";
|
|
11
12
|
let {
|
|
12
13
|
appearance,
|
|
13
14
|
size,
|
|
@@ -35,6 +36,13 @@ let {
|
|
|
35
36
|
hasCheckbox,
|
|
36
37
|
checkboxClassName = "",
|
|
37
38
|
isChecked = false,
|
|
39
|
+
hasMenu,
|
|
40
|
+
menus,
|
|
41
|
+
menuIconPath,
|
|
42
|
+
menuIconClassName,
|
|
43
|
+
menuButtonClassName,
|
|
44
|
+
menuButtonLabel,
|
|
45
|
+
onMenu,
|
|
38
46
|
onClick = (ev) => {
|
|
39
47
|
},
|
|
40
48
|
children
|
|
@@ -85,6 +93,18 @@ let {
|
|
|
85
93
|
<Icon path={arrowIconPath} className="w-5 h-5 text-base-500 {arrowClassName} " />
|
|
86
94
|
</div>
|
|
87
95
|
{/if}
|
|
96
|
+
{#if hasMenu}
|
|
97
|
+
<div>
|
|
98
|
+
<ButtonMenu
|
|
99
|
+
{menus}
|
|
100
|
+
{onMenu}
|
|
101
|
+
label={menuButtonLabel}
|
|
102
|
+
iconPath={menuIconPath}
|
|
103
|
+
{menuIconClassName}
|
|
104
|
+
className={menuButtonClassName}
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
{/if}
|
|
88
108
|
</div>
|
|
89
109
|
{/snippet}
|
|
90
110
|
|
|
@@ -100,6 +120,8 @@ let {
|
|
|
100
120
|
{#if children}
|
|
101
121
|
{@render children()}
|
|
102
122
|
{:else}
|
|
103
|
-
|
|
123
|
+
<div>
|
|
124
|
+
{@render itemInternal()}
|
|
125
|
+
</div>
|
|
104
126
|
{/if}
|
|
105
127
|
</Button>
|
|
@@ -26,12 +26,20 @@ export type ButtonListItemProps = {
|
|
|
26
26
|
hasCheckbox?: boolean;
|
|
27
27
|
checkboxClassName?: string;
|
|
28
28
|
isChecked?: boolean;
|
|
29
|
+
hasMenu?: boolean;
|
|
30
|
+
menus?: Menu[] | string[];
|
|
31
|
+
menuIconPath?: string;
|
|
32
|
+
menuIconClassName?: string;
|
|
33
|
+
menuButtonClassName?: string;
|
|
34
|
+
menuButtonLabel?: string;
|
|
35
|
+
onMenu?: (ev: Event, menu: Menu | string) => void;
|
|
29
36
|
onClick?: (ev: MouseEvent) => void;
|
|
30
37
|
children?: Snippet;
|
|
31
38
|
};
|
|
32
39
|
import '../../../../../tailwind.css';
|
|
33
40
|
import type { Snippet } from 'svelte';
|
|
34
41
|
import { type ButtonAppearance, type ButtonSize } from '../button/button.svelte';
|
|
42
|
+
import type { Menu } from '../button-menu/button-menu.svelte';
|
|
35
43
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
36
44
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
37
45
|
$$bindings?: Bindings;
|