@cloudparker/moldex.js 0.0.71 → 0.0.73
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/dist/views/core/button/components/button-list-item/button-list-item.svelte +7 -2
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte.d.ts +1 -1
- package/dist/views/core/icon/components/icon-circle/icon-circle.svelte +2 -2
- package/dist/views/core/icon/components/icon-circle/icon-circle.svelte.d.ts +2 -2
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte +9 -2
- package/dist/views/core/input/components/combobox-field/combobox-field.svelte.d.ts +0 -1
- package/package.json +1 -1
|
@@ -36,7 +36,8 @@ let {
|
|
|
36
36
|
checkboxClassName = "",
|
|
37
37
|
isChecked = false,
|
|
38
38
|
onClick = (ev) => {
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
children
|
|
40
41
|
} = $props();
|
|
41
42
|
</script>
|
|
42
43
|
|
|
@@ -96,5 +97,9 @@ let {
|
|
|
96
97
|
{appearance}
|
|
97
98
|
{size}
|
|
98
99
|
>
|
|
99
|
-
{
|
|
100
|
+
{#if children}
|
|
101
|
+
{@render children()}
|
|
102
|
+
{:else}
|
|
103
|
+
{@render itemInternal()}
|
|
104
|
+
{/if}
|
|
100
105
|
</Button>
|
|
@@ -27,7 +27,7 @@ export type ButtonListItemProps = {
|
|
|
27
27
|
checkboxClassName?: string;
|
|
28
28
|
isChecked?: boolean;
|
|
29
29
|
onClick?: (ev: MouseEvent) => void;
|
|
30
|
-
children?: Snippet
|
|
30
|
+
children?: Snippet;
|
|
31
31
|
};
|
|
32
32
|
import '../../../../../tailwind.css';
|
|
33
33
|
import type { Snippet } from 'svelte';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">import Icon from "../icon/icon.svelte";
|
|
2
|
-
let { circleClassName,
|
|
2
|
+
let { circleClassName, iconPath, iconClassName = "text-primary" } = $props();
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<div
|
|
6
6
|
class="aspect-square bg-primary-100 rounded-full w-12 h-12 flex items-center justify-center {circleClassName}"
|
|
7
7
|
>
|
|
8
|
-
<Icon path={
|
|
8
|
+
<Icon path={iconPath!} className={iconClassName} />
|
|
9
9
|
</div>
|
|
@@ -12,8 +12,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
12
12
|
z_$$bindings?: Bindings;
|
|
13
13
|
}
|
|
14
14
|
declare const IconCircle: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
iconPath?: string;
|
|
16
|
+
iconClassName?: string;
|
|
17
17
|
circleClassName?: string;
|
|
18
18
|
}, {
|
|
19
19
|
[evt: string]: CustomEvent<any>;
|
|
@@ -34,7 +34,6 @@ let {
|
|
|
34
34
|
hasDropdownHeader,
|
|
35
35
|
hasDropdownHeaderSearch,
|
|
36
36
|
hasItemsCheckbox,
|
|
37
|
-
hasPrimitiveItemsData,
|
|
38
37
|
iconPathClassName,
|
|
39
38
|
iconPathFieldName,
|
|
40
39
|
id,
|
|
@@ -63,6 +62,13 @@ let searchFieldRef = $state(null);
|
|
|
63
62
|
let comboboxIconSizeClassName = $state("");
|
|
64
63
|
let isPlaced = $state(false);
|
|
65
64
|
let searchText = $state("");
|
|
65
|
+
let hasPrimitiveItemsData = $derived.by(() => {
|
|
66
|
+
if (items) {
|
|
67
|
+
let firstItem = items[0];
|
|
68
|
+
return typeof firstItem == "string" || typeof firstItem == "number" || firstItem instanceof Date;
|
|
69
|
+
}
|
|
70
|
+
return false;
|
|
71
|
+
});
|
|
66
72
|
let itemsIdentityMap = {};
|
|
67
73
|
let _value = $derived.by(() => {
|
|
68
74
|
return selectedItemsSet?.size ? " " : "";
|
|
@@ -356,7 +362,8 @@ function handleItemSelected(ev, item, index) {
|
|
|
356
362
|
aria-selected={item.isChecked}
|
|
357
363
|
>
|
|
358
364
|
<ButtonListItem
|
|
359
|
-
{item}
|
|
365
|
+
title={item.title}
|
|
366
|
+
subtitle={item.subtitle}
|
|
360
367
|
{index}
|
|
361
368
|
hasCheckbox={hasItemsCheckbox}
|
|
362
369
|
className=" {itemClassName}"
|
|
@@ -22,7 +22,6 @@ export type ComboboxFieldProps = {
|
|
|
22
22
|
hasDropdownHeader?: boolean;
|
|
23
23
|
hasDropdownHeaderSearch?: boolean;
|
|
24
24
|
hasItemsCheckbox?: boolean;
|
|
25
|
-
hasPrimitiveItemsData?: boolean;
|
|
26
25
|
iconPathClassName?: string;
|
|
27
26
|
iconPathFieldName?: string;
|
|
28
27
|
identityFieldName?: string;
|